Merge pull request #273 from mverwijs/fix-spigot-utils-players
Fixes incompatibility where utils.players always returns [ ]
This commit is contained in:
commit
e8895d77c0
1 changed files with 3 additions and 2 deletions
|
@ -610,8 +610,9 @@ This function returns a javascript array of player names (as javascript strings)
|
|||
***/
|
||||
function getPlayersBukkit(){
|
||||
var result = [];
|
||||
for (var i = 0; i < server.onlinePlayers.length; i++){
|
||||
result.push(server.onlinePlayers[i]);
|
||||
var players = server.getOnlinePlayers();
|
||||
for (var i = 0; i < players.size(); i++){
|
||||
result.push(players.get(i));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
Reference in a new issue