I hate Codacy
This commit is contained in:
Video 2021-07-29 05:48:11 -06:00
parent a79b2cbe0f
commit 5fa3f9f26a

View File

@ -32,16 +32,14 @@ public class Command_deop extends FreedomCommand
final List<String> matchedPlayerNames = new ArrayList<>();
for (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.isOp() && !plugin.al.isVanished(player.getName()))
{
if (player.isOp() && !plugin.al.isVanished(player.getName()))
{
matchedPlayerNames.add(player.getName());
player.setOp(false);
msg(player, YOU_ARE_NOT_OP);
plugin.rm.updateDisplay(player);
}
matchedPlayerNames.add(player.getName());
player.setOp(false);
msg(player, YOU_ARE_NOT_OP);
plugin.rm.updateDisplay(player);
}
}