Changed JavaDoc and added a another method to just get the UUID of all ported players.

This commit is contained in:
fillefilip8 2016-03-05 17:00:07 +01:00
parent f626061a7a
commit db3afc71f8
2 changed files with 18 additions and 0 deletions

View File

@ -127,6 +127,15 @@ public class ViaVersionPlugin extends JavaPlugin implements ViaVersionAPI {
return Collections.unmodifiableList(nonPortedPlayers); return Collections.unmodifiableList(nonPortedPlayers);
} }
@Override
public List<UUID> getPortedPlayersList() {
List<UUID> players = new ArrayList<UUID>();
for(UUID uuid : portedPlayers.keySet()){
players.add(uuid);
}
return Collections.unmodifiableList(players);
}
public void setDebug(boolean value) { public void setDebug(boolean value) {
this.debug = value; this.debug = value;
} }

View File

@ -38,13 +38,22 @@ public interface ViaVersionAPI {
/** /**
* Returns all ported players. (1.9 players) * Returns all ported players. (1.9 players)
* Warning: This returns a unmodifiable map.
* @return Map<UUID, ConnectionInfo> of all ported players. * @return Map<UUID, ConnectionInfo> of all ported players.
*/ */
Map<UUID, ConnectionInfo> getPortedPlayers(); Map<UUID, ConnectionInfo> getPortedPlayers();
/** /**
* Returns all non ported players. (1.8 players) * Returns all non ported players. (1.8 players)
* Warning: This returns a unmodifiable list.
* @return List<UUID> of all non ported players. * @return List<UUID> of all non ported players.
*/ */
List<UUID> getNonPortedPlayers(); List<UUID> getNonPortedPlayers();
/**
* Returns all ported players. (1.9 players)
* Warning: This returns a unmodifiable list.
* @return List<UUID> of all ported players.
*/
List<UUID> getPortedPlayersList();
} }