From 6653ccfb799cb39feae046749514c8853a860f76 Mon Sep 17 00:00:00 2001 From: graywolf336 Date: Mon, 26 Jan 2015 00:27:49 -0600 Subject: [PATCH] Log a severe message to the console when a jail's world is not defined. This should help warn to warn people when their server starts and something is wrong with the definition of their jail in the data.yml, thanks to #40 for raising this issue even though the real issue hasn't been found. --- src/main/java/com/graywolf336/jail/JailIO.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/graywolf336/jail/JailIO.java b/src/main/java/com/graywolf336/jail/JailIO.java index f791a91..d0aad51 100644 --- a/src/main/java/com/graywolf336/jail/JailIO.java +++ b/src/main/java/com/graywolf336/jail/JailIO.java @@ -596,6 +596,11 @@ public class JailIO { String node = "jails." + name + "."; String cNode = node + "cells."; Jail j = new Jail(pl, name); + + if(flat.getString(node + "world").isEmpty()) { + pl.getLogger().severe("Failed to load the jail, " + name + ", because the world is not set."); + return; + } j.setWorld(flat.getString(node + "world")); j.setMaxPoint(new int[] {flat.getInt(node + "top.x"), flat.getInt(node + "top.y"), flat.getInt(node + "top.z")});