Code: $this->getServer()->getOnlinePlayers()->getInventory()->clearAll(); $this->getServer()->getOnlinePlayers()->kill(); $this->getServer()->getOnlinePlaeyrs()->setGamemode(0); not working. It says "Call to a member function getInventory() on array"
" $this->getServer()->getOnlinePlayers() " works as in array so you can't do some thing with it.. you need to get player by player not all player at once! so use foreach like this: PHP: $players = $this->getServer()->getOnlinePlayers();foreach($players as $player){ //here you can use it for player by player with $player.}