mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-10 18:38:18 +01:00
Prevent future warps being named as numbers.
This commit is contained in:
parent
fec3b61039
commit
98cd03ac57
@ -21,6 +21,10 @@ public class Commandsetwarp extends EssentialsCommand
|
|||||||
throw new NotEnoughArgumentsException();
|
throw new NotEnoughArgumentsException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (args[0].matches("[0-9]+")) {
|
||||||
|
throw new NotEnoughArgumentsException();
|
||||||
|
}
|
||||||
|
|
||||||
final Location loc = user.getLocation();
|
final Location loc = user.getLocation();
|
||||||
ess.getWarps().setWarp(args[0], loc);
|
ess.getWarps().setWarp(args[0], loc);
|
||||||
user.sendMessage(_("warpSet", args[0]));
|
user.sendMessage(_("warpSet", args[0]));
|
||||||
|
Loading…
Reference in New Issue
Block a user