diff options
author | Wesley Wolfe <wesley.d.wolfe+git@gmail.com> | 2014-05-13 20:39:02 -0500 |
---|---|---|
committer | Wesley Wolfe <wesley.d.wolfe+git@gmail.com> | 2014-05-13 20:39:02 -0500 |
commit | 48756ec1d69b68a105e5dd043319c21b4d92ff8a (patch) | |
tree | b7274ceb57de61a018290a74b0a8dde808dcc686 /src | |
parent | 562af14d25bc87162a68e033f59c0b8dba76663b (diff) | |
download | bukkit-48756ec1d69b68a105e5dd043319c21b4d92ff8a.tar bukkit-48756ec1d69b68a105e5dd043319c21b4d92ff8a.tar.gz bukkit-48756ec1d69b68a105e5dd043319c21b4d92ff8a.tar.lz bukkit-48756ec1d69b68a105e5dd043319c21b4d92ff8a.tar.xz bukkit-48756ec1d69b68a105e5dd043319c21b4d92ff8a.zip |
Add awake flag for bats. Adds BUKKIT-5606
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/entity/Bat.java | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/entity/Bat.java b/src/main/java/org/bukkit/entity/Bat.java index a1e400e3..bd73f22e 100644 --- a/src/main/java/org/bukkit/entity/Bat.java +++ b/src/main/java/org/bukkit/entity/Bat.java @@ -3,4 +3,25 @@ package org.bukkit.entity; /** * Represents a Bat */ -public interface Bat extends Ambient {} +public interface Bat extends Ambient { + + /** + * Checks the current waking state of this bat. + * <p> + * This does not imply any persistence of state past the method call. + * + * @return true if the bat is awake or false if it is currently hanging + * from a block + */ + boolean isAwake(); + + /** + * This method modifies the current waking state of this bat. + * <p> + * This does not prevent a bat from spontaneously awaking itself, or from + * reattaching itself to a block. + * + * @param state the new state + */ + void setAwake(boolean state); +} |