mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-14 19:55:52 -07:00
Force compile-time failures for the subtle changes done in the API
By: Erik Broes <erikbroes@grum.nl>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package org.bukkit.event.block;
|
||||
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.plugin.AuthorNagException;
|
||||
|
||||
/**
|
||||
* Handles all events thrown in relation to Blocks
|
||||
@@ -32,10 +33,16 @@ public class BlockListener implements Listener {
|
||||
* Called when a block flows (water/lava)
|
||||
*
|
||||
* @param event Relevant event details
|
||||
* @throws BukkitAuthorNagException
|
||||
*/
|
||||
public void onBlockFromTo(BlockFromToEvent event) {
|
||||
onBlockFlow(event);
|
||||
throw new AuthorNagException("onBlockFlow has been deprecated, use onBlockFromTo");
|
||||
}
|
||||
|
||||
// Prevent compilation of old signatures TODO: Remove after 1.4
|
||||
@Deprecated public final void onBlockFlow(BlockFromToEvent event) {}
|
||||
|
||||
/**
|
||||
* Called when a block gets ignited
|
||||
*
|
||||
|
@@ -162,4 +162,10 @@ public class PlayerListener implements Listener {
|
||||
*/
|
||||
public void onPlayerBucketEmpty(PlayerBucketEmptyEvent event) {
|
||||
}
|
||||
|
||||
// Prevent compilation of old signatures TODO: Remove after 1.4
|
||||
@Deprecated public final void onPlayerQuit(PlayerEvent event) {}
|
||||
@Deprecated public final void onPlayerCommandPreprocess(PlayerChatEvent event) {}
|
||||
@Deprecated public final void onPlayerTeleport(PlayerMoveEvent event) {}
|
||||
@Deprecated public final void onPlayerJoin(PlayerEvent event) {}
|
||||
}
|
||||
|
@@ -30,4 +30,8 @@ public class ServerListener implements Listener {
|
||||
*/
|
||||
public void onServerCommand(ServerCommandEvent event) {
|
||||
}
|
||||
|
||||
// Prevent compilation of old signatures TODO: Remove after 1.4
|
||||
@Deprecated public final void onPluginDisable(PluginEvent event) {}
|
||||
@Deprecated public final void onPluginEnable(PluginEvent event) {}
|
||||
}
|
||||
|
@@ -75,4 +75,7 @@ public class VehicleListener implements Listener {
|
||||
*/
|
||||
public void onVehicleUpdate(VehicleUpdateEvent event) {
|
||||
}
|
||||
|
||||
// Prevent compilation of old signatures TODO: Remove after 1.4
|
||||
@Deprecated public final void onVehicleUpdate(VehicleEvent event) {}
|
||||
}
|
||||
|
@@ -38,4 +38,8 @@ public class WorldListener implements Listener {
|
||||
*/
|
||||
public void onWorldLoad(WorldLoadEvent event) {
|
||||
}
|
||||
|
||||
// Prevent compilation of old signatures TODO: Remove after 1.4
|
||||
@Deprecated public final void onWorldLoad(WorldEvent event) {}
|
||||
@Deprecated public final void onWorldSave(WorldEvent event) {}
|
||||
}
|
||||
|
Reference in New Issue
Block a user