Replaced instanceof L2DoorInstance with isDoor method.

This commit is contained in:
MobiusDev
2018-07-02 01:36:25 +00:00
parent bd285c1368
commit 11760710ee
18 changed files with 26 additions and 36 deletions

View File

@@ -118,7 +118,7 @@ public class AdminDoorControl implements IAdminCommandHandler
else if (command.equals("admin_open"))
{
final L2Object target = activeChar.getTarget();
if (target instanceof L2DoorInstance)
if ((target != null) && target.isDoor())
{
((L2DoorInstance) target).openMe();
}
@@ -130,7 +130,7 @@ public class AdminDoorControl implements IAdminCommandHandler
else if (command.equals("admin_close"))
{
final L2Object target = activeChar.getTarget();
if (target instanceof L2DoorInstance)
if ((target != null) && target.isDoor())
{
((L2DoorInstance) target).closeMe();
}