diff --git a/src/main/java/net/knarcraft/paidsigns/command/ListCommand.java b/src/main/java/net/knarcraft/paidsigns/command/ListCommand.java index a1cb388..02e5d75 100644 --- a/src/main/java/net/knarcraft/paidsigns/command/ListCommand.java +++ b/src/main/java/net/knarcraft/paidsigns/command/ListCommand.java @@ -47,7 +47,7 @@ public class ListCommand extends TokenizedCommand { } else { short signLine; try { - signLine = Short.parseShort(arguments.get(1)); + signLine = (short) (Short.parseShort(arguments.get(1)) - 1); } catch (NumberFormatException exception) { sender.sendMessage("Invalid number given"); return false; @@ -57,7 +57,7 @@ public class ListCommand extends TokenizedCommand { return false; } PaidSignCondition condition = paidSign.getConditions().get(signLine); - displayPaidSignCondition(sender, paidSign.getName(), condition); + displayPaidSignCondition(sender, paidSign.getName(), signLine, condition); } return true; } @@ -67,11 +67,14 @@ public class ListCommand extends TokenizedCommand { * * @param sender
The command sender to display the information to
* @param signNameThe name of the sign to display the condition for
+ * @param signLineThe line the condition is for
* @param conditionThe condition to display information about
*/ - private void displayPaidSignCondition(CommandSender sender, String signName, PaidSignCondition condition) { + private void displayPaidSignCondition(CommandSender sender, String signName, short signLine, + PaidSignCondition condition) { sender.sendMessage("Paid sign condition info: "); sender.sendMessage("Paid sign name: " + signName); + sender.sendMessage("Condition line: " + signLine); sender.sendMessage("Condition match string: " + condition.getStringToMatch()); sender.sendMessage("Execute RegEx: " + condition.executeRegex()); sender.sendMessage("Ignore case: " + condition.ignoreCase()); @@ -94,7 +97,7 @@ public class ListCommand extends TokenizedCommand { sender.sendMessage("Sign conditions: "); Map