Fix a CCE in MorphDinnerbone
This commit is contained in:
parent
9df5d3e746
commit
0ca4b2041d
@ -23,6 +23,7 @@ import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.CraftWorld;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@ -111,7 +112,14 @@ public class MorphDinnerbone extends MorphGadget implements IPacketHandler
|
||||
if (packetInfo.getPacket() instanceof PacketPlayOutNamedEntitySpawn)
|
||||
{
|
||||
PacketPlayOutNamedEntitySpawn packet = (PacketPlayOutNamedEntitySpawn) packetInfo.getPacket();
|
||||
Player owner = (Player) UtilEnt.getEntityById(packet.a);
|
||||
Entity entity = UtilEnt.getEntityById(packet.a);
|
||||
|
||||
if (!(entity instanceof Player))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Player owner = (Player) entity;
|
||||
if (Manager.getActive(owner, GadgetType.MORPH) == this)
|
||||
{
|
||||
summonForEntity(packetInfo.getPlayer(), owner);
|
||||
|
Loading…
Reference in New Issue
Block a user