This commit is contained in:
boy0001 2015-04-15 00:07:28 +10:00
parent c109f37bdd
commit 230102ef1f

View File

@ -70,10 +70,10 @@ public class Visit extends SubCommand {
} catch (final Exception e) { } catch (final Exception e) {
return sendMessage(plr, C.NOT_VALID_NUMBER); 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); 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; return true;
} }
} }