mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-12-30 20:37:52 +01:00
Moved "Wildcard" to its own enum class to potentially avoid
"IllegalAccessErrors" on some setups/VMs etc.
This commit is contained in:
parent
675a6a85d8
commit
e7f05617cc
@ -7,26 +7,6 @@ import cc.co.evenprime.bukkit.nocheat.checks.Check;
|
||||
|
||||
public abstract class ActionWithParameters extends Action {
|
||||
|
||||
public enum WildCard {
|
||||
PLAYER("player"), LOCATION("location"), WORLD("world"), VIOLATIONS("violations"), MOVEDISTANCE("movedistance"), REACHDISTANCE("reachdistance"), FALLDISTANCE("falldistance"), LOCATION_TO("locationto"), CHECK("check"), PACKETS("packets"), TEXT("text"), PLACE_LOCATION("placelocation"), PLACE_AGAINST("placeagainst"), BLOCK_TYPE("blocktype");
|
||||
|
||||
private final String s;
|
||||
|
||||
private WildCard(String s) {
|
||||
this.s = s;
|
||||
}
|
||||
|
||||
private static final WildCard get(String s) {
|
||||
for(WildCard c : WildCard.values()) {
|
||||
if(c.s.equals(s)) {
|
||||
return c;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private final ArrayList<Object> messageParts;
|
||||
|
||||
public ActionWithParameters(String name, int delay, int repeat, String message) {
|
||||
|
@ -0,0 +1,21 @@
|
||||
package cc.co.evenprime.bukkit.nocheat.actions.types;
|
||||
|
||||
public enum WildCard {
|
||||
PLAYER("player"), LOCATION("location"), WORLD("world"), VIOLATIONS("violations"), MOVEDISTANCE("movedistance"), REACHDISTANCE("reachdistance"), FALLDISTANCE("falldistance"), LOCATION_TO("locationto"), CHECK("check"), PACKETS("packets"), TEXT("text"), PLACE_LOCATION("placelocation"), PLACE_AGAINST("placeagainst"), BLOCK_TYPE("blocktype");
|
||||
|
||||
private final String s;
|
||||
|
||||
private WildCard(String s) {
|
||||
this.s = s;
|
||||
}
|
||||
|
||||
public static final WildCard get(String s) {
|
||||
for(WildCard c : WildCard.values()) {
|
||||
if(c.s.equals(s)) {
|
||||
return c;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
@ -4,7 +4,7 @@ import java.util.Locale;
|
||||
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheat;
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheatPlayer;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ActionWithParameters.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.config.cache.CCBlockPlace;
|
||||
import cc.co.evenprime.bukkit.nocheat.data.BlockPlaceData;
|
||||
import cc.co.evenprime.bukkit.nocheat.data.ExecutionHistory;
|
||||
|
@ -2,7 +2,7 @@ package cc.co.evenprime.bukkit.nocheat.checks;
|
||||
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheat;
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheatPlayer;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ActionWithParameters.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.config.cache.CCChat;
|
||||
import cc.co.evenprime.bukkit.nocheat.data.ChatData;
|
||||
import cc.co.evenprime.bukkit.nocheat.data.ExecutionHistory;
|
||||
|
@ -7,11 +7,11 @@ import org.bukkit.Location;
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheat;
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheatPlayer;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.Action;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ActionWithParameters.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ConsolecommandAction;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.DummyAction;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.LogAction;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.SpecialAction;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.config.cache.ConfigurationCache;
|
||||
import cc.co.evenprime.bukkit.nocheat.data.ExecutionHistory;
|
||||
|
||||
|
@ -4,7 +4,7 @@ import java.util.Locale;
|
||||
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheat;
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheatPlayer;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ActionWithParameters.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.config.cache.CCMoving;
|
||||
import cc.co.evenprime.bukkit.nocheat.data.ExecutionHistory;
|
||||
import cc.co.evenprime.bukkit.nocheat.data.MovingData;
|
||||
|
@ -4,7 +4,7 @@ import java.util.Locale;
|
||||
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheat;
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheatPlayer;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ActionWithParameters.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.checks.BlockBreakCheck;
|
||||
import cc.co.evenprime.bukkit.nocheat.checks.CheckUtil;
|
||||
import cc.co.evenprime.bukkit.nocheat.config.Permissions;
|
||||
|
@ -4,7 +4,7 @@ import java.util.Locale;
|
||||
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheat;
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheatPlayer;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ActionWithParameters.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.checks.BlockBreakCheck;
|
||||
import cc.co.evenprime.bukkit.nocheat.config.Permissions;
|
||||
import cc.co.evenprime.bukkit.nocheat.config.cache.CCBlockBreak;
|
||||
|
@ -4,7 +4,7 @@ import java.util.Locale;
|
||||
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheat;
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheatPlayer;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ActionWithParameters.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.checks.BlockBreakCheck;
|
||||
import cc.co.evenprime.bukkit.nocheat.checks.CheckUtil;
|
||||
import cc.co.evenprime.bukkit.nocheat.config.Permissions;
|
||||
|
@ -4,7 +4,7 @@ import java.util.Locale;
|
||||
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheat;
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheatPlayer;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ActionWithParameters.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.checks.BlockPlaceCheck;
|
||||
import cc.co.evenprime.bukkit.nocheat.checks.CheckUtil;
|
||||
import cc.co.evenprime.bukkit.nocheat.config.Permissions;
|
||||
|
@ -4,7 +4,7 @@ import java.util.Locale;
|
||||
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheat;
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheatPlayer;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ActionWithParameters.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.checks.BlockPlaceCheck;
|
||||
import cc.co.evenprime.bukkit.nocheat.checks.CheckUtil;
|
||||
import cc.co.evenprime.bukkit.nocheat.config.Permissions;
|
||||
|
@ -4,7 +4,7 @@ import java.util.Locale;
|
||||
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheat;
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheatPlayer;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ActionWithParameters.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.checks.ChatCheck;
|
||||
import cc.co.evenprime.bukkit.nocheat.config.Permissions;
|
||||
import cc.co.evenprime.bukkit.nocheat.config.cache.CCChat;
|
||||
|
@ -4,7 +4,7 @@ import java.util.Locale;
|
||||
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheat;
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheatPlayer;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ActionWithParameters.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.checks.ChatCheck;
|
||||
import cc.co.evenprime.bukkit.nocheat.config.Permissions;
|
||||
import cc.co.evenprime.bukkit.nocheat.config.cache.CCChat;
|
||||
|
@ -5,7 +5,7 @@ import java.util.Locale;
|
||||
import net.minecraft.server.Entity;
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheat;
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheatPlayer;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ActionWithParameters.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.checks.CheckUtil;
|
||||
import cc.co.evenprime.bukkit.nocheat.checks.FightCheck;
|
||||
import cc.co.evenprime.bukkit.nocheat.config.Permissions;
|
||||
|
@ -4,7 +4,7 @@ import java.util.Locale;
|
||||
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheat;
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheatPlayer;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ActionWithParameters.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.checks.FightCheck;
|
||||
import cc.co.evenprime.bukkit.nocheat.config.Permissions;
|
||||
import cc.co.evenprime.bukkit.nocheat.config.cache.CCFight;
|
||||
|
@ -4,7 +4,7 @@ import java.util.Locale;
|
||||
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheat;
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheatPlayer;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ActionWithParameters.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.checks.FightCheck;
|
||||
import cc.co.evenprime.bukkit.nocheat.config.Permissions;
|
||||
import cc.co.evenprime.bukkit.nocheat.config.cache.CCFight;
|
||||
|
@ -4,7 +4,7 @@ import java.util.Locale;
|
||||
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheat;
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheatPlayer;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ActionWithParameters.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.checks.MovingCheck;
|
||||
import cc.co.evenprime.bukkit.nocheat.config.cache.CCMoving;
|
||||
import cc.co.evenprime.bukkit.nocheat.data.MovingData;
|
||||
|
@ -4,7 +4,7 @@ import java.util.Locale;
|
||||
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheat;
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheatPlayer;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ActionWithParameters.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.checks.MovingCheck;
|
||||
import cc.co.evenprime.bukkit.nocheat.config.Permissions;
|
||||
import cc.co.evenprime.bukkit.nocheat.config.cache.CCMoving;
|
||||
|
@ -4,7 +4,7 @@ import java.util.Locale;
|
||||
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheat;
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheatPlayer;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ActionWithParameters.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.checks.MovingCheck;
|
||||
import cc.co.evenprime.bukkit.nocheat.config.Permissions;
|
||||
import cc.co.evenprime.bukkit.nocheat.config.cache.CCMoving;
|
||||
|
@ -4,7 +4,7 @@ import java.util.Locale;
|
||||
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheat;
|
||||
import cc.co.evenprime.bukkit.nocheat.NoCheatPlayer;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ActionWithParameters.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.checks.CheckUtil;
|
||||
import cc.co.evenprime.bukkit.nocheat.checks.MovingCheck;
|
||||
import cc.co.evenprime.bukkit.nocheat.config.Permissions;
|
||||
|
Loading…
Reference in New Issue
Block a user