Skip to content

Instantly share code, notes, and snippets.

@ifvictr
Last active June 12, 2016 00:39
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 ifvictr/917531f5c1828f426ec8be475975705e to your computer and use it in GitHub Desktop.
Save ifvictr/917531f5c1828f426ec8be475975705e to your computer and use it in GitHub Desktop.
InfiniteSlots for PocketMine-MP.
<?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