mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-30 14:43:49 +01:00
Fixes NPE in admin tp if nether or end worlds don't exist.
This commit is contained in:
parent
7621677c93
commit
74ded5a187
@ -87,6 +87,10 @@ public class AdminTeleportCommand extends CompositeCommand {
|
||||
world = getPlugin().getIWM().getEndWorld(getWorld());
|
||||
}
|
||||
Location warpSpot = getSpot(world);
|
||||
if (world == null || warpSpot == null) {
|
||||
user.sendMessage("general.errors.no-safe-location-found");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Otherwise, ask the admin to go to a safe spot
|
||||
String failureMessage = user.getTranslation("commands.admin.tp.manual", "[location]", warpSpot.getBlockX() + " " + warpSpot.getBlockY() + " "
|
||||
|
Loading…
Reference in New Issue
Block a user