diff options
author | Wesley Wolfe <weswolf@aol.com> | 2012-11-30 12:07:10 -0600 |
---|---|---|
committer | Wesley Wolfe <weswolf@aol.com> | 2012-11-30 12:07:10 -0600 |
commit | 58c8f0ae30bc4c983dc81451dbd5544fce52054e (patch) | |
tree | 2179f8f50954e4155a9187fa9cc6e5bee850f662 /src/main | |
parent | 6cf0821f0a1ba1173553e70d5d2c0ffc5e86467a (diff) | |
download | bukkit-58c8f0ae30bc4c983dc81451dbd5544fce52054e.tar bukkit-58c8f0ae30bc4c983dc81451dbd5544fce52054e.tar.gz bukkit-58c8f0ae30bc4c983dc81451dbd5544fce52054e.tar.lz bukkit-58c8f0ae30bc4c983dc81451dbd5544fce52054e.tar.xz bukkit-58c8f0ae30bc4c983dc81451dbd5544fce52054e.zip |
Add data values for entity change block event. Adds BUKKIT-3077, BUKKIT-3076
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/bukkit/event/entity/EntityChangeBlockEvent.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/event/entity/EntityChangeBlockEvent.java b/src/main/java/org/bukkit/event/entity/EntityChangeBlockEvent.java index c805e52d..d2b03f48 100644 --- a/src/main/java/org/bukkit/event/entity/EntityChangeBlockEvent.java +++ b/src/main/java/org/bukkit/event/entity/EntityChangeBlockEvent.java @@ -16,12 +16,18 @@ public class EntityChangeBlockEvent extends EntityEvent implements Cancellable { private final Block block; private boolean cancel; private final Material to; + private final byte data; public EntityChangeBlockEvent(final LivingEntity what, final Block block, final Material to) { + this (what, block, to, (byte) 0); + } + + public EntityChangeBlockEvent(final LivingEntity what, final Block block, final Material to, final byte data) { super(what); this.block = block; this.cancel = false; this.to = to; + this.data = data; } @Override @@ -55,6 +61,15 @@ public class EntityChangeBlockEvent extends EntityEvent implements Cancellable { return to; } + /** + * Gets the data for the block that would be changed into + * + * @return the data for the block that would be changed into + */ + public byte getData() { + return data; + } + @Override public HandlerList getHandlers() { return handlers; |