mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 22:56:45 +01:00
Fixes #1822
This commit is contained in:
parent
d6c472fcdf
commit
4ffc4e67ab
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user