No.Could you tell me how to be disable to disarm? I want a player not to take off his/her armor(s). When a player put his/her armor away, it supported to be cancelled.
I'm sorry... I readed docs just minute. PHP: function EntityArmorChangeEvent(EntityArmorChangeEvent $entity){ $entity->setCanceled;} Is this correct?
No, you have spelling bugs, here's a fix with a feature : PHP: public function EntityArmorChangeEvent(EntityArmorChangeEvent $entity){$c = $entity->getEntity();//gets the entityif($c instanceof Player){//checks if the entity is a player$entity->setCancelled(true);//It's setCancelled(true); not setCanceled;}} Note : use public function functionname{} instead of function name{} Thanks ↓
Please give him a little more information about it, he is learning. As you want your plugin to be used by "every Entity" (Player is an Entity too), you need to make the situation Public. So, you use Public Function, whenever you wan the plugin to act on everything (depends). Example PHP: public function onEnable() { //the plugin is fired when enabled$this->Server::getPlayer()->sendMessage("Plugin is enabled"); //sends player the message inside (" ")}