Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace megamichiel\MyPlugin;
- use pocketmine\event\Listener;
- use pocketmine\plugin\PluginBase;
- class MyPlugin extends PluginBase implements Listener {
- public function onEnable() {
- $this->getLogger()->info("Plugin enabled :OOO");
- $this->getServer()->getPluginManager()->registerEvents($this, $this);
- }
- public function onDisable() {
- $this->getLogger()->warning("Plugin disabled ;cc");
- }
- public function onCommand($sender, $command, $label, $args) {
- if(strtolower($command->getName()) == "test") {
- $str = "";
- foreach($args as $arg) {
- $str += $args + " ";
- }
- unset($arg);
- $sender->sendMessage("HELLO NURD, YOUR ARGS ARE " + strtoupper($str));
- return true;
- }
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement