Added ghost ability for mobs.

This commit is contained in:
Jonathan Williams 2013-12-12 02:19:58 -08:00
parent 97d8923678
commit d6544202f0
6 changed files with 13 additions and 3 deletions

Binary file not shown.

View File

@ -19,12 +19,12 @@ import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.block.BlockFace;
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftLivingEntity;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Giant;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftCreature;
import org.bukkit.craftbukkit.v1_6_R3.CraftWorld;
@ -43,6 +43,14 @@ public class UtilEnt
return _nameMap;
}
public static void ghost(Entity entity, boolean ghost)
{
if (entity instanceof LivingEntity)
{
((CraftLivingEntity)entity).getHandle().ghost = ghost;
}
}
public static void Vegetate(Entity entity)
{
try

View File

@ -37,7 +37,7 @@ public class Halloween2013_BatGun extends ItemGadget
private HashMap<Player, Location> _velocity = new HashMap<Player, Location>();
private HashMap<Player, ArrayList<Bat>> _bats = new HashMap<Player, ArrayList<Bat>>();
public Halloween2013_BatGun(GadgetManager manager)
public Halloween2013_BatGun(GadgetManager manager)
{
super(manager, "Bat Blaster", new String[]
{

View File

@ -42,6 +42,7 @@ import net.minecraft.server.v1_6_R3.Vec3D;
import net.minecraft.server.v1_6_R3.World;
import net.minecraft.server.v1_6_R3.WorldServer;
// CraftBukkit start
import org.bukkit.Bukkit;
import org.bukkit.Location;

View File

@ -39,7 +39,7 @@ public class GameFactory
{
private ArcadeManager _manager;
public GameFactory(ArcadeManager gameManager)
public GameFactory(ArcadeManager gameManager)
{
_manager = gameManager;
}

View File

@ -126,6 +126,7 @@ public abstract class Kit implements Listener
}
UtilEnt.Vegetate(entity);
UtilEnt.ghost(entity, true);
SpawnCustom(entity);