mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-01-02 22:07:50 +01:00
Rename "WildCard" to "ParameterName"
This commit is contained in:
parent
e7f05617cc
commit
bb636d774f
@ -34,7 +34,7 @@ public abstract class ActionWithParameters extends Action {
|
||||
}
|
||||
// Found a matching closing brace
|
||||
else {
|
||||
WildCard w = WildCard.get(parts2[0]);
|
||||
ParameterName w = ParameterName.get(parts2[0]);
|
||||
|
||||
if(w != null) {
|
||||
// Found an existing wildcard inbetween the braces
|
||||
@ -66,7 +66,7 @@ public abstract class ActionWithParameters extends Action {
|
||||
if(part instanceof String) {
|
||||
log.append((String) part);
|
||||
} else {
|
||||
log.append(check.getParameter((WildCard) part, player));
|
||||
log.append(check.getParameter((ParameterName) part, player));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,16 +1,16 @@
|
||||
package cc.co.evenprime.bukkit.nocheat.actions.types;
|
||||
|
||||
public enum WildCard {
|
||||
public enum ParameterName {
|
||||
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) {
|
||||
private ParameterName(String s) {
|
||||
this.s = s;
|
||||
}
|
||||
|
||||
public static final WildCard get(String s) {
|
||||
for(WildCard c : WildCard.values()) {
|
||||
public static final ParameterName get(String s) {
|
||||
for(ParameterName c : ParameterName.values()) {
|
||||
if(c.s.equals(s)) {
|
||||
return c;
|
||||
}
|
@ -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.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ParameterName;
|
||||
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;
|
||||
@ -29,7 +29,7 @@ public abstract class BlockPlaceCheck extends Check {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getParameter(WildCard wildcard, NoCheatPlayer player) {
|
||||
public String getParameter(ParameterName wildcard, NoCheatPlayer player) {
|
||||
switch (wildcard) {
|
||||
|
||||
case PLACE_LOCATION: {
|
||||
|
@ -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.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ParameterName;
|
||||
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;
|
||||
@ -23,7 +23,7 @@ public abstract class ChatCheck extends Check {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getParameter(WildCard wildcard, NoCheatPlayer player) {
|
||||
public String getParameter(ParameterName wildcard, NoCheatPlayer player) {
|
||||
switch (wildcard) {
|
||||
|
||||
case TEXT: {
|
||||
|
@ -11,7 +11,7 @@ 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.actions.types.ParameterName;
|
||||
import cc.co.evenprime.bukkit.nocheat.config.cache.ConfigurationCache;
|
||||
import cc.co.evenprime.bukkit.nocheat.data.ExecutionHistory;
|
||||
|
||||
@ -77,7 +77,7 @@ public abstract class Check {
|
||||
}
|
||||
}
|
||||
|
||||
public String getParameter(WildCard wildcard, NoCheatPlayer player) {
|
||||
public String getParameter(ParameterName wildcard, NoCheatPlayer player) {
|
||||
|
||||
switch (wildcard) {
|
||||
case PLAYER:
|
||||
|
@ -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.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ParameterName;
|
||||
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;
|
||||
@ -32,7 +32,7 @@ public abstract class MovingCheck extends Check {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getParameter(WildCard wildcard, NoCheatPlayer player) {
|
||||
public String getParameter(ParameterName wildcard, NoCheatPlayer player) {
|
||||
|
||||
switch (wildcard) {
|
||||
|
||||
|
@ -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.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ParameterName;
|
||||
import cc.co.evenprime.bukkit.nocheat.checks.BlockBreakCheck;
|
||||
import cc.co.evenprime.bukkit.nocheat.checks.CheckUtil;
|
||||
import cc.co.evenprime.bukkit.nocheat.config.Permissions;
|
||||
@ -79,7 +79,7 @@ public class DirectionCheck extends BlockBreakCheck {
|
||||
return cc.directionCheck;
|
||||
}
|
||||
|
||||
public String getParameter(WildCard wildcard, NoCheatPlayer player) {
|
||||
public String getParameter(ParameterName wildcard, NoCheatPlayer player) {
|
||||
|
||||
switch (wildcard) {
|
||||
|
||||
|
@ -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.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ParameterName;
|
||||
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;
|
||||
@ -39,7 +39,7 @@ public class NoswingCheck extends BlockBreakCheck {
|
||||
return cc.noswingCheck;
|
||||
}
|
||||
|
||||
public String getParameter(WildCard wildcard, NoCheatPlayer player) {
|
||||
public String getParameter(ParameterName wildcard, NoCheatPlayer player) {
|
||||
|
||||
switch (wildcard) {
|
||||
|
||||
|
@ -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.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ParameterName;
|
||||
import cc.co.evenprime.bukkit.nocheat.checks.BlockBreakCheck;
|
||||
import cc.co.evenprime.bukkit.nocheat.checks.CheckUtil;
|
||||
import cc.co.evenprime.bukkit.nocheat.config.Permissions;
|
||||
@ -52,7 +52,7 @@ public class ReachCheck extends BlockBreakCheck {
|
||||
return cc.reachCheck;
|
||||
}
|
||||
|
||||
public String getParameter(WildCard wildcard, NoCheatPlayer player) {
|
||||
public String getParameter(ParameterName wildcard, NoCheatPlayer player) {
|
||||
|
||||
switch (wildcard) {
|
||||
|
||||
|
@ -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.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ParameterName;
|
||||
import cc.co.evenprime.bukkit.nocheat.checks.BlockPlaceCheck;
|
||||
import cc.co.evenprime.bukkit.nocheat.checks.CheckUtil;
|
||||
import cc.co.evenprime.bukkit.nocheat.config.Permissions;
|
||||
@ -93,7 +93,7 @@ public class DirectionCheck extends BlockPlaceCheck {
|
||||
return cc.directionCheck;
|
||||
}
|
||||
|
||||
public String getParameter(WildCard wildcard, NoCheatPlayer player) {
|
||||
public String getParameter(ParameterName wildcard, NoCheatPlayer player) {
|
||||
|
||||
switch (wildcard) {
|
||||
|
||||
|
@ -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.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ParameterName;
|
||||
import cc.co.evenprime.bukkit.nocheat.checks.BlockPlaceCheck;
|
||||
import cc.co.evenprime.bukkit.nocheat.checks.CheckUtil;
|
||||
import cc.co.evenprime.bukkit.nocheat.config.Permissions;
|
||||
@ -53,7 +53,7 @@ public class ReachCheck extends BlockPlaceCheck {
|
||||
return cc.reachCheck;
|
||||
}
|
||||
|
||||
public String getParameter(WildCard wildcard, NoCheatPlayer player) {
|
||||
public String getParameter(ParameterName wildcard, NoCheatPlayer player) {
|
||||
|
||||
switch (wildcard) {
|
||||
|
||||
|
@ -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.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ParameterName;
|
||||
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;
|
||||
@ -37,7 +37,7 @@ public class EmptyCheck extends ChatCheck {
|
||||
return cc.emptyCheck;
|
||||
}
|
||||
|
||||
public String getParameter(WildCard wildcard, NoCheatPlayer player) {
|
||||
public String getParameter(ParameterName wildcard, NoCheatPlayer player) {
|
||||
|
||||
switch (wildcard) {
|
||||
|
||||
|
@ -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.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ParameterName;
|
||||
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;
|
||||
@ -53,7 +53,7 @@ public class SpamCheck extends ChatCheck {
|
||||
return cc.spamCheck;
|
||||
}
|
||||
|
||||
public String getParameter(WildCard wildcard, NoCheatPlayer player) {
|
||||
public String getParameter(ParameterName wildcard, NoCheatPlayer player) {
|
||||
|
||||
switch (wildcard) {
|
||||
|
||||
|
@ -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.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ParameterName;
|
||||
import cc.co.evenprime.bukkit.nocheat.checks.CheckUtil;
|
||||
import cc.co.evenprime.bukkit.nocheat.checks.FightCheck;
|
||||
import cc.co.evenprime.bukkit.nocheat.config.Permissions;
|
||||
@ -75,7 +75,7 @@ public class DirectionCheck extends FightCheck {
|
||||
return cc.directionCheck;
|
||||
}
|
||||
|
||||
public String getParameter(WildCard wildcard, NoCheatPlayer player) {
|
||||
public String getParameter(ParameterName wildcard, NoCheatPlayer player) {
|
||||
|
||||
switch (wildcard) {
|
||||
|
||||
|
@ -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.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ParameterName;
|
||||
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;
|
||||
@ -40,7 +40,7 @@ public class NoswingCheck extends FightCheck {
|
||||
return cc.noswingCheck;
|
||||
}
|
||||
|
||||
public String getParameter(WildCard wildcard, NoCheatPlayer player) {
|
||||
public String getParameter(ParameterName wildcard, NoCheatPlayer player) {
|
||||
|
||||
switch (wildcard) {
|
||||
|
||||
|
@ -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.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ParameterName;
|
||||
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;
|
||||
@ -40,7 +40,7 @@ public class SelfhitCheck extends FightCheck {
|
||||
return cc.selfhitCheck;
|
||||
}
|
||||
|
||||
public String getParameter(WildCard wildcard, NoCheatPlayer player) {
|
||||
public String getParameter(ParameterName wildcard, NoCheatPlayer player) {
|
||||
|
||||
switch (wildcard) {
|
||||
|
||||
|
@ -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.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ParameterName;
|
||||
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;
|
||||
@ -113,7 +113,7 @@ public class FlyingCheck extends MovingCheck {
|
||||
return moving.allowFlying && moving.runflyCheck;
|
||||
}
|
||||
|
||||
public String getParameter(WildCard wildcard, NoCheatPlayer player) {
|
||||
public String getParameter(ParameterName wildcard, NoCheatPlayer player) {
|
||||
|
||||
switch (wildcard) {
|
||||
|
||||
|
@ -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.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ParameterName;
|
||||
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;
|
||||
@ -107,7 +107,7 @@ public class MorePacketsCheck extends MovingCheck {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getParameter(WildCard wildcard, NoCheatPlayer player) {
|
||||
public String getParameter(ParameterName wildcard, NoCheatPlayer player) {
|
||||
|
||||
switch (wildcard) {
|
||||
case VIOLATIONS:
|
||||
|
@ -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.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ParameterName;
|
||||
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;
|
||||
@ -104,7 +104,7 @@ public class NoFallCheck extends MovingCheck {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getParameter(WildCard wildcard, NoCheatPlayer player) {
|
||||
public String getParameter(ParameterName wildcard, NoCheatPlayer player) {
|
||||
|
||||
switch (wildcard) {
|
||||
case VIOLATIONS:
|
||||
|
@ -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.WildCard;
|
||||
import cc.co.evenprime.bukkit.nocheat.actions.types.ParameterName;
|
||||
import cc.co.evenprime.bukkit.nocheat.checks.CheckUtil;
|
||||
import cc.co.evenprime.bukkit.nocheat.checks.MovingCheck;
|
||||
import cc.co.evenprime.bukkit.nocheat.config.Permissions;
|
||||
@ -226,7 +226,7 @@ public class RunningCheck extends MovingCheck {
|
||||
return moving.runflyCheck && !moving.allowFlying;
|
||||
}
|
||||
|
||||
public String getParameter(WildCard wildcard, NoCheatPlayer player) {
|
||||
public String getParameter(ParameterName wildcard, NoCheatPlayer player) {
|
||||
|
||||
switch (wildcard) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user