diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Set.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Set.java index fe5bce4b6..652e7a6aa 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Set.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Set.java @@ -212,6 +212,10 @@ public class Set extends SubCommand { return false; } final String alias = args[1]; + if (alias.length() >= 50) { + PlayerFunctions.sendMessage(plr, C.ALIAS_TOO_LONG); + return false; + } for (final Plot p : PlotMain.getPlots(plr.getWorld()).values()) { if (p.settings.getAlias().equalsIgnoreCase(alias)) { PlayerFunctions.sendMessage(plr, C.ALIAS_IS_TAKEN); diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/C.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/C.java index 9c21d0908..8ae9ddb51 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/C.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/C.java @@ -137,6 +137,7 @@ public enum C { */ ALIAS_SET_TO("&cPlot alias set to &6%alias%"), MISSING_ALIAS("&cYou need to specify an alias"), + ALIAS_TOO_LONG("&cThe alias must be < 50 characters in length"), ALIAS_IS_TAKEN("&cThat alias is already taken"), /* * Position