mirror of
https://github.com/TotalFreedomMC/TF-WorldGuardExtraFlagsPlugin.git
synced 2025-07-31 09:52:42 +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
4 changed files with 10 additions and 21 deletions
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.1</version>
|
<version>2.14.2</version>
|
||||||
<name>WorldGuardExtraFlags</name>
|
<name>WorldGuardExtraFlags</name>
|
||||||
<build>
|
<build>
|
||||||
<finalName>WorldGuardExtraFlagsPlugin</finalName>
|
<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();
|
boolean isOp = player.isOp();
|
||||||
|
|
||||||
|
|
|
@ -63,29 +63,18 @@ public class ConsoleCommandOnExitFlag extends Handler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean isOp = player.isOp();
|
for(Set<String> commands_ : this.lastCommands)
|
||||||
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
player.setOp(true);
|
if (!commands.contains(commands_))
|
||||||
|
|
||||||
for(Set<String> commands_ : 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
|
||||||
{
|
|
||||||
WorldGuardExtraFlagsPlugin.getPlugin().getServer().dispatchCommand(WorldGuardExtraFlagsPlugin.getPlugin().getServer().getConsoleSender(), command.substring(1).replace("%username%", player.getName())); //TODO: Make this better
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
finally
|
|
||||||
{
|
|
||||||
player.setOp(isOp);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.lastCommands = commands;
|
this.lastCommands = commands;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name: WorldGuardExtraFlags
|
name: WorldGuardExtraFlags
|
||||||
version: 2.14.1
|
version: 2.14.2
|
||||||
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…
Add table
Add a link
Reference in a new issue