forked from GrimAnticheat/Grim
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MVP for new CheckManager; faster iteration; structure to support relo…
…ading, adding/unloading checks
- Loading branch information
Showing
14 changed files
with
586 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
src/main/java/ac/grim/grimac/checks/type/BlockBreakCheck.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
package ac.grim.grimac.checks.type; | ||
|
||
import ac.grim.grimac.api.CheckType; | ||
import ac.grim.grimac.utils.anticheat.update.BlockBreak; | ||
|
||
public interface BlockBreakCheck extends PostPredictionCheck { | ||
default void onBlockBreak(final BlockBreak blockBreak) {} | ||
|
||
@Override | ||
default int getCheckMask() { | ||
return CheckType.BLOCK_PLACE.getMask(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
package ac.grim.grimac.checks.type; | ||
|
||
import ac.grim.grimac.api.AbstractCheck; | ||
import ac.grim.grimac.api.CheckType; | ||
import com.github.retrooper.packetevents.event.PacketReceiveEvent; | ||
import com.github.retrooper.packetevents.event.PacketSendEvent; | ||
|
||
public interface PacketCheck extends AbstractCheck { | ||
default void onPacketReceive(final PacketReceiveEvent event) {} | ||
default void onPacketSend(final PacketSendEvent event) {} | ||
@Override | ||
default int getCheckMask() { | ||
return CheckType.PACKET.getMask(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
package ac.grim.grimac.checks.type; | ||
|
||
import ac.grim.grimac.api.AbstractCheck; | ||
import ac.grim.grimac.api.CheckType; | ||
import ac.grim.grimac.utils.anticheat.update.PositionUpdate; | ||
|
||
public interface PositionCheck extends AbstractCheck { | ||
|
||
default void onPositionUpdate(final PositionUpdate positionUpdate) { | ||
} | ||
@Override | ||
default int getCheckMask() { | ||
return CheckType.POSITION.getMask(); | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/java/ac/grim/grimac/checks/type/PostPredictionCheck.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
package ac.grim.grimac.checks.type; | ||
|
||
import ac.grim.grimac.api.CheckType; | ||
import ac.grim.grimac.utils.anticheat.update.PredictionComplete; | ||
|
||
public interface PostPredictionCheck extends PacketCheck { | ||
|
||
default void onPredictionComplete(final PredictionComplete predictionComplete) { | ||
} | ||
@Override | ||
default int getCheckMask() { | ||
return CheckType.POST_PREDICTION.getMask(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
package ac.grim.grimac.checks.type; | ||
|
||
import ac.grim.grimac.api.AbstractCheck; | ||
import ac.grim.grimac.api.CheckType; | ||
import ac.grim.grimac.utils.anticheat.update.RotationUpdate; | ||
|
||
public interface RotationCheck extends AbstractCheck { | ||
|
||
default void process(final RotationUpdate rotationUpdate) { | ||
} | ||
@Override | ||
default int getCheckMask() { | ||
return CheckType.ROTATION.getMask(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
package ac.grim.grimac.checks.type; | ||
|
||
import ac.grim.grimac.api.AbstractCheck; | ||
import ac.grim.grimac.api.CheckType; | ||
import ac.grim.grimac.utils.anticheat.update.VehiclePositionUpdate; | ||
|
||
public interface VehicleCheck extends AbstractCheck { | ||
|
||
void process(final VehiclePositionUpdate vehicleUpdate); | ||
|
||
@Override | ||
default int getCheckMask() { | ||
return CheckType.VEHICLE.getMask(); | ||
} | ||
} |
Oops, something went wrong.