Hi, I'm new to developing plugins. I made a plugin but I skip this error, I reviewed the code and have found none. Please, could you help me, thanks Plugin.YML Code: name: DeadBack main: DeadBack\BackToDeathPoint version: 1.0.0 api: [1.9.0] load: POSTWORLD author: evermine commands: deadback: permission: deadback.deadback description: Return in the last location permissions: deadback: default: true description: Permission children: deadback.deadback: default: true description: Return player to last death location. BackToDeathPoint.php Code: <?php //Define namespace namespace DeadBack; //Import plugin base //PluginBase use pocketmine\command\Command; use pocketmine\command\CommandSender; use pocketmine\plugin\PluginBase; use pocketmine\utils\TextFormat; use pocketmine\Player; use pocketmine\Server; use pocketmine\event\player\PlayerDeathEvent; use pocketmine\event\Listener; use pocketmine\level\Position; use pocketmine\level\Level; class BackToDeathPoint extends PluginBase implements Listener { public $lastdeath = array(); //Enable plugin :D public function onEnable() { $this->getLogger()->info("onEnable() has been called!"); } public function onDisable() { $this->getLogger()->info("onDisable() has been called!"); } public function onCommand(CommandSender $sender, Command $command, $label, array $args){ switch($command->getName()){ case "deadback": if($this->lastdeath[$sender->getName()] instanceof Position){ $sender->teleport($this->lastdeath[$sender->getName()]); $sender->sendMessage("[DeadBack] You teleported to the last location."); unset($this->lastdeath[$sender->getName()]); }else{ $sender->sendMessage("[DeadBack] You only need this command when you die in survival."); } break; } } public function onPlayerDeath(PlayerDeathEvent $event){ $player = $event->getEntity(); $this->lastdeath[$player->getName()] = new Position( round($player->getX()), round($player->getY()), round($player->getZ()), $player->getLevel() ); } } /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */
Pocketmine error: 16:02:50 [INFO] Starting Minecraft: PE server version v0.10.4 alpha 16:02:50 [INFO] Loading pocketmine.yml... 16:02:50 [INFO] Loading server properties... 16:02:50 [INFO] Starting remote control listener 16:02:51 [INFO] RCON running on 0.0.0.0:19132 16:02:51 [INFO] Starting Minecraft PE server on 0.0.0.0:19132 16:02:51 [INFO] This server is running PocketMine-MP version 1.4.1dev-945 "絶好(Zekkou)ケーキ(Cake)" (API 1.11.0) 16:02:51 [INFO] PocketMine-MP is distributed under the LGPL License 16:02:51 [INFO] Loading CustomChat v1.2.2 16:02:51 [INFO] Loading DevTools v1.9.0 16:02:51 [INFO] Loading ReportRTS v1.1.0 16:02:52 [INFO] ----- PocketMine-MP Auto Updater ----- 16:02:52 [INFO] It appears you're running a Beta build, when you've specified that you prefer to run Stable builds. 16:02:52 [INFO] If you would like to be kept informed about new Beta or Development builds, it is recommended that you change 'preferred-channel' in your pocketmine.yml to 'beta' or 'development'. 16:02:52 [INFO] ----- -------------------------- ----- 16:02:52 [INFO] Enabling DevTools v1.9.0 16:02:52 [INFO] Loading source plugin DeadBack v1.0.0 16:02:52 [INFO] [DevTools] Registered folder plugin loader 16:02:52 [INFO] Preparing level "world" 16:02:52 [INFO] Enabling CustomChat v1.2.2 16:02:52 [INFO] [CustomChat] - CustomChat - Enabled! 16:02:52 [INFO] Enabling ReportRTS v1.1.0 16:02:52 [INFO] Enabling DeadBack v1.0.0 16:02:52 [INFO] [DeadBack] onEnable() has been called! 16:02:53 [INFO] Starting GS4 status listener 16:02:53 [INFO] Setting query port to 19132 16:02:53 [INFO] Query running on 0.0.0.0:19132 16:02:53 [INFO] Default game type: SURVIVAL 16:02:53 [INFO] Done (2.462s)! For help, type "help" or "?" command: /deadback Me va mejor hablar en español
16:14:07 [CRITICAL] Unhandled exception executing command 'deadback' in deadback: Undefined index: evermine 16:14:07 [NOTICE] ArrayOutOfBoundsException: "Undefined index: evermine" (E_NOTICE) in "/DeadBack/src/DeadBack/BackToDeathPoint" at line 37
stop ripping off others plugins! thats the result of being such a pirate. learn php and make ur own! im getting pissed to see people like you.
Take it easy... He is just learning xD if he tries to make something more, I'm sure that everyone will act against him
Joshua, I have 14 years and try to learn from tutorials php programming plugins. I'm not going to throw, but if I jump mistakes, ask to learn from those mistakes
I started like you xD but I already had 15 and I learned directly from PocketMine's new API (At that time, the API was still taking form )
@Edgar_SM Ya publique los cambios en Github, cree una solicitud de modificacion para que la veas, aceptala: https://github.com/evermine/DeadBack/pull/1
iJoshuaHD, sorry for having published an error in your plugin. But I'm not a pirate, and do not want to be a pirate