Created
July 27, 2017 11:20
-
-
Save dktapps/103824e007ccb114bd701de4a2ecd39c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace dktapps\NoRak; | |
use pocketmine\plugin\PluginBase; | |
use pocketmine\command\CommandSender; | |
use pocketmine\command\Command; | |
use pocketmine\event\Listener; | |
use pocketmine\event\server\NetworkInterfaceRegisterEvent; | |
use pocketmine\network\mcpe\RakLibInterface; | |
class Main extends PluginBase implements Listener{ | |
public function onEnable(){ | |
$this->getServer()->getPluginManager()->registerEvents($this, $this); | |
} | |
public function onNetworkInterfaceRegistered(NetworkInterfaceRegisterEvent $event){ | |
var_dump("hi"); | |
if($event->getInterface() instanceof RakLibInterface){ | |
$this->getLogger()->notice("RakLib is not registered!"); | |
$event->setCancelled(); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: NoRak | |
main: dktapps\NoRak\Main | |
version: 0.0.1 | |
api: 3.0.0-ALPHA7 | |
load: STARTUP | |
author: dktapps | |
description: Skeleton plugin generated by PocketMine-MP DevTools | |
website: https://github.com/pmmp/PocketMine-DevTools |
I generally do, but in this case it was quicker to just generate a skeleton plugin with devtools.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I recommend to use ScriptPlugin for tests :-)