1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-17 20:11:21 +02:00

Fix /warp command matching in console.

This commit is contained in:
KHobbits
2012-08-18 15:25:14 +01:00
parent c1bdeb0900
commit 530a519118

View File

@@ -56,7 +56,7 @@ public class Commandwarp extends EssentialsCommand
@Override
public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 2 || args[0].matches("[0-9]+"))
if (args.length < 2 || Util.isInt(args[0]))
{
warpList(sender, args);
throw new NoChargeException();
@@ -94,7 +94,7 @@ public class Commandwarp extends EssentialsCommand
}
}
int page = 1;
if (args.length > 0)
if (args.length > 0 && Util.isInt(args[0]))
{
page = Integer.parseInt(args[0]);
}