Fixed probable Dimensional Warp NPE.

This commit is contained in:
MobiusDevelopment
2020-03-26 11:38:12 +00:00
parent 0ea3ed60b9
commit 28e36d17c6
8 changed files with 32 additions and 0 deletions

View File

@@ -592,6 +592,10 @@ public class DimensionalWrap extends AbstractInstance
} }
case "CHANGE_LOCATION": case "CHANGE_LOCATION":
{ {
if (player == null)
{
return null;
}
final Instance world = player.getInstanceWorld(); final Instance world = player.getInstanceWorld();
if (!isInInstance(world)) if (!isInInstance(world))
{ {

View File

@@ -592,6 +592,10 @@ public class DimensionalWrap extends AbstractInstance
} }
case "CHANGE_LOCATION": case "CHANGE_LOCATION":
{ {
if (player == null)
{
return null;
}
final Instance world = player.getInstanceWorld(); final Instance world = player.getInstanceWorld();
if (!isInInstance(world)) if (!isInInstance(world))
{ {

View File

@@ -592,6 +592,10 @@ public class DimensionalWrap extends AbstractInstance
} }
case "CHANGE_LOCATION": case "CHANGE_LOCATION":
{ {
if (player == null)
{
return null;
}
final Instance world = player.getInstanceWorld(); final Instance world = player.getInstanceWorld();
if (!isInInstance(world)) if (!isInInstance(world))
{ {

View File

@@ -592,6 +592,10 @@ public class DimensionalWrap extends AbstractInstance
} }
case "CHANGE_LOCATION": case "CHANGE_LOCATION":
{ {
if (player == null)
{
return null;
}
final Instance world = player.getInstanceWorld(); final Instance world = player.getInstanceWorld();
if (!isInInstance(world)) if (!isInInstance(world))
{ {

View File

@@ -592,6 +592,10 @@ public class DimensionalWrap extends AbstractInstance
} }
case "CHANGE_LOCATION": case "CHANGE_LOCATION":
{ {
if (player == null)
{
return null;
}
final Instance world = player.getInstanceWorld(); final Instance world = player.getInstanceWorld();
if (!isInInstance(world)) if (!isInInstance(world))
{ {

View File

@@ -592,6 +592,10 @@ public class DimensionalWrap extends AbstractInstance
} }
case "CHANGE_LOCATION": case "CHANGE_LOCATION":
{ {
if (player == null)
{
return null;
}
final Instance world = player.getInstanceWorld(); final Instance world = player.getInstanceWorld();
if (!isInInstance(world)) if (!isInInstance(world))
{ {

View File

@@ -592,6 +592,10 @@ public class DimensionalWrap extends AbstractInstance
} }
case "CHANGE_LOCATION": case "CHANGE_LOCATION":
{ {
if (player == null)
{
return null;
}
final Instance world = player.getInstanceWorld(); final Instance world = player.getInstanceWorld();
if (!isInInstance(world)) if (!isInInstance(world))
{ {

View File

@@ -592,6 +592,10 @@ public class DimensionalWrap extends AbstractInstance
} }
case "CHANGE_LOCATION": case "CHANGE_LOCATION":
{ {
if (player == null)
{
return null;
}
final Instance world = player.getInstanceWorld(); final Instance world = player.getInstanceWorld();
if (!isInInstance(world)) if (!isInInstance(world))
{ {