@@ -6,4 +6,12 @@ import org.bukkit.event.Event;
|
||||
* Miscellaneous server events
|
||||
*/
|
||||
public abstract class ServerEvent extends Event {
|
||||
|
||||
public ServerEvent() {
|
||||
super();
|
||||
}
|
||||
|
||||
public ServerEvent(boolean isAsync) {
|
||||
super(isAsync);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
|
||||
private int maxPlayers;
|
||||
|
||||
public ServerListPingEvent(@NotNull final InetAddress address, @NotNull final String motd, final int numPlayers, final int maxPlayers) {
|
||||
super(true);
|
||||
Validate.isTrue(numPlayers >= 0, "Cannot have negative number of players online", numPlayers);
|
||||
this.address = address;
|
||||
this.motd = motd;
|
||||
@@ -40,6 +41,7 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
|
||||
* @param maxPlayers the max number of players
|
||||
*/
|
||||
protected ServerListPingEvent(@NotNull final InetAddress address, @NotNull final String motd, final int maxPlayers) {
|
||||
super(true);
|
||||
this.numPlayers = MAGIC_PLAYER_COUNT;
|
||||
this.address = address;
|
||||
this.motd = motd;
|
||||
|
||||
Reference in New Issue
Block a user