Deprecate magic values

By: Wesley Wolfe <weswolf@aol.com>
This commit is contained in:
Bukkit/Spigot
2013-08-19 13:32:18 -05:00
parent d9f3848e22
commit f9bec6eadd
108 changed files with 1194 additions and 11 deletions

View File

@@ -16,8 +16,18 @@ import org.bukkit.event.HandlerList;
public class BlockCanBuildEvent extends BlockEvent {
private static final HandlerList handlers = new HandlerList();
protected boolean buildable;
/**
*
* @deprecated Magic value
*/
@Deprecated
protected int material;
/**
*
* @deprecated Magic value
*/
@Deprecated
public BlockCanBuildEvent(final Block block, final int id, final boolean canBuild) {
super(block);
buildable = canBuild;
@@ -56,7 +66,9 @@ public class BlockCanBuildEvent extends BlockEvent {
* Gets the Material ID for the Material that we are trying to place.
*
* @return The Material ID for the Material that we are trying to place
* @deprecated Magic value
*/
@Deprecated
public int getMaterialId() {
return material;
}

View File

@@ -13,6 +13,11 @@ public class BlockPhysicsEvent extends BlockEvent implements Cancellable {
private final int changed;
private boolean cancel = false;
/**
*
* @deprecated Magic value
*/
@Deprecated
public BlockPhysicsEvent(final Block block, final int changed) {
super(block);
this.changed = changed;
@@ -22,7 +27,9 @@ public class BlockPhysicsEvent extends BlockEvent implements Cancellable {
* Gets the type of block that changed, causing this event
*
* @return Changed block's type id
* @deprecated Magic value
*/
@Deprecated
public int getChangedTypeId() {
return changed;
}