mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 11:44:19 +01:00
Removing 14 deprecated methods per http://bit.ly/mO2f4d
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
876c4074ba
commit
dc11d556ba
6 changed files with 9 additions and 90 deletions
|
@ -1,7 +1,6 @@
|
|||
package org.bukkit.event.player;
|
||||
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.plugin.AuthorNagException;
|
||||
|
||||
/**
|
||||
* Handles all events thrown in relation to a Player
|
||||
|
@ -14,20 +13,14 @@ public class PlayerListener implements Listener {
|
|||
*
|
||||
* @param event Relevant event details
|
||||
*/
|
||||
public void onPlayerJoin(PlayerJoinEvent event) {
|
||||
onPlayerJoin((PlayerEvent) event);
|
||||
throw new AuthorNagException("onPlayerJoin has been replaced with a new signature, (PlayerJoinEvent)");
|
||||
}
|
||||
public void onPlayerJoin(PlayerJoinEvent event) {}
|
||||
|
||||
/**
|
||||
* Called when a player leaves a server
|
||||
*
|
||||
* @param event Relevant event details
|
||||
*/
|
||||
public void onPlayerQuit(PlayerQuitEvent event) {
|
||||
onPlayerQuit((PlayerEvent) event);
|
||||
throw new AuthorNagException("onPlayerQuit has been replaced with a new signature, (PlayerQuitEvent)");
|
||||
}
|
||||
public void onPlayerQuit(PlayerQuitEvent event) {}
|
||||
|
||||
/**
|
||||
* Called when a player gets kicked from the server
|
||||
|
@ -49,10 +42,7 @@ public class PlayerListener implements Listener {
|
|||
*
|
||||
* @param event Relevant event details
|
||||
*/
|
||||
public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event) {
|
||||
onPlayerCommandPreprocess((PlayerChatEvent) event);
|
||||
throw new AuthorNagException("onPlayerCommandPreprocess has been replaced with a new signature, (PlayerCommandPreprocessEvent)");
|
||||
}
|
||||
public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event) {}
|
||||
|
||||
/**
|
||||
* Called when a player attempts to move location in a world
|
||||
|
@ -66,10 +56,7 @@ public class PlayerListener implements Listener {
|
|||
*
|
||||
* @param event Relevant event details
|
||||
*/
|
||||
public void onPlayerTeleport(PlayerTeleportEvent event) {
|
||||
onPlayerTeleport((PlayerMoveEvent) event);
|
||||
throw new AuthorNagException("onPlayerTeleport has been replaced with a new signature, (PlayerTeleportEvent)");
|
||||
}
|
||||
public void onPlayerTeleport(PlayerTeleportEvent event) {}
|
||||
|
||||
/**
|
||||
* Called when a player respawns
|
||||
|
@ -189,10 +176,4 @@ public class PlayerListener implements Listener {
|
|||
* @param event Relevant event details
|
||||
*/
|
||||
public void onPlayerPortal(PlayerPortalEvent event) {}
|
||||
|
||||
// TODO: Remove after RB
|
||||
@Deprecated public void onPlayerQuit(PlayerEvent event) {}
|
||||
@Deprecated public void onPlayerCommandPreprocess(PlayerChatEvent event) {}
|
||||
@Deprecated public void onPlayerTeleport(PlayerMoveEvent event) {}
|
||||
@Deprecated public void onPlayerJoin(PlayerEvent event) {}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package org.bukkit.event.server;
|
||||
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.plugin.AuthorNagException;
|
||||
|
||||
/**
|
||||
* Handles all miscellaneous server events
|
||||
|
@ -13,20 +12,14 @@ public class ServerListener implements Listener {
|
|||
*
|
||||
* @param event Relevant event details
|
||||
*/
|
||||
public void onPluginEnable(PluginEnableEvent event) {
|
||||
onPluginEnable((PluginEvent) event);
|
||||
throw new AuthorNagException("onPluginEnable has been replaced with a new signature, (PluginEnableEvent)");
|
||||
}
|
||||
public void onPluginEnable(PluginEnableEvent event) {}
|
||||
|
||||
/**
|
||||
* Called when a plugin is disabled
|
||||
*
|
||||
* @param event Relevant event details
|
||||
*/
|
||||
public void onPluginDisable(PluginDisableEvent event) {
|
||||
onPluginDisable((PluginEvent) event);
|
||||
throw new AuthorNagException("onPluginDisable has been replaced with a new signature, (PluginDisableEvent)");
|
||||
}
|
||||
public void onPluginDisable(PluginDisableEvent event) {}
|
||||
|
||||
/**
|
||||
* Called when a server command is used
|
||||
|
@ -34,8 +27,4 @@ public class ServerListener implements Listener {
|
|||
* @param event Relevant event details
|
||||
*/
|
||||
public void onServerCommand(ServerCommandEvent event) {}
|
||||
|
||||
// TODO: Remove after RB
|
||||
@Deprecated public void onPluginDisable(PluginEvent event) {}
|
||||
@Deprecated public void onPluginEnable(PluginEvent event) {}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package org.bukkit.event.vehicle;
|
||||
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.plugin.AuthorNagException;
|
||||
|
||||
/**
|
||||
* Listener for vehicle events.
|
||||
|
@ -73,11 +72,5 @@ public class VehicleListener implements Listener {
|
|||
*
|
||||
* @param event
|
||||
*/
|
||||
public void onVehicleUpdate(VehicleUpdateEvent event) {
|
||||
onVehicleUpdate((VehicleEvent) event);
|
||||
throw new AuthorNagException("onVehicleUpdate has been replaced with a new signature, (VehicleUpdateEvent)");
|
||||
}
|
||||
|
||||
// TODO: Remove after RB
|
||||
@Deprecated public void onVehicleUpdate(VehicleEvent event) {}
|
||||
public void onVehicleUpdate(VehicleUpdateEvent event) {}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package org.bukkit.event.world;
|
||||
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.plugin.AuthorNagException;
|
||||
|
||||
/**
|
||||
* Handles all World related events
|
||||
|
@ -50,10 +49,7 @@ public class WorldListener implements Listener {
|
|||
*
|
||||
* @param event Relevant event details
|
||||
*/
|
||||
public void onWorldSave(WorldSaveEvent event) {
|
||||
onWorldSave((WorldEvent) event);
|
||||
throw new AuthorNagException("onWorldSave has been replaced with a new signature, (WorldSaveEvent)");
|
||||
}
|
||||
public void onWorldSave(WorldSaveEvent event) {}
|
||||
|
||||
/**
|
||||
* Called when a World is initializing
|
||||
|
@ -68,10 +64,7 @@ public class WorldListener implements Listener {
|
|||
*
|
||||
* @param event Relevant event details
|
||||
*/
|
||||
public void onWorldLoad(WorldLoadEvent event) {
|
||||
onWorldLoad((WorldEvent) event);
|
||||
throw new AuthorNagException("onWorldLoad has been replaced with a new signature, (WorldLoadEvent)");
|
||||
}
|
||||
public void onWorldLoad(WorldLoadEvent event) {}
|
||||
|
||||
/**
|
||||
* Called when a World is unloaded
|
||||
|
@ -79,8 +72,4 @@ public class WorldListener implements Listener {
|
|||
* @param event Relevant event details
|
||||
*/
|
||||
public void onWorldUnload(WorldUnloadEvent event) { }
|
||||
|
||||
// TODO: Remove after RB
|
||||
@Deprecated public void onWorldLoad(WorldEvent event) {}
|
||||
@Deprecated public void onWorldSave(WorldEvent event) {}
|
||||
}
|
||||
|
|
|
@ -42,17 +42,6 @@ public class Coal extends MaterialData {
|
|||
return CoalType.getByData(getData());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the type of this coal
|
||||
*
|
||||
* @param type New type of this coal
|
||||
* @deprecated use {@link #setType(CoalType)} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public void setSpecies(CoalType type) {
|
||||
setType(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the type of this coal
|
||||
*
|
||||
|
|
|
@ -33,17 +33,6 @@ public class Crops extends MaterialData {
|
|||
super(type, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the current growth state of this crop
|
||||
*
|
||||
* @return CropState of this leave
|
||||
* @deprecated use {@link #getState()} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public CropState getSpecies() {
|
||||
return getState();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the current growth state of this crop
|
||||
*
|
||||
|
@ -53,17 +42,6 @@ public class Crops extends MaterialData {
|
|||
return CropState.getByData(getData());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the growth state of this crop
|
||||
*
|
||||
* @param state New growth state of this crop
|
||||
* @deprecated use {@link #setState(CropState)} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public void setSpecies(CropState state) {
|
||||
setState(state);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the growth state of this crop
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue