From 1a68a2aafe530f543245e2aa76ff2efd81361515 Mon Sep 17 00:00:00 2001 From: Dinnerbone Date: Thu, 21 Apr 2011 16:15:44 +0100 Subject: [PATCH] Implemented Creeper.is/setPowered --- .../org/bukkit/craftbukkit/entity/CraftCreeper.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java index a41d0c3c97..8f421a905c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java @@ -15,4 +15,16 @@ public class CraftCreeper extends CraftMonster implements Creeper { return "CraftCreeper"; } + public boolean isPowered() { + return getHandle().W().a(17) == 1; + } + + public void setPowered(boolean powered) { + if (powered) { + getHandle().W().a(17, 1); + } else { + getHandle().W().a(17, 0); + } + } + }