I was wondering if there was a way you can place a player in a group via a case.. Ok let me get a bit deeper into this. You have a team. You store the team data in a variable. PHP: // keep track of all pointspublic $redTeamPlayers = [ ];public $blueTeamPLayers = [ ];public $gameStats = [ ]; Above Code Taken from https://github.com/minecraftgenius76/CaptureTheFlag/blob/master/src/mcg76/game/ctf/CTFPlugIn.php You run the command. /team and it would randomly place you in a group! Each Team ( Red & Blue ) would not be able to pvp other players on there team. Is there a way I can track kills by team ? Such as the capture the flag plugin logs that type of data? Also was wondering if I could implement this into my plugin. https://github.com/minecraftgenius76/CaptureTheFlag/blob/master/src/mcg76/game/ctf/CTFGameKit.php which is the Kits per team! Im new to the API , lol sorry I know php pretty good got done 49% on Code Academy! So I m just looking for help. All i have is the case code where they run the command and a empty space for thixz
PHP: const RED = 0;const BLUE = 1;private $teams;public function init() { $this->teams = [self::RED => [], self::BLUE => []];} public function enterTeam(Player $player) { $this->teams[$team = array_rand($this->teams)][] = $player;}