This commit is contained in:
Jesse Boyd 2018-05-17 16:30:31 +10:00
parent d6c472fcdf
commit 4ffc4e67ab
No known key found for this signature in database
GPG key ID: 59F1DE6293AF6E1F

View file

@ -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 <set> <value>");
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);