├── README.md ├── plugin.yml ├── resources └── help.yml └── src └── Muqsit ├── Help.php └── HelpCommand.php /README.md: -------------------------------------------------------------------------------- 1 | # Help (Genisys Recommended) 2 | A professional PocketMine plugin that modifies /help 3 | -------------------------------------------------------------------------------- /plugin.yml: -------------------------------------------------------------------------------- 1 | name: Help 2 | main: Muqsit\Help 3 | version: "2" 4 | api: [1.13.1, 2.0.0, 2.0.1] 5 | load: STARTUP 6 | author: Muqsit 7 | -------------------------------------------------------------------------------- /resources/help.yml: -------------------------------------------------------------------------------- 1 | --- 2 | #Number of pages. If you have made up to page.6 but wrote pages: as 5, then the 6th page will display the vanilla /help 6 command. 3 | pages: 3 4 | 5 | #Page messages. Format is... 6 | #page.4: 7 | # - Help message on page 4 8 | # - Another help message on page 4 9 | # - ... 10 | page.1: 11 | - §b§lHelpfulCraft §r§eHelp §a(1/3) 12 | - §d/spawn - §fTeleport to the server's spawn. 13 | - §d/shop - §fTeleport to the shop. 14 | - §d/wild - §fGo to the wilderness. 15 | - §d/warp - §fList all warps/teleport to a warp. 16 | page.2: 17 | - §b§lHelpfulCraft §r§eHelp §a(2/3) 18 | - §d/home - §fTeleport to your home. §d(see /sethome). 19 | - §d/tell - §fPrivate message a player. §d(/w, /msg). 20 | - §d/daily - §fGet your daily items. 21 | - §d/vote - §fVote for the server to earn amazing items. 22 | page.3: 23 | - §b§lHelpfulCraft §r§eHelp §a(3/3) 24 | - §d/pv - §fAccess private vault. 25 | - §d/pv 2 - §fMultiple Private Vaults! (/pv 3,4...) 26 | - §d/mcstats - §fCheck a your own or a player's mmo. 27 | - §d/mctop - §fCheck who rules the server! 28 | ... 29 | -------------------------------------------------------------------------------- /src/Muqsit/Help.php: -------------------------------------------------------------------------------- 1 | getDataFolder() . "help.yml")) { 13 | @mkdir($this->getDataFolder()); 14 | file_put_contents($this->getDataFolder() . "help.yml",$this->getResource("help.yml")); 15 | } 16 | $this->saveDefaultConfig(); 17 | $this->getServer()->getCommandMap()->getCommand("help")->setLabel("help_not_anymore"); 18 | $this->getServer()->getCommandMap()->getCommand("help")->unregister($this->getServer()->getCommandMap()); 19 | $this->help = new Config($this->getDataFolder() . "help.yml", Config::YAML); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Muqsit/HelpCommand.php: -------------------------------------------------------------------------------- 1 | plugin = $plugin; 12 | } 13 | 14 | public function execute(CommandSender $issuer, $alias, array $args){ 15 | if(!$this->testPermission($issuer)) return true; 16 | $protect = $this->plugin->help->get("pages"); 17 | if (isset($args[0]) && $args[0] > 0 && $args[0] < $protect + 1) { 18 | $messages = $this->plugin->help->get("page." . $args[0]); 19 | foreach ($messages as $msg) { 20 | $issuer->sendMessage($msg); 21 | } 22 | } elseif (!isset($args[0]) or $args[0] > $protect or $args[0] < 1) { 23 | $helpInitial = $this->plugin->help->get("page.1"); 24 | foreach ($helpInitial as $helpInit) { 25 | $issuer->sendMessage($helpInit); 26 | } 27 | } 28 | return true; 29 | } 30 | } 31 | --------------------------------------------------------------------------------