Remove oping & deoping altogether for performance reasons

This commit is contained in:
isokissa3 2017-07-25 19:43:49 +03:00
parent 979cbf0f9b
commit ee6dafd4f2
4 changed files with 8 additions and 44 deletions

View file

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>net.goldtreeservers</groupId>
<artifactId>worldguardextraflags</artifactId>
<version>2.14.2</version>
<version>2.14.3</version>
<name>WorldGuardExtraFlags</name>
<build>
<finalName>WorldGuardExtraFlagsPlugin</finalName>

View file

@ -47,28 +47,11 @@ public class CommandOnEntryFlag extends Handler
for(Set<String> commands_ : commands)
{
if (!this.lastCommands.contains(commands_))
if (!this.lastCommands.contains(commands_) && commands_.size() > 0)
{
boolean isOp = player.isOp();
try
for(String command : commands_)
{
if (!isOp)
{
player.setOp(true);
}
for(String command : commands_)
{
WorldGuardExtraFlagsPlugin.getPlugin().getServer().dispatchCommand(player, command.substring(1).replace("%username%", player.getName())); //TODO: Make this better
}
}
finally
{
if (!isOp)
{
player.setOp(isOp);
}
WorldGuardExtraFlagsPlugin.getPlugin().getServer().dispatchCommand(player, command.substring(1).replace("%username%", player.getName())); //TODO: Make this better
}
break;

View file

@ -65,31 +65,12 @@ public class CommandOnExitFlag extends Handler
for(Set<String> commands_ : this.lastCommands)
{
if (!commands.contains(commands_))
if (!commands.contains(commands_) && commands_.size() > 0)
{
boolean isOp = player.isOp();
try
for(String command : commands_)
{
if (!isOp)
{
player.setOp(true);
}
for(String command : commands_)
{
WorldGuardExtraFlagsPlugin.getPlugin().getServer().dispatchCommand(player, command.substring(1).replace("%username%", player.getName())); //TODO: Make this better
}
WorldGuardExtraFlagsPlugin.getPlugin().getServer().dispatchCommand(player, command.substring(1).replace("%username%", player.getName())); //TODO: Make this better
}
finally
{
if (!isOp)
{
player.setOp(isOp);
}
}
break;
}
}

View file

@ -1,5 +1,5 @@
name: WorldGuardExtraFlags
version: 2.14.2
version: 2.14.3
description: Adds more flags to worldguard to help manage your server easily!
author: isokissa3
website: https://goldtreevers.net