mirror of
https://github.com/TotalFreedomMC/TF-WorldGuardExtraFlagsPlugin.git
synced 2024-06-25 04:30:37 +00:00
Fixed command-on-exit & console-command-on-exit executes on entry (also removed it from oping idk wth that was doing there)
This commit is contained in:
parent
0a15fa5dff
commit
d58e90ffe5
2
pom.xml
2
pom.xml
|
@ -3,7 +3,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>net.goldtreeservers</groupId>
|
||||
<artifactId>worldguardextraflags</artifactId>
|
||||
<version>2.14.1</version>
|
||||
<version>2.14.2</version>
|
||||
<name>WorldGuardExtraFlags</name>
|
||||
<build>
|
||||
<finalName>WorldGuardExtraFlagsPlugin</finalName>
|
||||
|
|
|
@ -63,9 +63,9 @@ public class CommandOnExitFlag extends Handler
|
|||
}
|
||||
}
|
||||
|
||||
for(Set<String> commands_ : commands)
|
||||
for(Set<String> commands_ : this.lastCommands)
|
||||
{
|
||||
if (!this.lastCommands.contains(commands_))
|
||||
if (!commands.contains(commands_))
|
||||
{
|
||||
boolean isOp = player.isOp();
|
||||
|
||||
|
|
|
@ -63,29 +63,18 @@ public class ConsoleCommandOnExitFlag extends Handler
|
|||
}
|
||||
}
|
||||
|
||||
boolean isOp = player.isOp();
|
||||
|
||||
try
|
||||
for(Set<String> commands_ : this.lastCommands)
|
||||
{
|
||||
player.setOp(true);
|
||||
|
||||
for(Set<String> commands_ : commands)
|
||||
if (!commands.contains(commands_))
|
||||
{
|
||||
if (!this.lastCommands.contains(commands_))
|
||||
for(String command : commands_)
|
||||
{
|
||||
for(String command : commands_)
|
||||
{
|
||||
WorldGuardExtraFlagsPlugin.getPlugin().getServer().dispatchCommand(WorldGuardExtraFlagsPlugin.getPlugin().getServer().getConsoleSender(), command.substring(1).replace("%username%", player.getName())); //TODO: Make this better
|
||||
}
|
||||
|
||||
break;
|
||||
WorldGuardExtraFlagsPlugin.getPlugin().getServer().dispatchCommand(WorldGuardExtraFlagsPlugin.getPlugin().getServer().getConsoleSender(), command.substring(1).replace("%username%", player.getName())); //TODO: Make this better
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
player.setOp(isOp);
|
||||
}
|
||||
|
||||
this.lastCommands = commands;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
name: WorldGuardExtraFlags
|
||||
version: 2.14.1
|
||||
version: 2.14.2
|
||||
description: Adds more flags to worldguard to help manage your server easily!
|
||||
author: isokissa3
|
||||
website: https://goldtreevers.net
|
||||
|
|
Loading…
Reference in a new issue