Replaced instanceof L2Playable with isPlayable method.

This commit is contained in:
MobiusDev
2018-07-02 00:39:38 +00:00
parent e7ac53ba66
commit 6c1d37f4ae
46 changed files with 62 additions and 79 deletions

View File

@@ -51,7 +51,7 @@ public class AdminLevel implements IAdminCommandHandler
{
try
{
if (targetChar instanceof L2Playable)
if ((targetChar != null) && targetChar.isPlayable())
{
((L2Playable) targetChar).getStat().addLevel(Byte.parseByte(val));
}

View File

@@ -475,7 +475,7 @@ public final class AdminPForge implements IAdminCommandHandler
case "$tboid":
{
target = activeChar.getTarget();
if ((target != null) && (target instanceof L2Playable))
if ((target != null) && target.isPlayable())
{
boat = ((L2Playable) target).getActingPlayer().getBoat();
if (boat != null)