From 4ffc4e67ab0e4329a60745e7702a21526a413de5 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Thu, 17 May 2018 16:30:31 +1000 Subject: [PATCH] Fixes #1822 --- .../java/com/intellectualcrafters/plot/commands/Alias.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Core/src/main/java/com/intellectualcrafters/plot/commands/Alias.java b/Core/src/main/java/com/intellectualcrafters/plot/commands/Alias.java index 19c10e2a1..d22dbfe91 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/commands/Alias.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/commands/Alias.java @@ -7,6 +7,7 @@ import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.object.StringWrapper; import com.intellectualcrafters.plot.util.MainUtil; +import com.intellectualcrafters.plot.util.MathMan; import com.intellectualcrafters.plot.util.Permissions; import com.intellectualcrafters.plot.util.UUIDHandler; import com.plotsquared.general.commands.CommandDeclaration; @@ -76,7 +77,6 @@ public class Alias extends SubCommand { private boolean setAlias(PlotPlayer player, Plot plot, String alias) { - if (alias.isEmpty()) { C.COMMAND_SYNTAX.send(player, "/plot alias "); return false; @@ -89,6 +89,10 @@ public class Alias extends SubCommand { C.NOT_VALID_VALUE.send(player); return false; } + if (MathMan.isInteger(alias)) { + C.NOT_VALID_VALUE.send(player); + return false; + } for (Plot p : PS.get().getPlots(plot.getArea())) { if (p.getAlias().equalsIgnoreCase(alias)) { MainUtil.sendMessage(player, C.ALIAS_IS_TAKEN);