} else {
ConfigurationSection floorMaterialSection = warzoneRootSection
.getConfigurationSection(lobbyPrefix + "materials.floor");
if (floorMaterialSection != null) {
warzone.getLobbyMaterials().setFloorBlock(
new ItemStack(floorMaterialSection.getInt("id"), 1,
(short) floorMaterialSection.getInt("data")));
}
}
if (warzoneRootSection.isItemStack(lobbyPrefix + "materials.outline")) {
warzone.getLobbyMaterials().setOutlineBlock(
warzoneRootSection.getItemStack(lobbyPrefix + "materials.outline"));
} else {
ConfigurationSection floorMaterialSection = warzoneRootSection
.getConfigurationSection(lobbyPrefix + "materials.outline");
if (floorMaterialSection != null) {
warzone.getLobbyMaterials().setOutlineBlock(
new ItemStack(floorMaterialSection.getInt("id"), 1,
(short) floorMaterialSection.getInt("data")));
}
}
if (warzoneRootSection.isItemStack(lobbyPrefix + "materials.gate")) {
warzone.getLobbyMaterials().setGateBlock(
warzoneRootSection.getItemStack(lobbyPrefix + "materials.gate"));
} else {
ConfigurationSection floorMaterialSection = warzoneRootSection
.getConfigurationSection(lobbyPrefix + "materials.gate");
if (floorMaterialSection != null) {
warzone.getLobbyMaterials().setGateBlock(
new ItemStack(floorMaterialSection.getInt("id"), 1,
(short) floorMaterialSection.getInt("data")));
}
}
if (warzoneRootSection.isItemStack(lobbyPrefix + "materials.light")) {
warzone.getLobbyMaterials().setLightBlock(
warzoneRootSection.getItemStack(lobbyPrefix + "materials.light"));
} else {
ConfigurationSection floorMaterialSection = warzoneRootSection
.getConfigurationSection(lobbyPrefix + "materials.light");
if (floorMaterialSection != null) {
warzone.getLobbyMaterials().setLightBlock(
new ItemStack(floorMaterialSection.getInt("id"), 1,
(short) floorMaterialSection.getInt("data")));
}
}
// lobby world
String lobbyWorldName = warzoneRootSection.getString(lobbyPrefix + "world");
World lobbyWorld = War.war.getServer().getWorld(lobbyWorldName);
// create the lobby
Volume lobbyVolume = null;
try {
lobbyVolume = warzone.loadStructure("lobby", lobbyWorld, connection);
} catch (SQLException e) {
War.war.getLogger().log(Level.WARNING, "Failed to load warzone lobby", e);
}
ZoneLobby lobby = new ZoneLobby(warzone, lobbyFace, lobbyVolume);
warzone.setLobby(lobby);
// warzone materials
if (warzoneRootSection.isItemStack(zoneInfoPrefix + "materials.main")) {
warzone.getWarzoneMaterials().setMainBlock(
warzoneRootSection.getItemStack(zoneInfoPrefix + "materials.main"));
} else {
ConfigurationSection floorMaterialSection = warzoneRootSection
.getConfigurationSection(zoneInfoPrefix + "materials.main");
if (floorMaterialSection != null) {
warzone.getWarzoneMaterials().setMainBlock(
new ItemStack(floorMaterialSection.getInt("id"), 1,
(short) floorMaterialSection.getInt("data")));
}
}
if (warzoneRootSection.isItemStack(zoneInfoPrefix + "materials.stand")) {
warzone.getWarzoneMaterials().setStandBlock(
warzoneRootSection.getItemStack(zoneInfoPrefix + "materials.stand"));
} else {
ConfigurationSection floorMaterialSection = warzoneRootSection
.getConfigurationSection(zoneInfoPrefix + "materials.stand");
if (floorMaterialSection != null) {
warzone.getWarzoneMaterials().setStandBlock(
new ItemStack(floorMaterialSection.getInt("id"), 1,
(short) floorMaterialSection.getInt("data")));
}
}
if (warzoneRootSection.isItemStack(zoneInfoPrefix + "materials.light")) {
warzone.getWarzoneMaterials().setLightBlock(
warzoneRootSection.getItemStack(zoneInfoPrefix + "materials.light"));
} else {
ConfigurationSection floorMaterialSection = warzoneRootSection
.getConfigurationSection(zoneInfoPrefix + "materials.light");
if (floorMaterialSection != null) {
warzone.getWarzoneMaterials().setLightBlock(
new ItemStack(floorMaterialSection.getInt("id"), 1,
(short) floorMaterialSection.getInt("data")));
}
}
try {
connection.close();