From 230102ef1fafb89c735af33d422520d4a9989992 Mon Sep 17 00:00:00 2001 From: boy0001 Date: Wed, 15 Apr 2015 00:07:28 +1000 Subject: [PATCH] fixes #268 --- .../java/com/intellectualcrafters/plot/commands/Visit.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Visit.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Visit.java index efeca0826..ffc9dbd22 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Visit.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Visit.java @@ -70,10 +70,10 @@ public class Visit extends SubCommand { } catch (final Exception e) { return sendMessage(plr, C.NOT_VALID_NUMBER); } - if ((i < 0) || (i >= plots.size())) { + if ((i < 1) || (i > plots.size())) { return sendMessage(plr, C.NOT_VALID_NUMBER); } - MainUtil.teleportPlayer(plr, plr.getLocation(), plots.get(i)); + MainUtil.teleportPlayer(plr, plr.getLocation(), plots.get(i - 1)); return true; } }