Force compile-time failures for the subtle changes done in the API
This commit is contained in:
parent
a3319e525b
commit
6929a1830e
@ -1,6 +1,7 @@
|
|||||||
package org.bukkit.event.block;
|
package org.bukkit.event.block;
|
||||||
|
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
|
import org.bukkit.plugin.AuthorNagException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles all events thrown in relation to Blocks
|
* Handles all events thrown in relation to Blocks
|
||||||
@ -32,10 +33,16 @@ public class BlockListener implements Listener {
|
|||||||
* Called when a block flows (water/lava)
|
* Called when a block flows (water/lava)
|
||||||
*
|
*
|
||||||
* @param event Relevant event details
|
* @param event Relevant event details
|
||||||
|
* @throws BukkitAuthorNagException
|
||||||
*/
|
*/
|
||||||
public void onBlockFromTo(BlockFromToEvent event) {
|
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
|
* Called when a block gets ignited
|
||||||
*
|
*
|
||||||
|
@ -162,4 +162,10 @@ public class PlayerListener implements Listener {
|
|||||||
*/
|
*/
|
||||||
public void onPlayerBucketEmpty(PlayerBucketEmptyEvent event) {
|
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) {
|
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) {
|
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) {
|
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…
x
Reference in New Issue
Block a user