/**
* Show things.
*/
private Prompt show(ConversationContext context, String s) {
ArenaRegion region = arena.getRegion();
String toShow = s.split(" ")[1].trim();
// Regions
if (toShow.equalsIgnoreCase("r") || toShow.equalsIgnoreCase("regions")) {
if (region.isDefined()) {
region.showRegion(player);
if (region.isLobbyDefined()) {
region.showLobbyRegion(player);
next = formatYellow("Showing both %s.", "regions");
} else {
next = formatYellow("Showing %s (lobby region not defined).", "arena region");
}
} else if (region.isLobbyDefined()) {
region.showLobbyRegion(player);
next = formatYellow("Showing %s (arena region not defined).", "lobby region");
} else {
next = "No regions have been defined yet.";
}
return this;
} else if (toShow.equalsIgnoreCase("ar")) {
if (region.isDefined()) {
next = formatYellow("Showing %s.", "arena region");
region.showRegion(player);
} else {
next = "The region has not been defined yet.";
}
return this;
} else if (toShow.equalsIgnoreCase("lr")) {
if (region.isLobbyDefined()) {
next = formatYellow("Showing %s.", "lobby region");
region.showLobbyRegion(player);
} else {
next = "The lobby region has not been defined yet.";
}
return this;
}
// Warps
if (toShow.matches("arena|lobby|spec(tator)?|exit")) {
next = formatYellow("Showing %s warp.", toShow);
Location loc;
loc = toShow.equals("arena") ? region.getArenaWarp() :
toShow.equals("lobby") ? region.getLobbyWarp() :
toShow.equals("spec") ? region.getSpecWarp() :
toShow.equals("spectator") ? region.getSpecWarp() :
toShow.equals("exit") ? region.getExitWarp() : null;
region.showBlock(player, loc, 35, (byte) 14);
return this;
}
// Spawnpoints
if (toShow.matches("sp(awn(point)?s?)?")) {
next = formatYellow("Showing %s.", "spawnpoints");
region.showSpawns(player);
return this;
}
// Chests
if (toShow.matches("c((hest(s)?)?|on(tainer(s)?)?)")) {
next = formatYellow("Showing %s.", "containers");
region.showChests(player);
return this;
}
// Show the "show help", if invalid thing
return acceptInput(context, "show ?");