summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/bukkit
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/bukkit')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftShulker.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftShulker.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftShulker.java
index eef9d3c5..e8cb697a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftShulker.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftShulker.java
@@ -1,7 +1,8 @@
package org.bukkit.craftbukkit.entity;
-import net.minecraft.server.EntityGolem;
+import com.google.common.base.Preconditions;
import net.minecraft.server.EntityShulker;
+import org.bukkit.DyeColor;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Shulker;
@@ -21,4 +22,16 @@ public class CraftShulker extends CraftGolem implements Shulker {
public EntityShulker getHandle() {
return (EntityShulker) entity;
}
+
+ @Override
+ public DyeColor getColor() {
+ return DyeColor.getByWoolData(getHandle().getDataWatcher().get(EntityShulker.bw));
+ }
+
+ @Override
+ public void setColor(DyeColor color) {
+ Preconditions.checkArgument(color != null, "color");
+
+ getHandle().getDataWatcher().set(EntityShulker.bw, color.getWoolData());
+ }
}