#1290: Add methods to get/set evoker fang attack delay
By: Jishuna <joshl5324@gmail.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package org.bukkit.craftbukkit.entity;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import net.minecraft.world.entity.EntityLiving;
|
||||
import net.minecraft.world.entity.projectile.EntityEvokerFangs;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
@@ -33,4 +34,16 @@ public class CraftEvokerFangs extends CraftEntity implements EvokerFangs {
|
||||
public void setOwner(LivingEntity owner) {
|
||||
getHandle().setOwner(owner == null ? null : ((CraftLivingEntity) owner).getHandle());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAttackDelay() {
|
||||
return getHandle().warmupDelayTicks;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAttackDelay(int delay) {
|
||||
Preconditions.checkArgument(delay >= 0, "Delay must be positive");
|
||||
|
||||
getHandle().warmupDelayTicks = delay;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user