Generic cleanup of warnings, whitespace and style.
By: Erik Broes <erikbroes@grum.nl>
This commit is contained in:
@@ -6,17 +6,18 @@ import org.bukkit.map.MapView;
|
||||
/**
|
||||
* Called when a map is initialized.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class MapInitializeEvent extends ServerEvent {
|
||||
private final MapView mapView;
|
||||
|
||||
|
||||
public MapInitializeEvent(MapView mapView) {
|
||||
super(Event.Type.MAP_INITIALIZE);
|
||||
this.mapView = mapView;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the map initialized in this event.
|
||||
*
|
||||
*
|
||||
* @return Map for this event
|
||||
*/
|
||||
public MapView getMap() {
|
||||
|
||||
@@ -5,6 +5,7 @@ import org.bukkit.plugin.Plugin;
|
||||
/**
|
||||
* Called when a plugin is disabled.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PluginDisableEvent extends PluginEvent {
|
||||
public PluginDisableEvent(Plugin plugin) {
|
||||
super(Type.PLUGIN_DISABLE, plugin);
|
||||
|
||||
@@ -5,6 +5,7 @@ import org.bukkit.plugin.Plugin;
|
||||
/**
|
||||
* Called when a plugin is enabled.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PluginEnableEvent extends PluginEvent {
|
||||
public PluginEnableEvent(Plugin plugin) {
|
||||
super(Type.PLUGIN_ENABLE, plugin);
|
||||
|
||||
@@ -5,6 +5,7 @@ import org.bukkit.plugin.Plugin;
|
||||
/**
|
||||
* Used for plugin enable and disable events
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PluginEvent extends ServerEvent {
|
||||
private final Plugin plugin;
|
||||
|
||||
|
||||
@@ -6,9 +6,11 @@ import org.bukkit.command.ConsoleCommandSender;
|
||||
/**
|
||||
* Server Command events
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class ServerCommandEvent extends ServerEvent {
|
||||
private String command;
|
||||
private CommandSender sender;
|
||||
|
||||
@Deprecated
|
||||
public ServerCommandEvent(ConsoleCommandSender console, String message) {
|
||||
this(Type.SERVER_COMMAND, console, message);
|
||||
@@ -40,6 +42,7 @@ public class ServerCommandEvent extends ServerEvent {
|
||||
|
||||
/**
|
||||
* Get the command sender.
|
||||
*
|
||||
* @return The sender
|
||||
*/
|
||||
public CommandSender getSender() {
|
||||
|
||||
@@ -5,6 +5,7 @@ import org.bukkit.event.Event;
|
||||
/**
|
||||
* Miscellaneous server events
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class ServerEvent extends Event {
|
||||
public ServerEvent(final Type type) {
|
||||
super(type);
|
||||
|
||||
@@ -7,13 +7,14 @@ import org.bukkit.event.Event;
|
||||
/**
|
||||
* Called when a server list ping is coming in.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class ServerListPingEvent extends ServerEvent {
|
||||
|
||||
|
||||
private InetAddress address;
|
||||
private String motd;
|
||||
private int numPlayers;
|
||||
private int maxPlayers;
|
||||
|
||||
|
||||
public ServerListPingEvent(InetAddress address, String motd, int numPlayers, int maxPlayers) {
|
||||
super(Event.Type.SERVER_LIST_PING);
|
||||
this.address = address;
|
||||
@@ -24,7 +25,7 @@ public class ServerListPingEvent extends ServerEvent {
|
||||
|
||||
/**
|
||||
* Get the address the ping is coming from.
|
||||
*
|
||||
*
|
||||
* @return the address
|
||||
*/
|
||||
public InetAddress getAddress() {
|
||||
@@ -33,7 +34,7 @@ public class ServerListPingEvent extends ServerEvent {
|
||||
|
||||
/**
|
||||
* Get the message of the day message.
|
||||
*
|
||||
*
|
||||
* @return the message of the day
|
||||
*/
|
||||
public String getMotd() {
|
||||
@@ -42,7 +43,7 @@ public class ServerListPingEvent extends ServerEvent {
|
||||
|
||||
/**
|
||||
* Change the message of the day message.
|
||||
*
|
||||
*
|
||||
* @param motd the message of the day
|
||||
*/
|
||||
public void setMotd(String motd) {
|
||||
@@ -51,7 +52,7 @@ public class ServerListPingEvent extends ServerEvent {
|
||||
|
||||
/**
|
||||
* Get the number of players sent.
|
||||
*
|
||||
*
|
||||
* @return the number of players
|
||||
*/
|
||||
public int getNumPlayers() {
|
||||
@@ -60,7 +61,7 @@ public class ServerListPingEvent extends ServerEvent {
|
||||
|
||||
/**
|
||||
* Get the maximum number of players sent.
|
||||
*
|
||||
*
|
||||
* @return the the maximum number of player
|
||||
*/
|
||||
public int getMaxPlayers() {
|
||||
@@ -69,7 +70,7 @@ public class ServerListPingEvent extends ServerEvent {
|
||||
|
||||
/**
|
||||
* Set the maximum number of players sent.
|
||||
*
|
||||
*
|
||||
* @param maxPlayers the maximum number of player
|
||||
*/
|
||||
public void setMaxPlayers(int maxPlayers) {
|
||||
|
||||
@@ -27,17 +27,17 @@ public class ServerListener implements Listener {
|
||||
* @param event Relevant event details
|
||||
*/
|
||||
public void onServerCommand(ServerCommandEvent event) {}
|
||||
|
||||
|
||||
/**
|
||||
* Called when a map item is initialized (created or loaded into memory)
|
||||
*
|
||||
*
|
||||
* @param event Relevant event details
|
||||
*/
|
||||
public void onMapInitialize(MapInitializeEvent event) {}
|
||||
|
||||
|
||||
/**
|
||||
* Called when a server list ping has come in.
|
||||
*
|
||||
*
|
||||
* @param event Relevant event details
|
||||
*/
|
||||
public void onServerListPing(ServerListPingEvent event) {}
|
||||
|
||||
Reference in New Issue
Block a user