mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-02-02 21:41:21 +01:00
Fix /warp command matching in console.
This commit is contained in:
parent
e6ef67f7bf
commit
7d5e0352d2
@ -56,7 +56,7 @@ public class Commandwarp extends EssentialsCommand
|
|||||||
@Override
|
@Override
|
||||||
public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
|
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);
|
warpList(sender, args);
|
||||||
throw new NoChargeException();
|
throw new NoChargeException();
|
||||||
@ -94,7 +94,7 @@ public class Commandwarp extends EssentialsCommand
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
int page = 1;
|
int page = 1;
|
||||||
if (args.length > 0)
|
if (args.length > 0 && Util.isInt(args[0]))
|
||||||
{
|
{
|
||||||
page = Integer.parseInt(args[0]);
|
page = Integer.parseInt(args[0]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user