How can I add a player to an array on join and CHECK who the player is once in array. Also check if he is in the array
I dont need to save the player because after the game ends. I delete everything for the next set of players. I want to get them when they join add to an array, (team colors). Then CHECK if players are in array and set certain perms to them if they are in that array
https://php.net/arrays so what's wrong? Do you have questions about PHP, or what else do you want to ask? Have you tried reading the arrays documentation linked above?
Code: $a = array( "rock", "stone", "solid" ); $pn = $event->getPlayer()->getName(); if(in_array($pn, $a)){ echo $pn . ' is in array'; // stuf }