diff options
author | Parker Hawke <hawkeboyz2@hotmail.com> | 2017-11-07 07:38:58 -0500 |
---|---|---|
committer | md_5 <git@md-5.net> | 2017-11-08 12:33:21 +1100 |
commit | 305df9035faeda09b14f923dc44bdd550d9c9000 (patch) | |
tree | f8afab9fcf3f3f8cfd817c243c6498c0b6d07bff /src/main/java | |
parent | 3e3bbd42724e3c5e691f4aebfbdf5e1e784c1f68 (diff) | |
download | craftbukkit-305df9035faeda09b14f923dc44bdd550d9c9000.tar craftbukkit-305df9035faeda09b14f923dc44bdd550d9c9000.tar.gz craftbukkit-305df9035faeda09b14f923dc44bdd550d9c9000.tar.lz craftbukkit-305df9035faeda09b14f923dc44bdd550d9c9000.tar.xz craftbukkit-305df9035faeda09b14f923dc44bdd550d9c9000.zip |
Implement max fuse tick & explosion radius methods to Creeper
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java index ed771a5b..ffebb54c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java @@ -1,5 +1,6 @@ package org.bukkit.craftbukkit.entity; +import com.google.common.base.Preconditions; import net.minecraft.server.EntityCreeper; import org.bukkit.craftbukkit.CraftServer; @@ -39,6 +40,30 @@ public class CraftCreeper extends CraftMonster implements Creeper { } @Override + public void setMaxFuseTicks(int ticks) { + Preconditions.checkArgument(ticks >= 0, "ticks < 0"); + + getHandle().maxFuseTicks = ticks; + } + + @Override + public int getMaxFuseTicks() { + return getHandle().maxFuseTicks; + } + + @Override + public void setExplosionRadius(int radius) { + Preconditions.checkArgument(radius >= 0, "radius < 0"); + + getHandle().explosionRadius = radius; + } + + @Override + public int getExplosionRadius() { + return getHandle().explosionRadius; + } + + @Override public EntityCreeper getHandle() { return (EntityCreeper) entity; } |