mirror of
https://github.com/TotalFreedomMC/TF-WorldGuardExtraFlagsPlugin.git
synced 2024-06-28 14:10:36 +00:00
Remove oping & deoping altogether for performance reasons
This commit is contained in:
parent
979cbf0f9b
commit
ee6dafd4f2
2
pom.xml
2
pom.xml
|
@ -3,7 +3,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>net.goldtreeservers</groupId>
|
<groupId>net.goldtreeservers</groupId>
|
||||||
<artifactId>worldguardextraflags</artifactId>
|
<artifactId>worldguardextraflags</artifactId>
|
||||||
<version>2.14.2</version>
|
<version>2.14.3</version>
|
||||||
<name>WorldGuardExtraFlags</name>
|
<name>WorldGuardExtraFlags</name>
|
||||||
<build>
|
<build>
|
||||||
<finalName>WorldGuardExtraFlagsPlugin</finalName>
|
<finalName>WorldGuardExtraFlagsPlugin</finalName>
|
||||||
|
|
|
@ -47,28 +47,11 @@ public class CommandOnEntryFlag extends Handler
|
||||||
|
|
||||||
for(Set<String> commands_ : commands)
|
for(Set<String> commands_ : commands)
|
||||||
{
|
{
|
||||||
if (!this.lastCommands.contains(commands_))
|
if (!this.lastCommands.contains(commands_) && commands_.size() > 0)
|
||||||
{
|
{
|
||||||
boolean isOp = player.isOp();
|
for(String command : commands_)
|
||||||
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
if (!isOp)
|
WorldGuardExtraFlagsPlugin.getPlugin().getServer().dispatchCommand(player, command.substring(1).replace("%username%", player.getName())); //TODO: Make this better
|
||||||
{
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -65,31 +65,12 @@ public class CommandOnExitFlag extends Handler
|
||||||
|
|
||||||
for(Set<String> commands_ : this.lastCommands)
|
for(Set<String> commands_ : this.lastCommands)
|
||||||
{
|
{
|
||||||
if (!commands.contains(commands_))
|
if (!commands.contains(commands_) && commands_.size() > 0)
|
||||||
{
|
{
|
||||||
boolean isOp = player.isOp();
|
for(String command : commands_)
|
||||||
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
if (!isOp)
|
WorldGuardExtraFlagsPlugin.getPlugin().getServer().dispatchCommand(player, command.substring(1).replace("%username%", player.getName())); //TODO: Make this better
|
||||||
{
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name: WorldGuardExtraFlags
|
name: WorldGuardExtraFlags
|
||||||
version: 2.14.2
|
version: 2.14.3
|
||||||
description: Adds more flags to worldguard to help manage your server easily!
|
description: Adds more flags to worldguard to help manage your server easily!
|
||||||
author: isokissa3
|
author: isokissa3
|
||||||
website: https://goldtreevers.net
|
website: https://goldtreevers.net
|
||||||
|
|
Loading…
Reference in a new issue