mirror of
https://github.com/TheDeus-Group/TFM-4.3-Reloaded.git
synced 2024-12-23 03:24:58 +00:00
Using qop should now only op those who are not op.
This will further reduce the amount of spam and doesn't spam everyone with "you are now op".
This commit is contained in:
parent
a1c11f4e0f
commit
9a2dc52e87
1 changed files with 8 additions and 3 deletions
|
@ -34,16 +34,21 @@ public class Command_qop extends TFM_Command
|
|||
{
|
||||
if (player.getName().toLowerCase().contains(targetName) || player.getDisplayName().toLowerCase().contains(targetName))
|
||||
{
|
||||
matchedPlayerNames.add(player.getName());
|
||||
player.setOp(true);
|
||||
player.sendMessage(TotalFreedomMod.YOU_ARE_OP);
|
||||
if (!player.isOp())
|
||||
{
|
||||
matchedPlayerNames.add(player.getName());
|
||||
player.setOp(true);
|
||||
player.sendMessage(TotalFreedomMod.YOU_ARE_OP);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!matchedPlayerNames.isEmpty())
|
||||
{
|
||||
|
||||
if (!silent)
|
||||
{
|
||||
|
||||
TFM_Util.adminAction(sender.getName(), "Opping " + StringUtils.join(matchedPlayerNames, ", "), false);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue