mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-17 23:01:01 +01:00
Force compile-time failures for the subtle changes done in the API
By: Erik Broes <erikbroes@grum.nl>
This commit is contained in:
parent
2e99a0f17d
commit
db5dfb3f10
5 changed files with 24 additions and 0 deletions
|
@ -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) {}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue