Disable /nick if change-displayname is disabled

Some translations
This commit is contained in:
snowleo 2011-08-27 16:56:45 +02:00
parent 394a786044
commit f18c3c7e1d
8 changed files with 88 additions and 66 deletions

View file

@ -21,6 +21,11 @@ public class Commandnick extends EssentialsCommand
{
throw new NotEnoughArgumentsException();
}
if (!ess.getSettings().changeDisplayName()) {
user.sendMessage(Util.i18n("nickDisplayName"));
return;
}
if (args.length > 1)
{
@ -80,6 +85,11 @@ public class Commandnick extends EssentialsCommand
throw new NotEnoughArgumentsException();
}
if (!ess.getSettings().changeDisplayName()) {
sender.sendMessage(Util.i18n("nickDisplayName"));
return;
}
setOthersNickname(server, sender, args);
}