1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-12-01 15:03:36 +01:00

Double check for world name existence before trying to get one.

This commit is contained in:
Zrips 2018-02-13 14:56:01 +02:00
parent 7e33b2d8eb
commit 21a6852a1c

View File

@ -91,6 +91,8 @@ public class blockLoc {
} }
public Location getLocation() { public Location getLocation() {
if (worldName == null && this.w == null)
return null;
World w = this.w == null ? Bukkit.getWorld(worldName) : this.w; World w = this.w == null ? Bukkit.getWorld(worldName) : this.w;
if (w == null) if (w == null)
return null; return null;