AdminKill handler null target fix.
Contributed by CostyKiller.
This commit is contained in:
parent
b77aed5b99
commit
1df749fff3
@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
||||
else
|
||||
{
|
||||
final WorldObject obj = activeChar.getTarget();
|
||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
||||
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
||||
else
|
||||
{
|
||||
final WorldObject obj = activeChar.getTarget();
|
||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
||||
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
||||
else
|
||||
{
|
||||
final WorldObject obj = activeChar.getTarget();
|
||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
||||
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
||||
else
|
||||
{
|
||||
final WorldObject obj = activeChar.getTarget();
|
||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
||||
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
||||
else
|
||||
{
|
||||
final WorldObject obj = activeChar.getTarget();
|
||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
||||
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
||||
else
|
||||
{
|
||||
final WorldObject obj = activeChar.getTarget();
|
||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
||||
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
||||
else
|
||||
{
|
||||
final WorldObject obj = activeChar.getTarget();
|
||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
||||
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
||||
else
|
||||
{
|
||||
final WorldObject obj = activeChar.getTarget();
|
||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
||||
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
||||
else
|
||||
{
|
||||
final WorldObject obj = activeChar.getTarget();
|
||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
||||
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
||||
else
|
||||
{
|
||||
final WorldObject obj = activeChar.getTarget();
|
||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
||||
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
||||
else
|
||||
{
|
||||
final WorldObject obj = activeChar.getTarget();
|
||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
||||
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ public class AdminKill implements IAdminCommandHandler
|
||||
else
|
||||
{
|
||||
final WorldObject obj = activeChar.getTarget();
|
||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
||||
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ public class AdminKill implements IAdminCommandHandler
|
||||
else
|
||||
{
|
||||
final WorldObject obj = activeChar.getTarget();
|
||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
||||
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
||||
else
|
||||
{
|
||||
final WorldObject obj = activeChar.getTarget();
|
||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
||||
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
||||
else
|
||||
{
|
||||
final WorldObject obj = activeChar.getTarget();
|
||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
||||
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
||||
else
|
||||
{
|
||||
final WorldObject obj = activeChar.getTarget();
|
||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
||||
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
||||
else
|
||||
{
|
||||
final WorldObject obj = activeChar.getTarget();
|
||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
||||
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
||||
else
|
||||
{
|
||||
final WorldObject obj = activeChar.getTarget();
|
||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
||||
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
||||
else
|
||||
{
|
||||
final WorldObject obj = activeChar.getTarget();
|
||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
||||
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
||||
else
|
||||
{
|
||||
final WorldObject obj = activeChar.getTarget();
|
||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
||||
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
||||
else
|
||||
{
|
||||
final WorldObject obj = activeChar.getTarget();
|
||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
||||
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
||||
else
|
||||
{
|
||||
final WorldObject obj = activeChar.getTarget();
|
||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
||||
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ public class AdminKill implements IAdminCommandHandler
|
||||
else
|
||||
{
|
||||
final WorldObject obj = activeChar.getTarget();
|
||||
if ((obj instanceof ControllableMob) || !obj.isCreature())
|
||||
if ((obj == null) || (obj instanceof ControllableMob) || !obj.isCreature())
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user