1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-15 11:04:29 +02:00

Add a configurable max nick length.

This commit is contained in:
Iaccidentally
2012-11-13 23:29:35 -05:00
parent cef5af0de3
commit cdde047229
15 changed files with 23 additions and 3 deletions

View File

@@ -231,8 +231,9 @@ nickDisplayName=\u00a74You have to enable change-displayname in Essentials confi
nickInUse=\u00a74That name is already in use.
nickNamesAlpha=\u00a74Nicknames must be alphanumeric.
nickNoMore=\u00a76You no longer have a nickname.
nickOthersPermission=\u00a74You do not have permission to change the nickname of others
nickOthersPermission=\u00a74You do not have permission to change the nickname of others.
nickSet=\u00a76Your nickname is now \u00a7c{0}
nickTooLong=\u00a74You cannot set a nick that long.
noAccessCommand=\u00a74You do not have access to that command.
noAccessPermission=\u00a74You do not have permission to access that {0}.
noBreakBedrock=\u00a74You are not allowed to destroy bedrock.
@@ -243,8 +244,8 @@ noHelpFound=\u00a74No matching commands.
noHomeSet=\u00a74You have not set a home.
noHomeSetPlayer=\u00a76Player has not set a home.
noKitPermission=\u00a74You need the \u00a7c{0}\u00a74 permission to use that kit.
noKits=\u00a76There are no kits available yet
noMail=\u00a76You do not have any mail
noKits=\u00a76There are no kits available yet.
noMail=\u00a76You do not have any mail.
noMotd=\u00a76There is no message of the day.
noNewMail=\u00a76You have no new mail.
noPendingRequest=\u00a74You do not have a pending request.

View File

@@ -236,6 +236,7 @@ nickNamesAlpha=\u00a7cNick musi byt alfanumericky.
nickNoMore=\u00a77Uz nemas zadny nick.
nickOthersPermission=\u00a7cNemas opravneni menit ostatnim nick.
nickSet=\u00a77Nyni mas nickname: \u00a7c{0}
nickTooLong=\u00a74You cannot set a nick that long.
noAccessCommand=\u00a7cNemas povoleni na tento prikaz.
noAccessPermission=\u00a7cNemas povoleni k tomuto {0}.
noBreakBedrock=Nemas opravneni nicit bedrock.

View File

@@ -233,6 +233,7 @@ nickNamesAlpha=\u00a7cNicknames skal v\u00e6re alfanumeriske.
nickNoMore=\u00a7Du har ikke l\u00e6ngere et nickname.
nickOthersPermission=\u00a7cDu har ikke tilladelse til at \u00e6ndre en andens nickname.
nickSet=\u00a77Dit nickname er nu \u00a7c{0}
nickTooLong=\u00a74You cannot set a nick that long.
noAccessCommand=\u00a7cDu har ikke adgang til denne kommando.
noAccessPermission=\u00a7cDu har ikke tilladelse til at f\u00e5 adgang til {0}.
noBreakBedrock=You are not allowed to destroy bedrock.

View File

@@ -233,6 +233,7 @@ nickNamesAlpha=\u00a7cNicknamen d\u00fcrfen nur alphanumerische Zeichen enthalte
nickNoMore=\u00a7cDu hast keinen Nicknamen mehr.
nickOthersPermission=\u00a7cDu hast keine Rechte um den Nicknamen von anderen zu \u00e4ndern.
nickSet=\u00a77Dein Nickname ist nun \u00a7c{0}
nickTooLong=\u00a74You cannot set a nick that long.
noAccessCommand=\u00a7cDu hast keinen Zugriff auf diesen Befehl.
noAccessPermission=\u00a7cDu hast keine Rechte, den Block {0} zu \u00f6ffnen.
noBreakBedrock=You are not allowed to destroy bedrock.

View File

@@ -233,6 +233,7 @@ nickNamesAlpha=\u00a74Nicknames must be alphanumeric.
nickNoMore=\u00a76You no longer have a nickname.
nickOthersPermission=\u00a74You do not have permission to change the nickname of others
nickSet=\u00a76Your nickname is now \u00a7c{0}
nickTooLong=\u00a74You cannot set a nick that long.
noAccessCommand=\u00a74You do not have access to that command.
noAccessPermission=\u00a74You do not have permission to access that {0}.
noBreakBedrock=\u00a74You are not allowed to destroy bedrock.

View File

@@ -231,6 +231,7 @@ nickDisplayName=\u00a77Tienes que habilitar cambio de nombre de usuario en la co
nickInUse=\u00a7cEse nombre ya esta en uso.
nickNamesAlpha=\u00a7cLos nombres tienen que ser alfanumericos.
nickNoMore=\u00a77Ya no tienes un nombre de usuario.
nickTooLong=\u00a74You cannot set a nick that long.
nickOthersPermission=\u00a7cNo tienes permiso para cambiar el nombre de usuario de otros.
nickSet=\u00a77Tu nombre es ahora \u00a7c{0} .
noAccessCommand=\u00a7cNo tienes acceso a ese comando.

View File

@@ -233,6 +233,7 @@ nickNamesAlpha=\u00a7cLempinimen pit\u00e4\u00e4 olla aakkosista.
nickNoMore=\u00a77Sinulla ei ole en\u00e4\u00e4 lempinime\u00e4.
nickOthersPermission=\u00a7cSinulla ei ole oikeutta vaihtaa muiden lempinimi\u00e4
nickSet=\u00a77Lempinimesi on nyt \u00a7c{0}
nickTooLong=\u00a74You cannot set a nick that long.
noAccessCommand=\u00a7cSinulla ei ole oikeutta tuohon komentoon.
noAccessPermission=\u00a7cSinulla ei ole oikeutta tuohon {0}.
noBreakBedrock=Sinulla ei ole lupaa tuhota bedrock-palikoita.

