Separate names with a comma.
Comments in 'Plugin Development' started by GamesLoad, Apr 20, 2015.
Hello guys I wanted to know if and when you can touch a mob run a command thanks.
EntityDamageEvent and $this->setCancelled(true);
Hook to EntityDamageEvent, check if event is instanceof EntityDamageByEntityEvent, if yes, if damager instanceof Player, $event->getEntity() is the clicked entity. Use $server->dispatchCommand($commandLine, $player) to run a command.