mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-07-23 05:53:54 +00:00
General cleanup.
Add optional TL param for tempban/mute time in notify message
This commit is contained in:
parent
7401608cc5
commit
8b11b870b1
26 changed files with 23 additions and 41 deletions
|
@ -27,17 +27,15 @@ public class Commandnick extends EssentialsCommand
|
|||
{
|
||||
throw new Exception(_("nickDisplayName"));
|
||||
}
|
||||
if (args.length > 1)
|
||||
if (args.length > 1 && user.isAuthorized("essentials.nick.others"))
|
||||
{
|
||||
if (!user.isAuthorized("essentials.nick.others"))
|
||||
{
|
||||
throw new Exception(_("nickOthersPermission"));
|
||||
}
|
||||
setNickname(server, getPlayer(server, user, args, 0), formatNickname(user, args[1]));
|
||||
user.sendMessage(_("nickChanged"));
|
||||
return;
|
||||
}
|
||||
setNickname(server, user, formatNickname(user, args[0]));
|
||||
else
|
||||
{
|
||||
setNickname(server, user, formatNickname(user, args[0]));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue