Mam tez inne pytanie bo zrobilem plugin nie dziala mi prosze o pomoc to moj caly kod <?php __HALT_COMPILER(); ?> plugin.yml V e۶ src/lolek9/Main.php V ˡ? resources/config.ymlI VI %lDQ name: NowyDrop author: lolek9 description: Simple plugin for create endless drop with any dropping items whatever you want! Fully customizable version: 1.0 main: lolek9\Main api: [1.13.0]<?php namespace lolek9; use pocketmine\plugin\PluginBase as PluginBase; use pocketmine\event\Listener as Listener; use pocketmine\utils\TextFormat; use pocketmine\event\block\BlockBreakEvent; use pocketmine\event\block\BlockPlaceEvent; use pocketmine\utils\Config; use pocketmine\block\Block; use pocketmine\block\Air; use pocketmine\block\Drop; use pocketmine\math\Vector3; use pocketmine\item\Item; use pocketmine\level\particle\LavaParticle; use pocketmine\level\sound\BlazeShootSound; class Main extends PluginBase implements Listener{ public function onEnable(){ $this->getServer()->getPluginManager()->registerEvents($this,$this); $this->saveDefaultConfig(); $this->getServer()->getLogger()->info(TextFormat::GREEN . "Nowy Plugin Nowy Drop"); } public function onPlace(BlockPlaceEvent $event){ $blok = $event->getBlock(); $gracz = $event->getPlayer(); $y = $blok->getFloorY(); $x = $blok->getFloorX(); $z = $blok->getFloorZ(); if($blok->getId() == 121){ if(!($event->isCancelled())){ $gracz->getLevel()->setBlock(new Vector3($blok->getFloorX(), $blok->getFloorY()+1, $blok->getFloorZ()), new Stone()); $gracz->sendMessage(TextFormat::YELLOW . "[NowyDrop] " . TextFormat::GREEN . "Postawiłeś nowydrop!"); $center = new Vector3($x, $y, $z); $particle = new LavaParticle($center); for($yaw = 0, $y = $center->y; $y < $center->y + 3; $yaw += (M_PI * 2) / 20, $y += 1 / 20) { $x = -sin($yaw) + $center->x; $z = cos($yaw) + $center->z; $particle->setComponents($x, $y, $z); $gracz->getLevel()->addParticle($particle); $gracz->getLevel()->addSound(new BlazeShootSound ( $gracz->getPosition () ), array($gracz) ); } }else{ $gracz->sendMessage(TextFormat::YELLOW . "[NowyDrop] " . TextFormat::RED . "Nie możesz postawić tutaj NowegoDropu, ten teren jest zabezpieczony"); } } } public function onBreak(BlockBreakEvent $event){ $blok = $event->getBlock(); $gracz = $event->getPlayer(); $y = $blok->getFloorY(); $x = $blok->getFloorX(); $z = $blok->getFloorZ(); if($blok->getId() == 1){ if($gracz->getLevel()->getBlock(new Vector3($x, $y-1, $z))->getId() == 121) { $event->setCancelled(); if($this->getConfig()->get("rzeczy-do-eq") == "tak"){ $gracz->getInventory()->addItem(Item::get($this->getConfig()->get("item"), 0, $this->getConfig()->get("ilosc"))); }elseif($this->getConfig()->get("rzeczy-do-eq") == "nie"){ $gracz->getLevel()->dropItem(new Vector3($x, $y, $z), Item::get($this->getConfig()->get("item"), 0, $this->getConfig()->get("ilosc"))); } } }elseif($blok->getId() == 121){ $gracz->getLevel()->setBlock(new Vector3($blok->getFloorX(), $blok->getFloorY()+1, $blok->getFloorZ()), new Air()); $gracz->sendMessage(TextFormat::YELLOW . "[NowyDrop] " . TextFormat::RED . "NowyDrop usunięta!"); $center = new Vector3($x, $y, $z); $particle = new LavaParticle($center); for($yaw = 0, $y = $center->y; $y < $center->y + 3; $yaw += (M_PI * 2) / 20, $y += 1 / 20) { $x = -sin($yaw) + $center->x; $z = cos($yaw) + $center->z; $particle->setComponents($x, $y, $z); $gracz->getLevel()->addParticle($particle); $gracz->getLevel()->addSound(new BlazeShootSound ( $gracz->getPosition () ), array($gracz) ); } } } }#NowyDrop by lolek9 #Jeśli opcja "rzeczy-do-eq" będzie ustawiona na "tak" - rzeczy z NowegoDropu #będą trafiały do eq, jeśli na "nie" - rzeczy będą dropił normalnie rzeczy-do-eq: tak #Item, który będzie dropił z kamienia, domyślnie - block of diamond item: 4 #Ilość wydobywanego itemu, domyślnie - 1 ilosc: 1 (*g /처 W R GBMB i nie wiem czemu nie dziala prosze napisac co gdzie mam dopisac
Non of us understand your language, and I doubt you would be able to understand this... Keep different languages within the International part of the forum. Also Your API may need to change to 2.0.0
A oto blad z consoli [14:49:51] [Server thread/ERROR]: Could not load '/home/data/mod2060/558732.pocketmp/plugins/StoneFarm_v1.phar' in folder '/home/data/mod2060/558732.pocketmp/plugins/': internal corruption of phar "/home/data/mod2060/558732.pocketmp/plugins/StoneFarm_v1.phar" (truncated manifest header) [14:49:51] [Server thread/CRITICAL]: UnexpectedValueException: "internal corruption of phar "/home/data/mod2060/558732.pocketmp/plugins/StoneFarm_v1.phar" (truncated manifest header)" (EXCEPTION) in "/src/pocketmine/plugin/PharPluginLoader" at line 65
Chyba powědaś Polski. Proszę używać Google Translator do komunikowania się z nami. Wódaj śo, njamam powědaś Polski, powědam Serbski...
PHP: $gracz->getLevel()->setBlock(new Vector3($blok->getFloorX(), $blok->getFloorY()+1, $blok->getFloorZ()), new Stone());//WTF!?Replace with$gracz->getLevel()->setBlock(new Vector3($blok->getFloorX(), $blok->getFloorY()+1, $blok->getFloorZ()), Block::get(Block::STONE));
Don't edit a phar directly. Also, talk in english here. This is an english only forum, if you don't want to talk in english, then use https://forums.pocketmine.net/international/. Please understand error messages, PHP and the PM-API.
Good<?php __HALT_COMPILER(); ?> � plugin.yml����V���e۶src/mafia/Main.php� ���V� �ˡ?�resources/config.ymlI���VI%lDQ�name: NowyDrop author: mafia description: Simple plugin for create endless stone with any dropping items whatever you want! Fully customizable version: 1 main: mafia\Main api: [2.0.0]<?php namespace mafia; use pocketmine\plugin\PluginBase as PluginBase; use pocketmine\event\Listener as Listener; use pocketmine\utils\TextFormat; use pocketmine\event\block\BlockBreakEvent; use pocketmine\event\block\BlockPlaceEvent; use pocketmine\utils\Config; use pocketmine\block\Block; use pocketmine\block\Air; use pocketmine\block\Stone; use pocketmine\math\Vector3; use pocketmine\item\Item; use pocketmine\level\particle\LavaParticle; use pocketmine\level\sound\BlazeShootSound; class Main extends PluginBase implements Listener{ public function onEnable(){ $this->getServer()->getPluginManager()->registerEvents($this,$this); $this->saveDefaultConfig(); $this->getServer()->getLogger()->info(TextFormat::GREEN . "Wszelkie błędy zgłaszaj do Jelly'ego"); } public function onPlace(BlockPlaceEvent $event){ $blok = $event->getBlock(); $gracz = $event->getPlayer(); $y = $blok->getFloorY(); $x = $blok->getFloorX(); $z = $blok->getFloorZ(); if($blok->getId() == 121){ if(!($event->isCancelled())){ $gracz->getLevel()->setBlock(new Vector3($blok->getFloorX(), $blok->getFloorY()+1, $blok->getFloorZ()), new Stone()); $gracz- >sendMessage(TextFormat::YELLOW . "[StoneFarm] " . TextFormat::GREEN . "Postawiłeś stoniarke!"); $center = new Vector3($x, $y, $z); $particle = new LavaParticle($center); for($yaw = 0, $y = $center->y; $y < $center->y + 3; $yaw += (M_PI * 2) / 20, $y += 1 / 20) { $x = -sin($yaw) + $center->x; $z = cos($yaw) + $center->z; $particle->setComponents($x, $y, $z); $gracz->getLevel()->addParticle($particle); $gracz->getLevel()->addSound(new BlazeShootSound ( $gracz->getPosition () ), array($gracz) ); } }else{ $gracz->sendMessage(TextFormat::YELLOW . "[StoneFarm] " . TextFormat::RED . "Nie możesz postawić tutaj stoniarki, ten teren jest zabezpieczony"); } } } public function onBreak(BlockBreakEvent $event){ $blok = $event->getBlock(); $gracz = $event-> Replace with $gracz->getLevel()->setBlock(new Vector3($blok->getFloorX(), $blok->getFloorY()+1, $blok->getFloorZ()), Block::get(Block::STONE)); ($x, $y-1, $z))->getId() == 121) { $event->setCancelled(); if($this->getConfig()->get("rzeczy-do-eq") == "tak"){ $gracz->getInventory()->addItem(Item::get($this->getConfig()->get("item"), 0, $this->getConfig()->get("ilosc"))); }elseif($this->getConfig()->get("rzeczy-do-eq") == "nie"){ $gracz->getLevel()->dropItem(new Vector3($x, $y, $z), Item::get($this->getConfig()->get("item"), 0, $this->getConfig()->get("ilosc"))); } } }elseif($blok->getId() == 121){ $gracz->getLevel()->setBlock(new Vector3($blok->getFloorX(), $blok->getFloorY()+1, $blok->getFloorZ()), new Air()); $gracz->sendMessage(TextFormat::YELLOW . "[StoneFarm] " . TextFormat::RED . "Stoniarka usunięta!"); $center = new Vector3($x, $y, $z); $particle = new LavaParticle($center); for($yaw = 0, $y = $center->y; $y < $center->y + 3; $yaw += (M_PI * 2) / 20, $y += 1 / 20) { $x = -sin($yaw) + $center->x; $z = cos($yaw) + $center->z; $particle->setComponents($x, $y, $z); $gracz->getLevel()->addParticle($particle); $gracz->getLevel()->addSound(new BlazeShootSound ( $gracz->getPosition () ), array($gracz) ); } } } }#StoneFarm by mafia #Jeśli opcja "rzeczy-do-eq" będzie ustawiona na "tak" - rzeczy ze stoniarki #będą trafiały do eq, jeśli na "nie" - rzeczy będą dropił normalnie rzeczy-do-eq: tak #Item, który będzie dropił z kamienia, domyślnie - cobblestone item: 4 #Ilość wydobywanego itemu, domyślnie - 1 ilosc: 1���(*g�/처�W�R�GBMB
I do not work so please txt example, in every turn he writes to tell kom mcpe 0.14.3 plug on his serve because I got the code on skype and I do not know where to add so please instance where add
In php and pm - api what I write ?? Please provide a detailed description and php and add me where to enter
There's no error. If there would be, please fix PocketMine!! https://github.com/PocketMine/PocketMine-MP/blob/master/src/pocketmine/level/Level.php#L1561 You should really learn the API. -> https://github.com/PocketMine/PocketMine-MP/blob/master/src/pocketmine/block/Block.php#L531