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.
This commit is contained in:
		@@ -596,6 +596,11 @@ public class JailIO {
 | 
				
			|||||||
        String node = "jails." + name + ".";
 | 
					        String node = "jails." + name + ".";
 | 
				
			||||||
        String cNode = node + "cells.";
 | 
					        String cNode = node + "cells.";
 | 
				
			||||||
        Jail j = new Jail(pl, name);
 | 
					        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.setWorld(flat.getString(node + "world"));
 | 
				
			||||||
        j.setMaxPoint(new int[] {flat.getInt(node + "top.x"), flat.getInt(node + "top.y"), flat.getInt(node + "top.z")});
 | 
					        j.setMaxPoint(new int[] {flat.getInt(node + "top.x"), flat.getInt(node + "top.y"), flat.getInt(node + "top.z")});
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user