Check if player world is null on instance leave.

This commit is contained in:
MobiusDevelopment 2021-09-28 11:30:17 +00:00
parent b3562ed5c7
commit 0b33663f07
19 changed files with 38 additions and 19 deletions

View File

@ -817,7 +817,8 @@ public class Instance implements IIdentifiable, INamable
*/
public void ejectPlayer(PlayerInstance player)
{
if (player.getInstanceWorld().equals(this))
final Instance world = player.getInstanceWorld();
if ((world != null) && world.equals(this))
{
final Location loc = _template.getExitLocation(player);
if (loc != null)

View File

@ -817,7 +817,8 @@ public class Instance implements IIdentifiable, INamable
*/
public void ejectPlayer(PlayerInstance player)
{
if (player.getInstanceWorld().equals(this))
final Instance world = player.getInstanceWorld();
if ((world != null) && world.equals(this))
{
final Location loc = _template.getExitLocation(player);
if (loc != null)

View File

@ -817,7 +817,8 @@ public class Instance implements IIdentifiable, INamable
*/
public void ejectPlayer(PlayerInstance player)
{
if (player.getInstanceWorld().equals(this))
final Instance world = player.getInstanceWorld();
if ((world != null) && world.equals(this))
{
final Location loc = _template.getExitLocation(player);
if (loc != null)

View File

@ -817,7 +817,8 @@ public class Instance implements IIdentifiable, INamable
*/
public void ejectPlayer(PlayerInstance player)
{
if (player.getInstanceWorld().equals(this))
final Instance world = player.getInstanceWorld();
if ((world != null) && world.equals(this))
{
final Location loc = _template.getExitLocation(player);
if (loc != null)

View File

@ -817,7 +817,8 @@ public class Instance implements IIdentifiable, INamable
*/
public void ejectPlayer(PlayerInstance player)
{
if (player.getInstanceWorld().equals(this))
final Instance world = player.getInstanceWorld();
if ((world != null) && world.equals(this))
{
final Location loc = _template.getExitLocation(player);
if (loc != null)

View File

@ -817,7 +817,8 @@ public class Instance implements IIdentifiable, INamable
*/
public void ejectPlayer(PlayerInstance player)
{
if (player.getInstanceWorld().equals(this))
final Instance world = player.getInstanceWorld();
if ((world != null) && world.equals(this))
{
final Location loc = _template.getExitLocation(player);
if (loc != null)

View File

@ -817,7 +817,8 @@ public class Instance implements IIdentifiable, INamable
*/
public void ejectPlayer(PlayerInstance player)
{
if (player.getInstanceWorld().equals(this))
final Instance world = player.getInstanceWorld();
if ((world != null) && world.equals(this))
{
final Location loc = _template.getExitLocation(player);
if (loc != null)

View File

@ -817,7 +817,8 @@ public class Instance implements IIdentifiable, INamable
*/
public void ejectPlayer(PlayerInstance player)
{
if (player.getInstanceWorld().equals(this))
final Instance world = player.getInstanceWorld();
if ((world != null) && world.equals(this))
{
final Location loc = _template.getExitLocation(player);
if (loc != null)

View File

@ -817,7 +817,8 @@ public class Instance implements IIdentifiable, INamable
*/
public void ejectPlayer(PlayerInstance player)
{
if (player.getInstanceWorld().equals(this))
final Instance world = player.getInstanceWorld();
if ((world != null) && world.equals(this))
{
final Location loc = _template.getExitLocation(player);
if (loc != null)

View File

@ -817,7 +817,8 @@ public class Instance implements IIdentifiable, INamable
*/
public void ejectPlayer(PlayerInstance player)
{
if (player.getInstanceWorld().equals(this))
final Instance world = player.getInstanceWorld();
if ((world != null) && world.equals(this))
{
final Location loc = _template.getExitLocation(player);
if (loc != null)

View File

@ -817,7 +817,8 @@ public class Instance implements IIdentifiable, INamable
*/
public void ejectPlayer(PlayerInstance player)
{
if (player.getInstanceWorld().equals(this))
final Instance world = player.getInstanceWorld();
if ((world != null) && world.equals(this))
{
final Location loc = _template.getExitLocation(player);
if (loc != null)

View File

@ -817,7 +817,8 @@ public class Instance implements IIdentifiable, INamable
*/
public void ejectPlayer(PlayerInstance player)
{
if (player.getInstanceWorld().equals(this))
final Instance world = player.getInstanceWorld();
if ((world != null) && world.equals(this))
{
final Location loc = _template.getExitLocation(player);
if (loc != null)

View File

@ -817,7 +817,8 @@ public class Instance implements IIdentifiable, INamable
*/
public void ejectPlayer(PlayerInstance player)
{
if (player.getInstanceWorld().equals(this))
final Instance world = player.getInstanceWorld();
if ((world != null) && world.equals(this))
{
final Location loc = _template.getExitLocation(player);
if (loc != null)

View File

@ -817,7 +817,8 @@ public class Instance implements IIdentifiable, INamable
*/
public void ejectPlayer(PlayerInstance player)
{
if (player.getInstanceWorld().equals(this))
final Instance world = player.getInstanceWorld();
if ((world != null) && world.equals(this))
{
final Location loc = _template.getExitLocation(player);
if (loc != null)

View File

@ -817,7 +817,8 @@ public class Instance implements IIdentifiable, INamable
*/
public void ejectPlayer(PlayerInstance player)
{
if (player.getInstanceWorld().equals(this))
final Instance world = player.getInstanceWorld();
if ((world != null) && world.equals(this))
{
final Location loc = _template.getExitLocation(player);
if (loc != null)

View File

@ -817,7 +817,8 @@ public class Instance implements IIdentifiable, INamable
*/
public void ejectPlayer(PlayerInstance player)
{
if (player.getInstanceWorld().equals(this))
final Instance world = player.getInstanceWorld();
if ((world != null) && world.equals(this))
{
final Location loc = _template.getExitLocation(player);
if (loc != null)

View File

@ -817,7 +817,8 @@ public class Instance implements IIdentifiable, INamable
*/
public void ejectPlayer(PlayerInstance player)
{
if (player.getInstanceWorld().equals(this))
final Instance world = player.getInstanceWorld();
if ((world != null) && world.equals(this))
{
final Location loc = _template.getExitLocation(player);
if (loc != null)

View File

@ -817,7 +817,8 @@ public class Instance implements IIdentifiable, INamable
*/
public void ejectPlayer(PlayerInstance player)
{
if (player.getInstanceWorld().equals(this))
final Instance world = player.getInstanceWorld();
if ((world != null) && world.equals(this))
{
final Location loc = _template.getExitLocation(player);
if (loc != null)

View File

@ -817,7 +817,8 @@ public class Instance implements IIdentifiable, INamable
*/
public void ejectPlayer(PlayerInstance player)
{
if (player.getInstanceWorld().equals(this))
final Instance world = player.getInstanceWorld();
if ((world != null) && world.equals(this))
{
final Location loc = _template.getExitLocation(player);
if (loc != null)