Hi, Having trouble with what should be a very simple task. I want to create a list containing all online players and be able to split them all into strings, thanks in advance for the help. Queepo
Code: int playersOnline = server.getOnlinePlayers().length; String[] players = new String[playersOnline]; for(int i = 0; i < playersOnline; i++){ players[i] = server.getOnlinePlayers()[i].getName(); }
This is something I'll need, but instead of a list, I want to Check. Here is an example: Code: if (server.getOnlinePlayers()[i].getName() == "Liggliluff") I don't know why, but it doesn't recognize me, and when I turn it into a comment, the code inside runs so I'm sure there is a problem with the is-statement. Is there anyone who can help me?