Skip to content

Instantly share code, notes, and snippets.

@crischutu07
Last active December 12, 2022 13:05
Show Gist options
  • Save crischutu07/8ac094d6fe96cf190228ec266063022d to your computer and use it in GitHub Desktop.
Save crischutu07/8ac094d6fe96cf190228ec266063022d to your computer and use it in GitHub Desktop.
<?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") ;
                 }
         }
}
Copy link

ghost commented Dec 12, 2022

hahaahaahahhah

@Endermanbugzjfc
Copy link

Leave a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment