Check for warp file before loading
This commit is contained in:
parent
2bf5299a16
commit
da996714a1
|
@ -163,7 +163,9 @@ public class WarpSignsManager {
|
|||
private void loadWarpList() {
|
||||
addon.getLogger().info("Loading warps...");
|
||||
worldsWarpList = new HashMap<>();
|
||||
WarpsData warps = handler.loadObject("warps");
|
||||
WarpsData warps = new WarpsData();
|
||||
if (handler.objectExists("warps")) {
|
||||
warps = handler.loadObject("warps");
|
||||
// Load into map
|
||||
if (warps != null) {
|
||||
warps.getWarpSigns().forEach((k,v) -> {
|
||||
|
@ -174,6 +176,7 @@ public class WarpSignsManager {
|
|||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes the sign to red if it exists
|
||||
|
|
Loading…
Reference in New Issue