mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2024-12-23 00:15:06 +00:00
Fixes #1822
This commit is contained in:
parent
d6c472fcdf
commit
4ffc4e67ab
1 changed files with 5 additions and 1 deletions
|
@ -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 a new issue