diff --git a/pom.xml b/pom.xml
index b6d5100..62d5539 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,8 +5,8 @@
4.0.0
me.tecnio
- AntiHaxerman
- 4.0.1
+ antihaxerman
+ 4.0.2
8
@@ -43,17 +43,27 @@
org.atteo.classindex
- me.tecnio.ahm.classindex
+ me.tecnio.ahm.libs.classindex
-
co.aikar
- me.tecnio.ahm.aikar
+ me.tecnio.ahm.libs.aikar
-
org.bstats
- me.tecnio.ahm
+ me.tecnio.ahm.libs.bstats
+
+
+ ac.artemis.packet
+ me.tecnio.ahm.libs.artemis
+
+
+ cc.ghast.packet
+ me.tecnio.ahm.libs.ghast
+
+
+ com.github.steveice10.opennbt
+ me.tecnio.ahm.libs.opennbt
@@ -94,28 +104,32 @@
org.projectlombok
lombok
- 1.18.30
+ 1.18.32
provided
com.github.artemisac.artemis-packet-api
api
2.0.0-beta-3
+ compile
com.github.artemisac.artemis-packet-api
spigot
2.0.0-beta-3
+ compile
org.atteo.classindex
classindex
3.13
+ compile
co.aikar
acf-paper
0.5.1-SNAPSHOT
+ compile
org.bstats
diff --git a/src/main/java/me/tecnio/ahm/AHM.java b/src/main/java/me/tecnio/ahm/AHM.java
index 58fd363..9b96698 100644
--- a/src/main/java/me/tecnio/ahm/AHM.java
+++ b/src/main/java/me/tecnio/ahm/AHM.java
@@ -45,6 +45,16 @@ public enum AHM {
public void start(final JavaPlugin plugin) {
this.plugin = plugin;
+ if (!Bukkit.getVersion().contains("1.8.8")) {
+ logger.severe("AntiHaxerman is only compatible with 1.8.8 servers.");
+ logger.severe("AntiHaxerman is only compatible with 1.8.8 servers.");
+ logger.severe("AntiHaxerman is only compatible with 1.8.8 servers.");
+
+ Bukkit.getPluginManager().disablePlugin(this.plugin);
+
+ return;
+ }
+
registerMetrics();
registerManagers();
registerConfiguration();
@@ -57,12 +67,13 @@ public void end() {
terminateManagers();
}
- public void registerMetrics() {
+
+ private void registerMetrics() {
System.setProperty("bstats.relocatecheck", "false");
new Metrics(this.plugin, 11350);
}
- public void registerManagers() {
+ private void registerManagers() {
install(CheckManager.class, new CheckManager());
install(ConfigManager.class, new ConfigManager());
install(PlayerDataManager.class, new PlayerDataManager());
@@ -70,21 +81,21 @@ public void registerManagers() {
install(PaperCommandManager.class, new PaperCommandManager(this.plugin));
}
- public void registerConfiguration() {
+ private void registerConfiguration() {
get(ConfigManager.class).generate();
get(ConfigManager.class).load();
}
- public void registerListeners() {
+ private void registerListeners() {
Bukkit.getPluginManager().registerEvents(new RegistrationListener(), this.plugin);
}
- public void registerPacketAPI() {
+ private void registerPacketAPI() {
PacketManager.INSTANCE.init(this.plugin);
PacketAPI.addListener(new NetworkListener());
}
- public void registerCommands() {
+ private void registerCommands() {
get(PaperCommandManager.class).enableUnstableAPI("help");
Arrays.asList(
@@ -97,7 +108,7 @@ public void registerCommands() {
});
}
- public void terminateManagers() {
+ private void terminateManagers() {
this.dataManager = null;
this.checkManager = null;
this.alertManager = null;
diff --git a/src/main/java/me/tecnio/ahm/alert/AlertManager.java b/src/main/java/me/tecnio/ahm/alert/AlertManager.java
index d78c10c..1b42078 100644
--- a/src/main/java/me/tecnio/ahm/alert/AlertManager.java
+++ b/src/main/java/me/tecnio/ahm/alert/AlertManager.java
@@ -1,5 +1,6 @@
package me.tecnio.ahm.alert;
+import lombok.Getter;
import me.tecnio.ahm.AHM;
import me.tecnio.ahm.alert.alert.AlertHandler;
import me.tecnio.ahm.alert.alert.AlertHandlerFactory;
@@ -14,6 +15,7 @@
public class AlertManager {
+ @Getter
private final Set players = new HashSet<>();
private final String format = ChatUtil.translate(
diff --git a/src/main/java/me/tecnio/ahm/data/PlayerData.java b/src/main/java/me/tecnio/ahm/data/PlayerData.java
index 5f924e7..fa3012b 100644
--- a/src/main/java/me/tecnio/ahm/data/PlayerData.java
+++ b/src/main/java/me/tecnio/ahm/data/PlayerData.java
@@ -93,7 +93,7 @@ public PlayerData(final Player player) {
}
public void terminate() {
- // in case I need it idk
+ AHM.get(AlertManager.class).getPlayers().remove(this);
}
public void updateTicks() {
diff --git a/src/main/java/me/tecnio/ahm/data/tracker/impl/PositionTracker.java b/src/main/java/me/tecnio/ahm/data/tracker/impl/PositionTracker.java
index 0343bcb..f523ca1 100644
--- a/src/main/java/me/tecnio/ahm/data/tracker/impl/PositionTracker.java
+++ b/src/main/java/me/tecnio/ahm/data/tracker/impl/PositionTracker.java
@@ -171,13 +171,15 @@ public void handle(final GPacket packet) {
else if (packet instanceof PacketPlayServerPosition) {
final GPacketPlayServerPosition wrapper = ((GPacketPlayServerPosition) packet);
- data.getConnectionTracker().confirm(() -> this.teleportQueue.add(new Teleport(wrapper.getX(), wrapper.getY(), wrapper.getZ(), wrapper.getFlags())));
+ data.getConnectionTracker().confirm(() -> this.teleportQueue.add(
+ new Teleport(wrapper.getX(), wrapper.getY(), wrapper.getZ(), wrapper.getFlags())));
}
}
@Override
public void handlePost(final GPacket packet) {
- if (packet instanceof PacketPlayClientFlying && ((PacketPlayClientFlying) packet).isPos()) {
+ if (packet instanceof PacketPlayClientFlying
+ && ((PacketPlayClientFlying) packet).isPos()) {
this.delayedFlyingTicks = 0;
}
}
diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml
index 30cb4e6..2160230 100644
--- a/src/main/resources/plugin.yml
+++ b/src/main/resources/plugin.yml
@@ -1,6 +1,6 @@
name: AntiHaxerman
-version: 4.0.1
+version: 4.0.2
main: me.tecnio.ahm.AHMPlugin
-authors: [Tecnio, Incognito, aSwitch]
+authors: [Tecnio, Incognito, aSwitch, Mexify, Cyanade]
description: An open-sourced anti-cheat solution.
load: STARTUP
\ No newline at end of file