public function giveGun($player, BaseGun $gun) { switch ($this->players[$player][2]) { case self::TEAM_RED: $color = [247, 2, 9]; break; case self::TEAM_BLUE: $color = [40, 45, 208]; break; break; default: return false; } $gun->setColor($color); $this->players[$player][0] = $gun; return true; }
public function __construct(MineCombat $plugin, Player $player, $color = [175, 175, 175]) { parent::__construct($plugin, $player, 30, 50, $color); }