Added ghost ability for mobs.
This commit is contained in:
parent
97d8923678
commit
d6544202f0
Binary file not shown.
|
@ -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
|
||||
|
|
|
@ -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[]
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -39,7 +39,7 @@ public class GameFactory
|
|||
{
|
||||
private ArcadeManager _manager;
|
||||
|
||||
public GameFactory(ArcadeManager gameManager)
|
||||
public GameFactory(ArcadeManager gameManager)
|
||||
{
|
||||
_manager = gameManager;
|
||||
}
|
||||
|
|
|
@ -126,6 +126,7 @@ public abstract class Kit implements Listener
|
|||
}
|
||||
|
||||
UtilEnt.Vegetate(entity);
|
||||
UtilEnt.ghost(entity, true);
|
||||
|
||||
SpawnCustom(entity);
|
||||
|
||||
|
|
Loading…
Reference in New Issue