Skip to content

Instantly share code, notes, and snippets.

@dktapps
Created July 27, 2017 11:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dktapps/103824e007ccb114bd701de4a2ecd39c to your computer and use it in GitHub Desktop.
Save dktapps/103824e007ccb114bd701de4a2ecd39c to your computer and use it in GitHub Desktop.
<?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();
}
}
}
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
@tarik02
Copy link

tarik02 commented Jul 27, 2017

I recommend to use ScriptPlugin for tests :-)

@dktapps
Copy link
Author

dktapps commented Aug 25, 2017

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