diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java | 10 | ||||
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftEvokerFangs.java | 15 |
2 files changed, 24 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java index a5eeee5e..6e888d57 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java @@ -25,4 +25,14 @@ public class CraftEvoker extends CraftMonster implements Evoker { public EntityType getType() { return EntityType.EVOKER; } + + @Override + public Spell getCurrentSpell() { + return Spell.values()[getHandle().getSpell()]; + } + + @Override + public void setCurrentSpell(Spell spell) { + getHandle().a(spell == null ? 0 : spell.ordinal()); + } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEvokerFangs.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEvokerFangs.java index a9f086bf..249756f5 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEvokerFangs.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEvokerFangs.java @@ -1,10 +1,11 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.Entity; import net.minecraft.server.EntityEvokerFangs; +import net.minecraft.server.EntityLiving; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.EntityType; import org.bukkit.entity.EvokerFangs; +import org.bukkit.entity.LivingEntity; public class CraftEvokerFangs extends CraftEntity implements EvokerFangs { @@ -26,4 +27,16 @@ public class CraftEvokerFangs extends CraftEntity implements EvokerFangs { public EntityType getType() { return EntityType.EVOKER_FANGS; } + + @Override + public LivingEntity getOwner() { + EntityLiving owner = getHandle().j(); // PAIL: rename + + return (owner == null) ? null : (LivingEntity) owner.getBukkitEntity(); + } + + @Override + public void setOwner(LivingEntity owner) { + getHandle().a(owner == null ? null : ((CraftLivingEntity) owner).getHandle()); + } } |