diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties index f5cfea431..3e70f68e8 100644 --- a/Essentials/src/messages.properties +++ b/Essentials/src/messages.properties @@ -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. diff --git a/Essentials/src/messages_cs.properties b/Essentials/src/messages_cs.properties index fe640b03a..802203a58 100644 --- a/Essentials/src/messages_cs.properties +++ b/Essentials/src/messages_cs.properties @@ -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. diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties index 24f1b5f9b..d6e3f3410 100644 --- a/Essentials/src/messages_da.properties +++ b/Essentials/src/messages_da.properties @@ -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. diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties index 617b1ec67..f89e57781 100644 --- a/Essentials/src/messages_de.properties +++ b/Essentials/src/messages_de.properties @@ -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. diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index f5cfea431..83e3c63c1 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -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. diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties index d91314668..035282255 100644 --- a/Essentials/src/messages_es.properties +++ b/Essentials/src/messages_es.properties @@ -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. diff --git a/Essentials/src/messages_fi.properties b/Essentials/src/messages_fi.properties index aea8f91e7..df97283b6 100644 --- a/Essentials/src/messages_fi.properties +++ b/Essentials/src/messages_fi.properties @@ -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. diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties index 490608e6d..d76be55c5 100644 --- a/Essentials/src/messages_fr.properties +++ b/Essentials/src/messages_fr.properties @@ -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. diff --git a/Essentials/src/messages_it.properties b/Essentials/src/messages_it.properties index 2d2020665..876e209bd 100644 --- a/Essentials/src/messages_it.properties +++ b/Essentials/src/messages_it.properties @@ -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. diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties index fa5d3c925..629d548ba 100644 --- a/Essentials/src/messages_nl.properties +++ b/Essentials/src/messages_nl.properties @@ -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. diff --git a/Essentials/src/messages_pl.properties b/Essentials/src/messages_pl.properties index 680fa7e73..e5439d0d9 100644 --- a/Essentials/src/messages_pl.properties +++ b/Essentials/src/messages_pl.properties @@ -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. diff --git a/Essentials/src/messages_pt.properties b/Essentials/src/messages_pt.properties index e0a6291b2..eb3df6e5d 100644 --- a/Essentials/src/messages_pt.properties +++ b/Essentials/src/messages_pt.properties @@ -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. diff --git a/Essentials/src/messages_se.properties b/Essentials/src/messages_se.properties index eedd78aa9..4ebdca92f 100644 --- a/Essentials/src/messages_se.properties +++ b/Essentials/src/messages_se.properties @@ -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. diff --git a/Essentials/src/net/ess3/commands/Commandnick.java b/Essentials/src/net/ess3/commands/Commandnick.java index 7a152052a..e86124791 100644 --- a/Essentials/src/net/ess3/commands/Commandnick.java +++ b/Essentials/src/net/ess3/commands/Commandnick.java @@ -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); diff --git a/Essentials/src/net/ess3/settings/Chat.java b/Essentials/src/net/ess3/settings/Chat.java index 6f527bdcf..a7a99fe6e 100644 --- a/Essentials/src/net/ess3/settings/Chat.java +++ b/Essentials/src/net/ess3/settings/Chat.java @@ -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; }