From 766dc0f7032e0b33b25f89b8c5aea4c85e8aed92 Mon Sep 17 00:00:00 2001 From: boy0001 Date: Wed, 5 Nov 2014 22:01:59 +1100 Subject: [PATCH] temp fix --- .../plot/commands/MainCommand.java | 13 +++++++++++-- PlotSquared/src/main/resources/plugin.yml | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/MainCommand.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/MainCommand.java index 9969eda23..ef8e08892 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/MainCommand.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/MainCommand.java @@ -84,14 +84,23 @@ public class MainCommand implements CommandExecutor, TabCompleter { int page = 0; boolean digit = true; - for (final char c : args[2].toCharArray()) { + + String arg2; + if (args.length>2) { + arg2 = args[2]; + } + else { + arg2 = "1"; + } + + for (final char c : arg2.toCharArray()) { if (!Character.isDigit(c)) { digit = false; break; } } if (digit) { - page = Integer.parseInt(args[2]); + page = Integer.parseInt(arg2); if (--page < 0) { page = 0; } diff --git a/PlotSquared/src/main/resources/plugin.yml b/PlotSquared/src/main/resources/plugin.yml index ed8bc74e6..b68f27176 100644 --- a/PlotSquared/src/main/resources/plugin.yml +++ b/PlotSquared/src/main/resources/plugin.yml @@ -1,6 +1,6 @@ name: PlotSquared main: com.intellectualcrafters.plot.PlotMain -version: 2.1.2 +version: 2.2.0 load: STARTUP description: > Easy, yet powerful Plot World generation and management.