From 9b4e6e5dc6458a3ccb6d947ae9f23e049d71ede7 Mon Sep 17 00:00:00 2001 From: snowleo Date: Fri, 15 Nov 2013 20:06:16 +0100 Subject: [PATCH] Fix fromIndex = -20 --- .../src/com/earth2me/essentials/commands/Commandwarp.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java b/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java index 501aca36c..2c8f82673 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandwarp.java @@ -71,10 +71,6 @@ public class Commandwarp extends EssentialsCommand private void warpList(final CommandSource sender, final String[] args, final IUser user) throws Exception { final IWarps warps = ess.getWarps(); - if (warps.isEmpty()) - { - throw new Exception(_("noWarpsDefined")); - } final List warpNameList = new ArrayList(warps.getList()); if (user != null) @@ -89,6 +85,10 @@ public class Commandwarp extends EssentialsCommand } } } + if (warpNameList.isEmpty()) + { + throw new Exception(_("noWarpsDefined")); + } int page = 1; if (args.length > 0 && NumberUtil.isInt(args[0])) {