summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorParker Hawke <hawkeboyz2@hotmail.com>2018-09-16 12:57:03 -0400
committermd_5 <git@md-5.net>2018-09-17 16:49:45 +1000
commita222e4a252012ef3b5d6b711f723749ccc14a240 (patch)
tree31f215759d73a70377ad5951f7ade2093c82d717 /src
parent79ada744cba8ddec39bd65adc12adefa9c8a45d3 (diff)
downloadcraftbukkit-a222e4a252012ef3b5d6b711f723749ccc14a240.tar
craftbukkit-a222e4a252012ef3b5d6b711f723749ccc14a240.tar.gz
craftbukkit-a222e4a252012ef3b5d6b711f723749ccc14a240.tar.lz
craftbukkit-a222e4a252012ef3b5d6b711f723749ccc14a240.tar.xz
craftbukkit-a222e4a252012ef3b5d6b711f723749ccc14a240.zip
Implement BatToggleSleepEvent
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index c1acd202..deb166d7 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -36,6 +36,7 @@ import org.bukkit.craftbukkit.util.CraftDamageSource;
import org.bukkit.craftbukkit.util.CraftMagicNumbers;
import org.bukkit.entity.AreaEffectCloud;
import org.bukkit.entity.Arrow;
+import org.bukkit.entity.Bat;
import org.bukkit.entity.Creeper;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.ExperienceOrb;
@@ -1122,4 +1123,10 @@ public class CraftEventFactory {
return !event.isCancelled();
}
+
+ public static boolean handleBatToggleSleepEvent(Entity bat, boolean awake) {
+ BatToggleSleepEvent event = new BatToggleSleepEvent((Bat) bat.getBukkitEntity(), awake);
+ Bukkit.getPluginManager().callEvent(event);
+ return !event.isCancelled();
+ }
}