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
|
||||
|
@ -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;
|
||||
|
@ -126,6 +126,7 @@ public abstract class Kit implements Listener
|
||||
}
|
||||
|
||||
UtilEnt.Vegetate(entity);
|
||||
UtilEnt.ghost(entity, true);
|
||||
|
||||
SpawnCustom(entity);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user