mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Resolves FS-341
This commit is contained in:
parent
af18299613
commit
3763e0728d
@ -33,16 +33,14 @@ public class Command_op extends FreedomCommand
|
|||||||
List<String> matchedPlayerNames = new ArrayList<>();
|
List<String> matchedPlayerNames = new ArrayList<>();
|
||||||
for (final Player player : server.getOnlinePlayers())
|
for (final Player player : server.getOnlinePlayers())
|
||||||
{
|
{
|
||||||
if (player.getName().toLowerCase().contains(targetName) || player.getDisplayName().toLowerCase().contains(targetName)
|
if ((player.getName().toLowerCase().contains(targetName) || player.getDisplayName().toLowerCase().contains(targetName)
|
||||||
|| player.getName().contains(targetName) || player.getDisplayName().contains(targetName))
|
|| player.getName().contains(targetName) || player.getDisplayName().contains(targetName)) &&
|
||||||
|
!player.isOp() && !plugin.al.isVanished(player.getName()))
|
||||||
{
|
{
|
||||||
if (!player.isOp() && !plugin.al.isVanished(player.getName()))
|
matchedPlayerNames.add(player.getName());
|
||||||
{
|
player.setOp(true);
|
||||||
matchedPlayerNames.add(player.getName());
|
msg(player, YOU_ARE_OP);
|
||||||
player.setOp(true);
|
plugin.rm.updateDisplay(player);
|
||||||
msg(player, YOU_ARE_OP);
|
|
||||||
plugin.rm.updateDisplay(player);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user