mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-24 09:16:06 +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;
|
package org.bukkit.event.player;
|
||||||
|
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.plugin.AuthorNagException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles all events thrown in relation to a Player
|
* Handles all events thrown in relation to a Player
|
||||||
|
@ -14,20 +13,14 @@ public class PlayerListener implements Listener {
|
||||||
*
|
*
|
||||||
* @param event Relevant event details
|
* @param event Relevant event details
|
||||||
*/
|
*/
|
||||||
public void onPlayerJoin(PlayerJoinEvent event) {
|
public void onPlayerJoin(PlayerJoinEvent event) {}
|
||||||
onPlayerJoin((PlayerEvent) event);
|
|
||||||
throw new AuthorNagException("onPlayerJoin has been replaced with a new signature, (PlayerJoinEvent)");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when a player leaves a server
|
* Called when a player leaves a server
|
||||||
*
|
*
|
||||||
* @param event Relevant event details
|
* @param event Relevant event details
|
||||||
*/
|
*/
|
||||||
public void onPlayerQuit(PlayerQuitEvent event) {
|
public void onPlayerQuit(PlayerQuitEvent event) {}
|
||||||
onPlayerQuit((PlayerEvent) event);
|
|
||||||
throw new AuthorNagException("onPlayerQuit has been replaced with a new signature, (PlayerQuitEvent)");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when a player gets kicked from the server
|
* Called when a player gets kicked from the server
|
||||||
|
@ -49,10 +42,7 @@ public class PlayerListener implements Listener {
|
||||||
*
|
*
|
||||||
* @param event Relevant event details
|
* @param event Relevant event details
|
||||||
*/
|
*/
|
||||||
public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event) {
|
public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event) {}
|
||||||
onPlayerCommandPreprocess((PlayerChatEvent) event);
|
|
||||||
throw new AuthorNagException("onPlayerCommandPreprocess has been replaced with a new signature, (PlayerCommandPreprocessEvent)");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when a player attempts to move location in a world
|
* 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
|
* @param event Relevant event details
|
||||||
*/
|
*/
|
||||||
public void onPlayerTeleport(PlayerTeleportEvent event) {
|
public void onPlayerTeleport(PlayerTeleportEvent event) {}
|
||||||
onPlayerTeleport((PlayerMoveEvent) event);
|
|
||||||
throw new AuthorNagException("onPlayerTeleport has been replaced with a new signature, (PlayerTeleportEvent)");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when a player respawns
|
* Called when a player respawns
|
||||||
|
@ -189,10 +176,4 @@ public class PlayerListener implements Listener {
|
||||||
* @param event Relevant event details
|
* @param event Relevant event details
|
||||||
*/
|
*/
|
||||||
public void onPlayerPortal(PlayerPortalEvent event) {}
|
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;
|
package org.bukkit.event.server;
|
||||||
|
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.plugin.AuthorNagException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles all miscellaneous server events
|
* Handles all miscellaneous server events
|
||||||
|
@ -13,20 +12,14 @@ public class ServerListener implements Listener {
|
||||||
*
|
*
|
||||||
* @param event Relevant event details
|
* @param event Relevant event details
|
||||||
*/
|
*/
|
||||||
public void onPluginEnable(PluginEnableEvent event) {
|
public void onPluginEnable(PluginEnableEvent event) {}
|
||||||
onPluginEnable((PluginEvent) event);
|
|
||||||
throw new AuthorNagException("onPluginEnable has been replaced with a new signature, (PluginEnableEvent)");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when a plugin is disabled
|
* Called when a plugin is disabled
|
||||||
*
|
*
|
||||||
* @param event Relevant event details
|
* @param event Relevant event details
|
||||||
*/
|
*/
|
||||||
public void onPluginDisable(PluginDisableEvent event) {
|
public void onPluginDisable(PluginDisableEvent event) {}
|
||||||
onPluginDisable((PluginEvent) event);
|
|
||||||
throw new AuthorNagException("onPluginDisable has been replaced with a new signature, (PluginDisableEvent)");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when a server command is used
|
* Called when a server command is used
|
||||||
|
@ -34,8 +27,4 @@ public class ServerListener implements Listener {
|
||||||
* @param event Relevant event details
|
* @param event Relevant event details
|
||||||
*/
|
*/
|
||||||
public void onServerCommand(ServerCommandEvent event) {}
|
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;
|
package org.bukkit.event.vehicle;
|
||||||
|
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.plugin.AuthorNagException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Listener for vehicle events.
|
* Listener for vehicle events.
|
||||||
|
@ -73,11 +72,5 @@ public class VehicleListener implements Listener {
|
||||||
*
|
*
|
||||||
* @param event
|
* @param event
|
||||||
*/
|
*/
|
||||||
public void onVehicleUpdate(VehicleUpdateEvent 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) {}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package org.bukkit.event.world;
|
package org.bukkit.event.world;
|
||||||
|
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.plugin.AuthorNagException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles all World related events
|
* Handles all World related events
|
||||||
|
@ -50,10 +49,7 @@ public class WorldListener implements Listener {
|
||||||
*
|
*
|
||||||
* @param event Relevant event details
|
* @param event Relevant event details
|
||||||
*/
|
*/
|
||||||
public void onWorldSave(WorldSaveEvent event) {
|
public void onWorldSave(WorldSaveEvent event) {}
|
||||||
onWorldSave((WorldEvent) event);
|
|
||||||
throw new AuthorNagException("onWorldSave has been replaced with a new signature, (WorldSaveEvent)");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when a World is initializing
|
* Called when a World is initializing
|
||||||
|
@ -68,10 +64,7 @@ public class WorldListener implements Listener {
|
||||||
*
|
*
|
||||||
* @param event Relevant event details
|
* @param event Relevant event details
|
||||||
*/
|
*/
|
||||||
public void onWorldLoad(WorldLoadEvent event) {
|
public void onWorldLoad(WorldLoadEvent event) {}
|
||||||
onWorldLoad((WorldEvent) event);
|
|
||||||
throw new AuthorNagException("onWorldLoad has been replaced with a new signature, (WorldLoadEvent)");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when a World is unloaded
|
* Called when a World is unloaded
|
||||||
|
@ -79,8 +72,4 @@ public class WorldListener implements Listener {
|
||||||
* @param event Relevant event details
|
* @param event Relevant event details
|
||||||
*/
|
*/
|
||||||
public void onWorldUnload(WorldUnloadEvent event) { }
|
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());
|
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
|
* Sets the type of this coal
|
||||||
*
|
*
|
||||||
|
|
|
@ -33,17 +33,6 @@ public class Crops extends MaterialData {
|
||||||
super(type, data);
|
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
|
* Gets the current growth state of this crop
|
||||||
*
|
*
|
||||||
|
@ -53,17 +42,6 @@ public class Crops extends MaterialData {
|
||||||
return CropState.getByData(getData());
|
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
|
* Sets the growth state of this crop
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue