From 4b5e4a5e13f58cc4b6a62030066d7385254b7230 Mon Sep 17 00:00:00 2001 From: Tobias Ottenweller Date: Mon, 12 Mar 2012 20:41:20 +0100 Subject: [PATCH] info command now prints about open and hidden status of gates --- .../mcteam/ancientgates/commands/CommandInfo.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/org/mcteam/ancientgates/commands/CommandInfo.java b/src/org/mcteam/ancientgates/commands/CommandInfo.java index e8e41a7..61febad 100644 --- a/src/org/mcteam/ancientgates/commands/CommandInfo.java +++ b/src/org/mcteam/ancientgates/commands/CommandInfo.java @@ -20,6 +20,20 @@ public class CommandInfo extends BaseCommand { sendMessage(ChatColor.LIGHT_PURPLE + "Information about " + ChatColor.WHITE + gate.getId() + ChatColor.LIGHT_PURPLE + ":"); + String openHiddenMessage = "This gate is"; + + if (gate.isOpen()) + openHiddenMessage += " open"; + else + openHiddenMessage += " closed"; + + if (gate.isHidden()) + openHiddenMessage += " and hidden"; + + openHiddenMessage += "."; + + sendMessage(openHiddenMessage); + if (gate.getFrom() != null) sendMessage(ChatColor.GREEN + "'from' location: " + ChatColor.YELLOW + "( " + gate.getFrom().getBlockX() + " | " + gate.getFrom().getBlockY() + " | " + gate.getFrom().getBlockZ() + " ) in " + gate.getFrom().getWorld().getName()); else