Is it possible to check if player is hitting an pc or slapper? I want to prevent player from using command. I know i can just set permission and delete that later. But that is just too much hassle. Also, i dont wanna see my console setting and unsetting permission.
use EntityDamageEvent (pmmp) or SlapperHitEvent (slapper) to check if the player is hitting a slapper npc
I tried doing that and already checked it using EntityDamageByEntityEvent but got stucked implementing slapper. I don't know to get class from another plugin.
Say i do this api = $this->getServer()->getPluginManager()->getPluginManager()->getPlugin("Slapper"); Can i call it just like this? $this->getServer()->getPluginManager()->callEvent($event = new SlapperHitEvent($entity, $damager));