mirror of https://github.com/taoneill/war.git
Print error if the world was deleted
Warzones created in worlds that are then deleted can cause a stack trace to dump in the error log. This replaces the stack trace with an informative error message. Closes #774
This commit is contained in:
parent
aeda124c1c
commit
463d51d41b
|
@ -262,6 +262,7 @@ public class ZoneVolumeMapper {
|
|||
public static void loadStructure(Volume volume, Connection databaseConnection) throws SQLException {
|
||||
String prefix = String.format("structure_%d", volume.getName().hashCode() & Integer.MAX_VALUE);
|
||||
World world = volume.getWorld();
|
||||
Validate.notNull(world, String.format("Cannot find the warzone for %s", prefix));
|
||||
Statement stmt = databaseConnection.createStatement();
|
||||
ResultSet cornerQuery = stmt.executeQuery("SELECT * FROM " + prefix + "_corners");
|
||||
cornerQuery.next();
|
||||
|
|
Loading…
Reference in New Issue