Skip to content

Commit

Permalink
Further improved info command output
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieS1211 committed Jul 6, 2016
1 parent ecad5fe commit 2fe8a24
Showing 1 changed file with 16 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,22 @@ public CommandResult execute(CommandSource src, CommandContext args) throws Comm
src.sendMessage(TextSerializers.FORMATTING_CODE.deserialize(Messages.MinePrefix + "Group: " + name));

if (mineList.size() < 1) {
src.sendMessage(TextSerializers.FORMATTING_CODE.deserialize(Messages.MinePrefix + "Group " + name + " has no mines"));
src.sendMessage(TextSerializers.FORMATTING_CODE.deserialize(Messages.MinePrefix + "No mines"));
} else if (mineList.size() == 1) {
src.sendMessage(TextSerializers.FORMATTING_CODE.deserialize(Messages.MinePrefix + "Group " + name + " contains mine: " + mineList));
src.sendMessage(TextSerializers.FORMATTING_CODE.deserialize(Messages.MinePrefix + "Contains mine: " + mineList));
} else {
src.sendMessage(TextSerializers.FORMATTING_CODE.deserialize(Messages.MinePrefix + "Group " + name + " contains mines: " + mineList));
src.sendMessage(TextSerializers.FORMATTING_CODE.deserialize(Messages.MinePrefix + "Contains mines: " + mineList));
}

src.sendMessage(TextSerializers.FORMATTING_CODE.deserialize(Messages.MinePrefix + "Group " + name + " reset time: " + SecondsToString.secondsToTimeString(infoMap.get("resetTime"))));

if (infoMap.get("initialDelay") == 0) {
src.sendMessage(TextSerializers.FORMATTING_CODE.deserialize(Messages.MinePrefix + "Group " + name + " initial delay: No initial delay"));
src.sendMessage(TextSerializers.FORMATTING_CODE.deserialize(Messages.MinePrefix + "Reset time: " +
infoMap.get("resetTime") + " ( " + SecondsToString.secondsToTimeString(infoMap.get("resetTime")) + ")"));

if (infoMap.get("initialDelay") == 0) {
src.sendMessage(TextSerializers.FORMATTING_CODE.deserialize(Messages.MinePrefix + "Initial delay: No initial delay"));
} else {
src.sendMessage(TextSerializers.FORMATTING_CODE.deserialize(Messages.MinePrefix + "Group " + name + " initial delay: " + SecondsToString.secondsToTimeString(infoMap.get("initialDelay"))));
src.sendMessage(TextSerializers.FORMATTING_CODE.deserialize(Messages.MinePrefix + "Initial Delay: " +
infoMap.get("initialDelay") + " ( " + SecondsToString.secondsToTimeString(infoMap.get("initialDelay")) + ")"));
}

src.sendMessage(TextSerializers.FORMATTING_CODE.deserialize(Messages.MinePrefix + "-----------------------------------------------"));
Expand Down Expand Up @@ -98,8 +101,12 @@ public CommandResult execute(CommandSource src, CommandContext args) throws Comm
src.sendMessage(TextSerializers.FORMATTING_CODE.deserialize(Messages.MinePrefix + "Reset time: " +
resetTime + " ( " + SecondsToString.secondsToTimeString(resetTime) + ")"));

src.sendMessage(TextSerializers.FORMATTING_CODE.deserialize(Messages.MinePrefix + "Initial Delay: " +
initialDelay + " ( " + SecondsToString.secondsToTimeString(initialDelay) + ")"));
if (initialDelay == 0) {
src.sendMessage(TextSerializers.FORMATTING_CODE.deserialize(Messages.MinePrefix + "Initial delay: No initial delay"));
} else {
src.sendMessage(TextSerializers.FORMATTING_CODE.deserialize(Messages.MinePrefix + "Initial Delay: " +
initialDelay + " ( " + SecondsToString.secondsToTimeString(initialDelay) + ")"));
}

src.sendMessage(TextSerializers.FORMATTING_CODE.deserialize(Messages.MinePrefix + "Smart Fill: " +
config.getNode("4 - MineGroups", group, name, "SmartFill").getBoolean()));
Expand Down

0 comments on commit 2fe8a24

Please sign in to comment.