Skip to content

Commit

Permalink
feat: requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
overkidding committed Feb 25, 2025
1 parent 068ad9a commit b60f7b5
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/main/java/ac/grim/grimac/checks/Check.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class Check extends GrimProcessor implements AbstractCheck {
private boolean noSetbackPermission;
private boolean noModifyPacketPermission;

private CheckType type = CheckType.OTHER;
private CheckType type;

@Override
public boolean isExperimental() {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ac/grim/grimac/checks/CheckData.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@

boolean experimental() default false;

CheckType checkType();
CheckType checkType() default CheckType.OTHER;

}
6 changes: 2 additions & 4 deletions src/main/java/ac/grim/grimac/checks/CheckType.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@
import org.apache.commons.lang.StringUtils;

public enum CheckType {

MOVEMENT,
ROTATION,
COMBAT,
PACKETS,
WORLD,
OTHER;

public String displayName(){
String loweredEnumName = this.name().toLowerCase();
return StringUtils.capitalize(loweredEnumName);
public String displayName() {
return StringUtils.capitalize(this.name().toLowerCase());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import ac.grim.grimac.checks.Check;
import ac.grim.grimac.checks.CheckData;
import ac.grim.grimac.checks.CheckType;
import ac.grim.grimac.checks.type.PostPredictionCheck;
import ac.grim.grimac.player.GrimPlayer;
import ac.grim.grimac.utils.anticheat.update.PredictionComplete;
Expand All @@ -12,7 +13,7 @@

import java.util.ArrayList;

@CheckData(name = "MultiInteractA", description = "Interacted with multiple entities in the same tick", experimental = true)
@CheckData(name = "MultiInteractA", description = "Interacted with multiple entities in the same tick", experimental = true, checkType = CheckType.COMBAT)
public class MultiInteractA extends Check implements PostPredictionCheck {
public MultiInteractA(final GrimPlayer player) {
super(player);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import ac.grim.grimac.checks.Check;
import ac.grim.grimac.checks.CheckData;
import ac.grim.grimac.checks.CheckType;
import ac.grim.grimac.checks.type.PostPredictionCheck;
import ac.grim.grimac.player.GrimPlayer;
import ac.grim.grimac.utils.anticheat.MessageUtil;
Expand All @@ -14,7 +15,7 @@

import java.util.ArrayList;

@CheckData(name = "MultiInteractB", experimental = true)
@CheckData(name = "MultiInteractB", experimental = true, checkType = CheckType.COMBAT)
public class MultiInteractB extends Check implements PostPredictionCheck {
public MultiInteractB(final GrimPlayer player) {
super(player);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import ac.grim.grimac.checks.Check;
import ac.grim.grimac.checks.CheckData;
import ac.grim.grimac.checks.CheckType;
import ac.grim.grimac.checks.type.PacketCheck;
import ac.grim.grimac.player.GrimPlayer;
import com.github.retrooper.packetevents.PacketEvents;
Expand All @@ -14,7 +15,7 @@

// this can false from click events, but I doubt this would actually
// happen unless they're trying to flag, or if the server is set up badly
@CheckData(name = "ExploitC", description = "Invalid chat message")
@CheckData(name = "ExploitC", description = "Invalid chat message", checkType = CheckType.PACKETS)
public class ExploitC extends Check implements PacketCheck {
public ExploitC(GrimPlayer playerData) {
super(playerData);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

// Catches NoFalls for LOOK and GROUND packets
// This check runs AFTER the predictions
@CheckData(name = "NoFall", setback = 10, checkType = CheckType.PACKETS)
@CheckData(name = "NoFall", configName = "nofall", setback = 10, checkType = CheckType.PACKETS)
public class NoFall extends Check implements PacketCheck {

public boolean flipPlayerGroundStatus = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import ac.grim.grimac.utils.anticheat.update.BlockPlace;
import ac.grim.grimac.utils.anticheat.update.RotationUpdate;

@CheckData(name = "DuplicateRotPlace", experimental = true, checkType = CheckType.WORLD)
@CheckData(name = "DuplicateRotPlace", experimental = true, checkType = CheckType.ROTATION)
public class DuplicateRotPlace extends BlockPlaceCheck {

public DuplicateRotPlace(GrimPlayer player) {
Expand Down

0 comments on commit b60f7b5

Please sign in to comment.