-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
622d09d
commit 93bdfab
Showing
4 changed files
with
63 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,16 @@ | ||
package ac.artemis.anticheat.api; | ||
|
||
import ac.artemis.anticheat.api.listener.VerboseListener; | ||
import cc.ghast.packet.nms.ProtocolVersion; | ||
|
||
import java.util.UUID; | ||
|
||
public interface ArtemisAPI { | ||
ProtocolVersion getVersion(UUID uuid); | ||
|
||
void addVerboseListener(VerboseListener verboseListener); | ||
|
||
void removeVerboseListener(VerboseListener verboseListener); | ||
|
||
void clearVerboseListeners(); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package ac.artemis.anticheat.api.alert; | ||
|
||
import ac.artemis.anticheat.api.check.CheckInfo; | ||
|
||
import java.util.UUID; | ||
|
||
public interface Alert { | ||
/** | ||
* Returns the severity of the alert. An alert can either be a verbose or a violation. | ||
* @return Severity of alert | ||
*/ | ||
Severity getSeverity(); | ||
|
||
/** | ||
* UUID of the player that has flagged | ||
* @return The UUID | ||
*/ | ||
UUID getUuid(); | ||
|
||
/** | ||
* Information about the check in question | ||
* @return Information about the checkinformation | ||
*/ | ||
CheckInfo getCheck(); | ||
|
||
/** | ||
* Violation digit | ||
* @return Integer representing the above | ||
*/ | ||
int count(); | ||
|
||
/** | ||
* Value that corresponds to a Minecraft chat message | ||
* @return Minecraft chat message value | ||
*/ | ||
String toMinecraftMessage(); | ||
|
||
} |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package ac.artemis.anticheat.api.alert; | ||
|
||
public enum Severity { | ||
VERBOSE, | ||
VIOLATION; | ||
} |
12 changes: 12 additions & 0 deletions
12
src/main/java/ac/artemis/anticheat/api/listener/VerboseListener.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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package ac.artemis.anticheat.api.listener; | ||
|
||
import ac.artemis.anticheat.api.alert.Alert; | ||
|
||
public interface VerboseListener { | ||
/** | ||
* Will listen to every kind of verbose. This can be constructed as a Player, | ||
* a discord or whatnot. | ||
* @param alert Alert that has to be received | ||
*/ | ||
void receive(Alert alert); | ||
} |