I am new to learning java and have been really interested. I have been having one issue as a rookie to this language and that is how do I have an if statement that is "running" at all times. To preface, I am trying to make a plugin that makes aggressive mobs (example: zombies) not be aggressive towards players unless they are attacked. (A mechanic similar to enderman). My problem is that I am new. I have found a few things but still am lacking knowledge. It would be nice if someone could point me in the right direction. I found EntityTargetEvent and EntityTargetLivingEntityEvent while looking around but am not sure how to implement it. I don't want to be spoon fed a plugin, I want to learn. It would be appreciated if you could point me in the right direction with a few resources to get me started on this plugin. (Though source code for something likes this would be useful to me, so if you REALLY want to you can post it but otherwise just help me out ;} ) I found https://mods.curse.com/bukkit-plugins/minecraft/mob-control/766311 which does this but with a command, I basically want to disable mob tracking unless the mob is provoked without a command being enabled. Should I look more into loops or is that totally wrong? EDIT by Moderator: merged posts, please use the edit button instead of double posting.