View File

@@ -233,6 +233,7 @@ nickNamesAlpha=\u00a7cLes surnoms doivent \u00eatre alphanum\u00e9riques.
nickNoMore=\u00a7 Vous n'avez plus de surnom.
nickOthersPermission=\u00a7cVous n'avez pas la permission de changer le surnom des autres.
nickSet=\u00a77Votre surnom est maintenant \u00a7c{0}
nickTooLong=\u00a74You cannot set a nick that long.
noAccessCommand=\u00a7cVous n'avez pas acc\u00c3\u00a8s \u00e0 cette commande.
noAccessPermission=\u00a7cVous n''avez pas la permissions d''acc\u00e9der \u00e0 cette {0}
noBreakBedrock=You are not allowed to destroy bedrock.

View File

@@ -233,6 +233,7 @@ nickNamesAlpha=\u00a7cI Nickname devono essere alfanumerici.
nickNoMore=\u00a77Non disponi piu'' di un nickname.
nickOthersPermission=\u00a7cNon hai il permesso di cambiare il nickname degli altri
nickSet=\u00a77Il tuo nickname e'' ora \u00a7c{0}
nickTooLong=\u00a74You cannot set a nick that long.
noAccessCommand=\u00a7cNon hai accesso a questo comando.
noAccessPermission=\u00a7cNon hai i permessi di accesso per {0}.
noBreakBedrock=Non sei abilitato a distruggere la bedrock.

View File

@@ -233,6 +233,7 @@ nickNamesAlpha=\u00a7cBijnamen moeten alfanumeriek zijn.
nickNoMore=\u00a7Je hebt geen bijnaam meer.
nickOthersPermission=\u00a7cJe hebt geen toestemming om de bijnaam van anderen te veranderen
nickSet=\u00a77Je bijnaam is nu \u00a7c{0}
nickTooLong=\u00a74You cannot set a nick that long.
noAccessCommand=\u00a7cJe hebt geen toegang tot die opdracht.
noAccessPermission=\u00a7cJe hebt hier geen toegang voor {0}.
noBreakBedrock=Je bent niet toegestaan om grondgesteente te breken.

View File

@@ -233,6 +233,7 @@ nickNamesAlpha=\u00a7cPseudonimy musza byc alfanumeryczne.
nickNoMore=\u00a77Nie masz juz pseudonimu.
nickOthersPermission=\u00a7cNie masz uprawnienia do zmiany pseudonimu innym.
nickSet=\u00a77Twoj pseudonim od teraz to \u00a7c{0}
nickTooLong=\u00a74You cannot set a nick that long.
noAccessCommand=\u00a7cNie masz dostepu do tej komendy.
noAccessPermission=\u00a7cNie masz uprawnien do dostepu do {0}.
noBreakBedrock=Nie masz uprawnien do niszczenia bedrocka.

View File

@@ -233,6 +233,7 @@ nickNamesAlpha=\u00a7cApelidos devem ser alfanumericos.
nickNoMore=\u00a77Voc\u00ea nao tem mais um apelido.
nickOthersPermission=\u00a7cVoc\u00ea nao tem permissao para mudar o apelido dos outros.
nickSet=\u00a77Agora seu apelido \u00e9 \u00a7c{0}
nickTooLong=\u00a74You cannot set a nick that long.
noAccessCommand=\u00a7cVoc\u00ea nao tem acesso a este comando.
noAccessPermission=\u00a7cVoc\u00ea nao tem permissao para acessar isso {0}.
noBreakBedrock=Voce nao tem permissao para destruir bedrock.

View File

@@ -231,6 +231,7 @@ nickDisplayName=\u00a77Du m\u00e5ste aktivera change-displayname i Essentials-ko
nickInUse=\u00a7cDet namnet anv\u00e4nds redan.
nickNamesAlpha=\u00a7cSmeknamn m\u00e5ste vara alfanumeriska.
nickNoMore=\u00a77Du har inte ett smeknamn l\u00e4ngre
nickTooLong=\u00a74You cannot set a nick that long.
nickOthersPermission=\u00a7cDu har inte tillst\u00e5nd att \u00e4ndra andras smeknamn
nickSet=\u00a77Ditt smeknamn \u00e4r nu \u00a7c{0}
noAccessCommand=\u00a7cDu har inte tillg\u00e5ng till det kommandot.

View File

@@ -93,6 +93,11 @@ public class Commandnick extends EssentialsCommand
{
throw new Exception(_("nickNamesAlpha"));
}
FormatUtil.stripFormat(nick);
if (ess.getSettings().getData().getChat().getMaxNickLength() > 0 && nick.length() > ess.getSettings().getData().getChat().getMaxNickLength())
{
throw new Exception(_("nickTooLong"));
}
else if ("off".equalsIgnoreCase(nick) || target.getName().equalsIgnoreCase(nick))
{
target.getData().setNickname(null);

View File

@@ -30,4 +30,6 @@ public class Chat implements StorageObject
private int localRadius = 0;
@Comment("Set the default chat format here, it will be overwritten by group specific chat formats.")
private String defaultFormat = "&7[{GROUP}]&f {DISPLAYNAME}&7:&f {MESSAGE}";
@Comment("Set the maximum length a nick can be. Set to -1 to disable. Note: formatting characters do not count.")
private long MaxNickLength = 25;
}