Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace myplugin;
- use pocketmine\command\Command;
- use pocketmine\permission\Permission;
- use pocketmine\plugin\PluginBase;
- use pocketmine\event\Listener;
- use pocketmine\utils\TextFormat;
- use pocketmine\utils\Config; /* NOT IN USE (YET) */
- use pocketmine\command\CommandExecutor;
- use pocketmine\command\CommandSender;
- class Loader extends PluginBase implements Listener{
- public function onEnable(){
- $this->getServer()->getPluginManager()->registerEvents($this, $this);
- }
- public function onCommand(CommandSender $sender, Command $command, $label, array $args) {
- switch($command->getName()){
- case "beta":
- $sender->getName();
- if($sender->hasPermission("myplugin.beta")){
- $sender->getInventory()->addItem(Item::get(313,0,1));
- $sender->sendMessage(TextFormat::BLUE . "Command Given:Complete");
- return true;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement