/** * Set the displayed maximum number of players. * <p> * The 1.7.2 accepts any value as a player maximum, positive or negative. It even permits a player maximum that * is less than the player count. * @param maximum - maximum player count. */ public void setPlayersMaximum(int maximum) { if (players == null) resetPlayers(); PLAYERS_MAXIMUM.set(players, maximum); }
/** * Set the displayed number of online players. * <p> * As of 1.7.2, this is completely unrestricted, and can be both positive and * negative, as well as higher than the player maximum. * @param online - online players. */ public void setPlayersOnline(int online) { if (players == null) resetPlayers(); PLAYERS_ONLINE.set(players, online); }
/** * Set the displayed list of logged in players. * @param profile - every logged in player. */ public void setPlayers(Iterable<? extends WrappedGameProfile> profile) { if (players == null) resetPlayers(); PLAYERS_PROFILES.set(players, (profile != null) ? PROFILE_CONVERT.getGeneric(profile) : null); }
/** * Construct a new server ping initialized with a zero player count, and zero maximum. * <p> * Note that the version string is set to 1.9.4. */ public WrappedServerPing() { super(MinecraftReflection.getServerPingClass()); setHandle(SERVER_PING_CONSTRUCTOR.invoke()); resetPlayers(); resetVersion(); }