mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-30 10:05:59 +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
@ -34,16 +34,21 @@ public class Command_qop extends TFM_Command
|
|||||||
{
|
{
|
||||||
if (player.getName().toLowerCase().contains(targetName) || player.getDisplayName().toLowerCase().contains(targetName))
|
if (player.getName().toLowerCase().contains(targetName) || player.getDisplayName().toLowerCase().contains(targetName))
|
||||||
{
|
{
|
||||||
matchedPlayerNames.add(player.getName());
|
if (!player.isOp())
|
||||||
player.setOp(true);
|
{
|
||||||
player.sendMessage(TotalFreedomMod.YOU_ARE_OP);
|
matchedPlayerNames.add(player.getName());
|
||||||
|
player.setOp(true);
|
||||||
|
player.sendMessage(TotalFreedomMod.YOU_ARE_OP);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!matchedPlayerNames.isEmpty())
|
if (!matchedPlayerNames.isEmpty())
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!silent)
|
if (!silent)
|
||||||
{
|
{
|
||||||
|
|
||||||
TFM_Util.adminAction(sender.getName(), "Opping " + StringUtils.join(matchedPlayerNames, ", "), false);
|
TFM_Util.adminAction(sender.getName(), "Opping " + StringUtils.join(matchedPlayerNames, ", "), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user