$bool=$this->isCancelled(); //If bool false, then task running. Check it in task code.
You wrongly imported ConsoleCommandSender This is right: use pocketmine\console\ConsoleCommandSender;
Tried, interactevent calls firstly
Hello. When i placing or interacting with block - code works. When i break block - it's not work. Why? Block position >>4 $cx $cz $owner - from...
So, you wanna to get Position and type when server restarts? P.S. if it's true then you should do task and save entities in config.
I don't work on API 4, but: //login function $n=$e->getPlayer()->getName(); $items=$this->config->get("$n");...
When it's out of memory, i think you should save inventory on plugin disabling, but idk, if the players been at the server at plugin disable. I...
It's saying about serialization - it's not allowed. So, you can't serialine Enchantment class at line 30 - search it.
Nvm, i fixed it
Hello guys. What's wrong here? P.s. made this in tutorial at forum, also used protocol\PlaySoundPacket $pk=new PlaySoundPacket;...
Oh, if it is first time then: use pocketmine\event\inventory\InventoryPickupItemEvent; use pocketmine\event\player\PlayerLoginEvent; public...
You can use PlayerMoveEvent or PlayerInteractEvent: use pocketmine\event\PlayerInteractEvent; public function onInteract(PlayerInteractEvent $e)...
use pocketmine\event\inventory\InventoryPickupItemEvent; public function onPickup(InventoryPickupItemEvent $e) { $item=$e->getItem();...
XDXDXDXD Think, helped.
That code, but: public function onInteract(PlayerInteractEvent $event) { $item = $event->getItem(); $id = $item->getId();...
It's better to remove all spaces before & after =. Check, if you have in that stroke spaces after; , ()
Separate names with a comma.