Merge pull request #142 from slipcor/bleeding
1.4.5-R0.3 build 2524 or higher required!
This commit is contained in:
@@ -931,7 +931,7 @@ public class ArenaListener
|
||||
public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event) {
|
||||
Player p = event.getPlayer();
|
||||
|
||||
if (event.isCancelled() || (!arena.inArena(p) && !arena.inLobby(p))) {
|
||||
if (event.isCancelled() || (!arena.inArena(p) && !arena.inSpec(p) && !arena.inLobby(p))) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,12 +5,16 @@ import java.util.List;
|
||||
|
||||
import org.bukkit.DyeColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Creature;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Creeper;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.PigZombie;
|
||||
import org.bukkit.entity.Sheep;
|
||||
import org.bukkit.entity.Skeleton;
|
||||
import org.bukkit.entity.Skeleton.SkeletonType;
|
||||
import org.bukkit.entity.Slime;
|
||||
import org.bukkit.entity.Wolf;
|
||||
|
||||
@@ -70,7 +74,13 @@ public enum MACreature
|
||||
MAGMACUBETINY(EntityType.MAGMA_CUBE), MAGMACUBESTINY(EntityType.MAGMA_CUBE),
|
||||
MAGMACUBESMALL(EntityType.MAGMA_CUBE),MAGMACUBESSMALL(EntityType.MAGMA_CUBE),
|
||||
MAGMACUBEBIG(EntityType.MAGMA_CUBE), MAGMACUBESBIG(EntityType.MAGMA_CUBE),
|
||||
MAGMACUBEHUGE(EntityType.MAGMA_CUBE), MAGMACUBESHUGE(EntityType.MAGMA_CUBE);
|
||||
MAGMACUBEHUGE(EntityType.MAGMA_CUBE), MAGMACUBESHUGE(EntityType.MAGMA_CUBE),
|
||||
|
||||
// 1.4 creatures
|
||||
BAT(EntityType.BAT), BATS(EntityType.BAT),
|
||||
WITCH(EntityType.WITCH), WITCHES(EntityType.WITCH),
|
||||
WITHER(EntityType.WITHER), WITHERS(EntityType.WITHER),
|
||||
WITHERSKELETON(EntityType.SKELETON), WITHERSKELETONS(EntityType.SKELETON);
|
||||
|
||||
private List<DyeColor> colors = Arrays.asList(DyeColor.values());
|
||||
private EntityType type;
|
||||
@@ -134,6 +144,19 @@ public enum MACreature
|
||||
case MAGMACUBESHUGE:
|
||||
((Slime) e).setSize(4);
|
||||
break;
|
||||
case SKELETON:
|
||||
case SKELETONS:
|
||||
((Skeleton) e).getEquipment().setItemInHand(new ItemStack(Material.BOW, 1));
|
||||
break;
|
||||
case ZOMBIEPIGMAN:
|
||||
case ZOMBIEPIGMEN:
|
||||
((PigZombie) e).getEquipment().setItemInHand(new ItemStack(Material.GOLD_SWORD, 1));
|
||||
break;
|
||||
case WITHERSKELETON:
|
||||
case WITHERSKELETONS:
|
||||
((Skeleton) e).getEquipment().setItemInHand(new ItemStack(Material.STONE_SWORD, 1));
|
||||
((Skeleton) e).setSkeletonType(SkeletonType.WITHER);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -3,10 +3,6 @@ package com.garbagemule.MobArena.waves;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.server.WorldServer;
|
||||
|
||||
import org.bukkit.craftbukkit.CraftWorld;
|
||||
import org.bukkit.craftbukkit.entity.CraftEntity;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -55,11 +51,7 @@ public class SheepBouncer implements Runnable
|
||||
// Create an explosion if there's a player amongst the nearby entities.
|
||||
for (Entity entity : e.getNearbyEntities(2D, 2D, 2D)) {
|
||||
if (entity instanceof Player) {
|
||||
CraftEntity ce = (CraftEntity) e;
|
||||
CraftWorld cw = (CraftWorld) e.getWorld();
|
||||
WorldServer ws = cw.getHandle();
|
||||
|
||||
ws.createExplosion(ce.getHandle(), e.getLocation().getX(), e.getLocation().getY() + 1, e.getLocation().getZ(), 2f, false);
|
||||
e.getWorld().createExplosion(e.getLocation(), 2f);
|
||||
e.remove();
|
||||
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user