Exemplo n.º 1
0
 public function onCustomPacketReceiveEvent(\ifteam\CustomPacket\event\CustomPacketReceiveEvent $event)
 {
     $receivedData = (array) json_decode($event->getPacket()->data, true);
     if (is_array($receivedData) && isset($receivedData[3]) && $receivedData[0] == $this->passcode) {
         $this->caster->receive($receivedData[1], $receivedData[2]);
     }
 }
Exemplo n.º 2
0
 public function __construct($plugin, $passcode, PluginData $db)
 {
     if (self::$instance === null) {
         self::$instance = $this;
     }
     parent::__construct();
     $this->db = $db;
     $this->specialCommand = new SpecialCommand();
     $this->server = Server::getInstance();
 }