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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user