warzone.getDefaultInventories().setReward(reward);
returnMessage.append(" game end reward updated.");
}
if (namedParams.containsKey("lobbymaterial")) {
String whichBlocks = namedParams.get("lobbymaterial");
ItemStack blockInHand = player.getItemInHand();
boolean updatedLobbyMaterials = false;
if (!blockInHand.getType().isBlock() && !blockInHand.getType().equals(Material.AIR)) {
this.badMsg(player, "Can only use blocks or air as lobby material.");
} else {
if (whichBlocks.equals("floor")) {
warzone.getLobbyMaterials().setFloorBlock(blockInHand);
returnMessage.append(" lobby floor material set to " + blockInHand.getType());
updatedLobbyMaterials = true;
} else if (whichBlocks.equals("outline")) {
warzone.getLobbyMaterials().setOutlineBlock(blockInHand);
returnMessage.append(" lobby outline material set to " + blockInHand.getType());
updatedLobbyMaterials = true;
} else if (whichBlocks.equals("gate")) {
warzone.getLobbyMaterials().setGateBlock(blockInHand);
returnMessage.append(" lobby gate material set to " + blockInHand.getType());
updatedLobbyMaterials = true;
} else if (whichBlocks.equals("light")) {
warzone.getLobbyMaterials().setLightBlock(blockInHand);
returnMessage.append(" lobby light material set to " + blockInHand.getType());
updatedLobbyMaterials = true;
}
if (updatedLobbyMaterials && warzone.getLobby() != null) {
warzone.getLobby().getVolume().resetBlocks();
warzone.getLobby().initialize();
}
}
}
if (namedParams.containsKey("material")) {
String whichBlocks = namedParams.get("material");
ItemStack blockInHand = player.getItemInHand();
boolean updatedMaterials = false;
if (!blockInHand.getType().isBlock()) {
this.badMsg(player, "Can only use blocks as material.");
} else {
if (whichBlocks.equals("main")) {
warzone.getWarzoneMaterials().setMainBlock(blockInHand);
returnMessage.append(" main material set to " + blockInHand.getType());
updatedMaterials = true;
} else if (whichBlocks.equals("stand")) {
warzone.getWarzoneMaterials().setStandBlock(blockInHand);
returnMessage.append(" stand material set to " + blockInHand.getType());
updatedMaterials = true;
} else if (whichBlocks.equals("light")) {
warzone.getWarzoneMaterials().setLightBlock(blockInHand);
returnMessage.append(" light material set to " + blockInHand.getType());
updatedMaterials = true;
}
if (updatedMaterials) {
// reset all structures