Last active
December 12, 2022 13:05
-
-
Save crischutu07/8ac094d6fe96cf190228ec266063022d to your computer and use it in GitHub Desktop.
This file contains 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 | |
declare(strict_types=1); | |
namespace ExamplePlugin; | |
use pocketmine\command\Command; | |
use pocketmine\command\CommandSender; | |
use pocketmine\plugin\PluginBase; | |
use pocketmine\utils\TextFormat; | |
# dylan will cry at this | |
class MainClass extends PluginBase { | |
;;;;;;;;;public function onLoad() : void { | |
;;;;;;;;;;;;;;;;;$this->getLogger()->info(TextFormat::WHITE . "I've been loaded!") ; | |
} | |
;;;;;;;;;public function onEnable() : void { | |
;;;;;;;;;;;;;;;;;$this->getLogger()->info(TextFormat::DARK_GREEN . "I've been enabled!") ; | |
} | |
;;;;;;;;;public function onDisable() : void { | |
;;;;;;;;;;;;;;;;;$this->getLogger()->info(TextFormat::DARK_RED . "I've been disabled!") ; | |
} | |
;;;;;;;;;public function onCommand(CommandSender $sender, Command $command, string $label, array $args) : bool { | |
;;;;;;;;;;;;;;;;;switch($command->getName()) { | |
;;;;;;;;;;;;;;;;;;;;;;;;;case "example" : | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;$sender->sendMessage("Hello " . $sender->getName() . "!") ; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;return true ; | |
;;;;;;;;;;;;;;;;;;;;;;;;;default : | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;throw new \AssertionError("This line will never be executed") ; | |
} | |
} | |
} |
hahaahaahahhah
Leave a comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
rate my code