mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 15:16:45 +01:00
Fix alias too long issue
This commit is contained in:
parent
55fe1c74c7
commit
bbf5ba4488
@ -212,6 +212,10 @@ public class Set extends SubCommand {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
final String alias = args[1];
|
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()) {
|
for (final Plot p : PlotMain.getPlots(plr.getWorld()).values()) {
|
||||||
if (p.settings.getAlias().equalsIgnoreCase(alias)) {
|
if (p.settings.getAlias().equalsIgnoreCase(alias)) {
|
||||||
PlayerFunctions.sendMessage(plr, C.ALIAS_IS_TAKEN);
|
PlayerFunctions.sendMessage(plr, C.ALIAS_IS_TAKEN);
|
||||||
|
@ -137,6 +137,7 @@ public enum C {
|
|||||||
*/
|
*/
|
||||||
ALIAS_SET_TO("&cPlot alias set to &6%alias%"),
|
ALIAS_SET_TO("&cPlot alias set to &6%alias%"),
|
||||||
MISSING_ALIAS("&cYou need to specify an 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"),
|
ALIAS_IS_TAKEN("&cThat alias is already taken"),
|
||||||
/*
|
/*
|
||||||
* Position
|
* Position
|
||||||
|
Loading…
Reference in New Issue
Block a user