Fixed restoring instance origin location.

This commit is contained in:
MobiusDevelopment 2021-09-25 06:37:14 +00:00
parent ecf40932ee
commit 5a89263367
19 changed files with 19 additions and 19 deletions

View File

@ -384,7 +384,7 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
{
final PlayerVariables vars = player.getVariables();
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
if (loc.length == 3)
if ((loc != null) && (loc.length == 3))
{
location = new Location(loc[0], loc[1], loc[2]);
vars.remove("INSTANCE_ORIGIN");

View File

@ -384,7 +384,7 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
{
final PlayerVariables vars = player.getVariables();
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
if (loc.length == 3)
if ((loc != null) && (loc.length == 3))
{
location = new Location(loc[0], loc[1], loc[2]);
vars.remove("INSTANCE_ORIGIN");

View File

@ -384,7 +384,7 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
{
final PlayerVariables vars = player.getVariables();
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
if (loc.length == 3)
if ((loc != null) && (loc.length == 3))
{
location = new Location(loc[0], loc[1], loc[2]);
vars.remove("INSTANCE_ORIGIN");

View File

@ -384,7 +384,7 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
{
final PlayerVariables vars = player.getVariables();
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
if (loc.length == 3)
if ((loc != null) && (loc.length == 3))
{
location = new Location(loc[0], loc[1], loc[2]);
vars.remove("INSTANCE_ORIGIN");

View File

@ -384,7 +384,7 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
{
final PlayerVariables vars = player.getVariables();
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
if (loc.length == 3)
if ((loc != null) && (loc.length == 3))
{
location = new Location(loc[0], loc[1], loc[2]);
vars.remove("INSTANCE_ORIGIN");

View File

@ -384,7 +384,7 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
{
final PlayerVariables vars = player.getVariables();
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
if (loc.length == 3)
if ((loc != null) && (loc.length == 3))
{
location = new Location(loc[0], loc[1], loc[2]);
vars.remove("INSTANCE_ORIGIN");

View File

@ -384,7 +384,7 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
{
final PlayerVariables vars = player.getVariables();
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
if (loc.length == 3)
if ((loc != null) && (loc.length == 3))
{
location = new Location(loc[0], loc[1], loc[2]);
vars.remove("INSTANCE_ORIGIN");

View File

@ -384,7 +384,7 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
{
final PlayerVariables vars = player.getVariables();
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
if (loc.length == 3)
if ((loc != null) && (loc.length == 3))
{
location = new Location(loc[0], loc[1], loc[2]);
vars.remove("INSTANCE_ORIGIN");

View File

@ -384,7 +384,7 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
{
final PlayerVariables vars = player.getVariables();
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
if (loc.length == 3)
if ((loc != null) && (loc.length == 3))
{
location = new Location(loc[0], loc[1], loc[2]);
vars.remove("INSTANCE_ORIGIN");

View File

@ -384,7 +384,7 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
{
final PlayerVariables vars = player.getVariables();
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
if (loc.length == 3)
if ((loc != null) && (loc.length == 3))
{
location = new Location(loc[0], loc[1], loc[2]);
vars.remove("INSTANCE_ORIGIN");

View File

@ -384,7 +384,7 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
{
final PlayerVariables vars = player.getVariables();
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
if (loc.length == 3)
if ((loc != null) && (loc.length == 3))
{
location = new Location(loc[0], loc[1], loc[2]);
vars.remove("INSTANCE_ORIGIN");

View File

@ -384,7 +384,7 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
{
final PlayerVariables vars = player.getVariables();
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
if (loc.length == 3)
if ((loc != null) && (loc.length == 3))
{
location = new Location(loc[0], loc[1], loc[2]);
vars.remove("INSTANCE_ORIGIN");

View File

@ -384,7 +384,7 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
{
final PlayerVariables vars = player.getVariables();
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
if (loc.length == 3)
if ((loc != null) && (loc.length == 3))
{
location = new Location(loc[0], loc[1], loc[2]);
vars.remove("INSTANCE_ORIGIN");

View File

@ -384,7 +384,7 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
{
final PlayerVariables vars = player.getVariables();
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
if (loc.length == 3)
if ((loc != null) && (loc.length == 3))
{
location = new Location(loc[0], loc[1], loc[2]);
vars.remove("INSTANCE_ORIGIN");

View File

@ -384,7 +384,7 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
{
final PlayerVariables vars = player.getVariables();
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
if (loc.length == 3)
if ((loc != null) && (loc.length == 3))
{
location = new Location(loc[0], loc[1], loc[2]);
vars.remove("INSTANCE_ORIGIN");

View File

@ -384,7 +384,7 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
{
final PlayerVariables vars = player.getVariables();
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
if (loc.length == 3)
if ((loc != null) && (loc.length == 3))
{
location = new Location(loc[0], loc[1], loc[2]);
vars.remove("INSTANCE_ORIGIN");

View File

@ -384,7 +384,7 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
{
final PlayerVariables vars = player.getVariables();
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
if (loc.length == 3)
if ((loc != null) && (loc.length == 3))
{
location = new Location(loc[0], loc[1], loc[2]);
vars.remove("INSTANCE_ORIGIN");

View File

@ -384,7 +384,7 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
{
final PlayerVariables vars = player.getVariables();
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
if (loc.length == 3)
if ((loc != null) && (loc.length == 3))
{
location = new Location(loc[0], loc[1], loc[2]);
vars.remove("INSTANCE_ORIGIN");

View File

@ -384,7 +384,7 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
{
final PlayerVariables vars = player.getVariables();
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
if (loc.length == 3)
if ((loc != null) && (loc.length == 3))
{
location = new Location(loc[0], loc[1], loc[2]);
vars.remove("INSTANCE_ORIGIN");