public function onPreQuery(\mysqli $db)
 {
     $r = $db->query("SELECT COUNT(*) AS cnt FROM teams WHERE name={$this->esc($this->teamName)}");
     $cnt = (int) $r->fetch_assoc()["cnt"];
     $r->close();
     if ($cnt !== 0) {
         throw new \Exception(Phrases::CMD_TEAM_CREATE_ALREADY_EXISTS);
     }
     parent::onPreQuery($db);
 }
 public function __construct(BasePlugin $main, $uid, $clientId, $id, $points, CommandSender $issuer, $msg)
 {
     $this->uid = $uid;
     $this->clientId = $clientId;
     $this->id = $id;
     $this->points = $points;
     $this->issuer = $main->storeObject($issuer);
     $this->msg = $msg;
     //		$this->expiry = ($this->creation = time()) + $duration;
     $this->creation = time();
     $this->expiry = PHP_INT_MAX;
     parent::__construct($main, self::WARNING);
 }
 public function __construct(BasePlugin $plugin, Player $player)
 {
     $this->sesId = $player->getId();
     parent::__construct($plugin, self::USER);
 }
 public function __construct(BasePlugin $main, $value)
 {
     $this->value = $value;
     parent::__construct($main, self::LABEL);
 }