Last active
June 12, 2016 00:39
-
-
Save ifvictr/917531f5c1828f426ec8be475975705e to your computer and use it in GitHub Desktop.
InfiniteSlots for PocketMine-MP.
This file contains hidden or 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 | |
/** | |
* @name InfiniteSlots | |
* @main infiniteslots\InfiniteSlots | |
* @version 1.0.0 | |
* @api 1.12.0 | |
* @load POSTWORLD | |
* @author Gamecrafter | |
* @description Bypass the player slot limit on your server! | |
* @link https://gist.github.com/Gamecrafter/917531f5c1828f426ec8be475975705e | |
*/ | |
namespace infiniteslots{ | |
use pocketmine\event\player\PlayerKickEvent; | |
use pocketmine\event\Listener; | |
use pocketmine\plugin\PluginBase; | |
class InfiniteSlots extends PluginBase implements Listener{ | |
public function onEnable(){ | |
$this->getServer()->getPluginManager()->registerEvents($this, $this); | |
} | |
/** | |
* @param PlayerKickEvent $event | |
* @priority HIGHEST | |
* @ignoreCancelled true | |
*/ | |
public function onPlayerKick(PlayerKickEvent $event){ | |
if($event->getReason() === "disconnectionScreen.serverFull"){ | |
$event->setCancelled(true); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment