diff --git a/.gradle/8.12/executionHistory/executionHistory.bin b/.gradle/8.12/executionHistory/executionHistory.bin
index fa519ad..99f5f78 100644
Binary files a/.gradle/8.12/executionHistory/executionHistory.bin and b/.gradle/8.12/executionHistory/executionHistory.bin differ
diff --git a/.gradle/8.12/executionHistory/executionHistory.lock b/.gradle/8.12/executionHistory/executionHistory.lock
index 068cff0..53329c3 100644
Binary files a/.gradle/8.12/executionHistory/executionHistory.lock and b/.gradle/8.12/executionHistory/executionHistory.lock differ
diff --git a/.gradle/8.12/fileHashes/fileHashes.bin b/.gradle/8.12/fileHashes/fileHashes.bin
index 455c7f4..778a2b8 100644
Binary files a/.gradle/8.12/fileHashes/fileHashes.bin and b/.gradle/8.12/fileHashes/fileHashes.bin differ
diff --git a/.gradle/8.12/fileHashes/fileHashes.lock b/.gradle/8.12/fileHashes/fileHashes.lock
index 1152306..412e73b 100644
Binary files a/.gradle/8.12/fileHashes/fileHashes.lock and b/.gradle/8.12/fileHashes/fileHashes.lock differ
diff --git a/.gradle/8.12/fileHashes/resourceHashesCache.bin b/.gradle/8.12/fileHashes/resourceHashesCache.bin
index cb1f45c..b81d9d2 100644
Binary files a/.gradle/8.12/fileHashes/resourceHashesCache.bin and b/.gradle/8.12/fileHashes/resourceHashesCache.bin differ
diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock
index d2de39b..bbb29a6 100644
Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ
diff --git a/.gradle/file-system.probe b/.gradle/file-system.probe
index b573649..7e6cec3 100644
Binary files a/.gradle/file-system.probe and b/.gradle/file-system.probe differ
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
deleted file mode 100644
index d0700b4..0000000
--- a/.idea/compiler.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
new file mode 100644
index 0000000..f9163b4
--- /dev/null
+++ b/.idea/gradle.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 9dc782b..03872dd 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,12 +1,5 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 389e93e..357afa7 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,28 +4,78 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+ {
+ "associatedIndex": 8
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ true
+ false
+ false
+
+
+
+
+
+
+
+
diff --git a/build/classes/java/main/re/imc/geysermodelengine/GeyserModelEngine.class b/build/classes/java/main/re/imc/geysermodelengine/GeyserModelEngine.class
index 8666af3..5c19ad4 100644
Binary files a/build/classes/java/main/re/imc/geysermodelengine/GeyserModelEngine.class and b/build/classes/java/main/re/imc/geysermodelengine/GeyserModelEngine.class differ
diff --git a/build/classes/java/main/re/imc/geysermodelengine/listener/ModelListener.class b/build/classes/java/main/re/imc/geysermodelengine/listener/ModelListener.class
index ae16c8f..ba7cc7d 100644
Binary files a/build/classes/java/main/re/imc/geysermodelengine/listener/ModelListener.class and b/build/classes/java/main/re/imc/geysermodelengine/listener/ModelListener.class differ
diff --git a/build/classes/java/main/re/imc/geysermodelengine/listener/MountPacketListener.class b/build/classes/java/main/re/imc/geysermodelengine/listener/MountPacketListener.class
index 779c016..76c9a4f 100644
Binary files a/build/classes/java/main/re/imc/geysermodelengine/listener/MountPacketListener.class and b/build/classes/java/main/re/imc/geysermodelengine/listener/MountPacketListener.class differ
diff --git a/build/classes/java/main/re/imc/geysermodelengine/managers/model/ModelManager.class b/build/classes/java/main/re/imc/geysermodelengine/managers/model/ModelManager.class
index 719ea12..c744140 100644
Binary files a/build/classes/java/main/re/imc/geysermodelengine/managers/model/ModelManager.class and b/build/classes/java/main/re/imc/geysermodelengine/managers/model/ModelManager.class differ
diff --git a/build/classes/java/main/re/imc/geysermodelengine/runnables/BedrockMountControlRunnable.class b/build/classes/java/main/re/imc/geysermodelengine/runnables/BedrockMountControlRunnable.class
index b3ca4c0..857e668 100644
Binary files a/build/classes/java/main/re/imc/geysermodelengine/runnables/BedrockMountControlRunnable.class and b/build/classes/java/main/re/imc/geysermodelengine/runnables/BedrockMountControlRunnable.class differ
diff --git a/build/libs/GeyserModelEngine-1.0.0-all.jar b/build/libs/GeyserModelEngine-1.0.0-all.jar
index 71e3d63..efcf1e5 100644
Binary files a/build/libs/GeyserModelEngine-1.0.0-all.jar and b/build/libs/GeyserModelEngine-1.0.0-all.jar differ
diff --git a/build/libs/GeyserModelEngine-1.0.0.jar b/build/libs/GeyserModelEngine-1.0.0.jar
index 0403cda..b97d201 100644
Binary files a/build/libs/GeyserModelEngine-1.0.0.jar and b/build/libs/GeyserModelEngine-1.0.0.jar differ
diff --git a/build/reports/problems/problems-report.html b/build/reports/problems/problems-report.html
index d6f75ed..54e971c 100644
--- a/build/reports/problems/problems-report.html
+++ b/build/reports/problems/problems-report.html
@@ -650,7 +650,7 @@ code + .copy-button {
diff --git a/build/classes/java/main/re/imc/geysermodelengine/managers/bedrock/BedrockMountControlManager.class b/build/tmp/compileJava/compileTransaction/stash-dir/BedrockMountControlManager.class.uniqueId4
similarity index 100%
rename from build/classes/java/main/re/imc/geysermodelengine/managers/bedrock/BedrockMountControlManager.class
rename to build/tmp/compileJava/compileTransaction/stash-dir/BedrockMountControlManager.class.uniqueId4
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/BedrockMountControlRunnable.class.uniqueId13 b/build/tmp/compileJava/compileTransaction/stash-dir/BedrockMountControlRunnable.class.uniqueId13
new file mode 100644
index 0000000..b3ca4c0
Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/BedrockMountControlRunnable.class.uniqueId13 differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/CommandManager.class.uniqueId12 b/build/tmp/compileJava/compileTransaction/stash-dir/CommandManager.class.uniqueId12
new file mode 100644
index 0000000..ca8f636
Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/CommandManager.class.uniqueId12 differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/ConfigManager.class.uniqueId10 b/build/tmp/compileJava/compileTransaction/stash-dir/ConfigManager.class.uniqueId10
new file mode 100644
index 0000000..4b224a1
Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/ConfigManager.class.uniqueId10 differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/EntityTaskManager.class.uniqueId6 b/build/tmp/compileJava/compileTransaction/stash-dir/EntityTaskManager.class.uniqueId6
new file mode 100644
index 0000000..2a5e04c
Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/EntityTaskManager.class.uniqueId6 differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/EntityTaskRunnable.class.uniqueId11 b/build/tmp/compileJava/compileTransaction/stash-dir/EntityTaskRunnable.class.uniqueId11
new file mode 100644
index 0000000..1d33c4d
Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/EntityTaskRunnable.class.uniqueId11 differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/GeyserModelEngineCommandManager.class.uniqueId3 b/build/tmp/compileJava/compileTransaction/stash-dir/GeyserModelEngineCommandManager.class.uniqueId3
new file mode 100644
index 0000000..41bb32e
Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/GeyserModelEngineCommandManager.class.uniqueId3 differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/GeyserModelEngineReloadCommand.class.uniqueId1 b/build/tmp/compileJava/compileTransaction/stash-dir/GeyserModelEngineReloadCommand.class.uniqueId1
new file mode 100644
index 0000000..d0dfc7e
Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/GeyserModelEngineReloadCommand.class.uniqueId1 differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/ModelEntityData.class.uniqueId8 b/build/tmp/compileJava/compileTransaction/stash-dir/ModelEntityData.class.uniqueId8
new file mode 100644
index 0000000..ee46170
Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/ModelEntityData.class.uniqueId8 differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/ModelListener.class.uniqueId1 b/build/tmp/compileJava/compileTransaction/stash-dir/ModelListener.class.uniqueId2
similarity index 60%
rename from build/tmp/compileJava/compileTransaction/stash-dir/ModelListener.class.uniqueId1
rename to build/tmp/compileJava/compileTransaction/stash-dir/ModelListener.class.uniqueId2
index 8c26b02..ae16c8f 100644
Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/ModelListener.class.uniqueId1 and b/build/tmp/compileJava/compileTransaction/stash-dir/ModelListener.class.uniqueId2 differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/ModelManager.class.uniqueId9 b/build/tmp/compileJava/compileTransaction/stash-dir/ModelManager.class.uniqueId9
new file mode 100644
index 0000000..719ea12
Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/ModelManager.class.uniqueId9 differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/MountPacketListener.class.uniqueId7 b/build/tmp/compileJava/compileTransaction/stash-dir/MountPacketListener.class.uniqueId7
new file mode 100644
index 0000000..779c016
Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/MountPacketListener.class.uniqueId7 differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/UpdateTaskRunnable.class.uniqueId5 b/build/tmp/compileJava/compileTransaction/stash-dir/UpdateTaskRunnable.class.uniqueId5
new file mode 100644
index 0000000..692d904
Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/UpdateTaskRunnable.class.uniqueId5 differ
diff --git a/build/tmp/compileJava/previous-compilation-data.bin b/build/tmp/compileJava/previous-compilation-data.bin
index fcae402..b2994fb 100644
Binary files a/build/tmp/compileJava/previous-compilation-data.bin and b/build/tmp/compileJava/previous-compilation-data.bin differ
diff --git a/src/main/java/re/imc/geysermodelengine/GeyserModelEngine.java b/src/main/java/re/imc/geysermodelengine/GeyserModelEngine.java
index b544e2e..ad831c6 100644
--- a/src/main/java/re/imc/geysermodelengine/GeyserModelEngine.java
+++ b/src/main/java/re/imc/geysermodelengine/GeyserModelEngine.java
@@ -2,20 +2,15 @@ package re.imc.geysermodelengine;
import com.github.retrooper.packetevents.PacketEvents;
import com.github.retrooper.packetevents.event.PacketListenerPriority;
-import com.ticxo.modelengine.api.ModelEngineAPI;
import com.ticxo.modelengine.api.model.ActiveModel;
-import com.ticxo.modelengine.api.model.ModeledEntity;
import dev.jorel.commandapi.CommandAPI;
import dev.jorel.commandapi.CommandAPIBukkitConfig;
import io.github.retrooper.packetevents.factory.spigot.SpigotPacketEventsBuilder;
import org.bukkit.Bukkit;
-import org.bukkit.World;
-import org.bukkit.entity.Entity;
import org.bukkit.plugin.java.JavaPlugin;
import re.imc.geysermodelengine.listener.ModelListener;
import re.imc.geysermodelengine.listener.MountPacketListener;
import re.imc.geysermodelengine.managers.ConfigManager;
-import re.imc.geysermodelengine.managers.bedrock.BedrockMountControlManager;
import re.imc.geysermodelengine.managers.commands.CommandManager;
import re.imc.geysermodelengine.managers.model.EntityTaskManager;
import re.imc.geysermodelengine.managers.model.ModelManager;
@@ -35,7 +30,6 @@ public class GeyserModelEngine extends JavaPlugin {
private ModelManager modelManager;
private EntityTaskManager entityTaskManager;
- private BedrockMountControlManager bedrockMountControlManager;
private PlayerManager playerManager;
@@ -83,7 +77,6 @@ public class GeyserModelEngine extends JavaPlugin {
this.modelManager = new ModelManager(this);
this.entityTaskManager = new EntityTaskManager(this);
- this.bedrockMountControlManager = new BedrockMountControlManager();
this.playerManager = new PlayerManager();
}
@@ -109,10 +102,6 @@ public class GeyserModelEngine extends JavaPlugin {
return entityTaskManager;
}
- public BedrockMountControlManager getBedrockMountControlManager() {
- return bedrockMountControlManager;
- }
-
public PlayerManager getPlayerManager() {
return playerManager;
}
diff --git a/src/main/java/re/imc/geysermodelengine/listener/ModelListener.java b/src/main/java/re/imc/geysermodelengine/listener/ModelListener.java
index ec5d007..022dc70 100644
--- a/src/main/java/re/imc/geysermodelengine/listener/ModelListener.java
+++ b/src/main/java/re/imc/geysermodelengine/listener/ModelListener.java
@@ -43,14 +43,14 @@ public class ModelListener implements Listener {
ModelEntityData model = map.get(event.getVehicle());
if (model != null && event.getPassenger() instanceof Player player) {
- plugin.getBedrockMountControlManager().getDriversCache().put(player, Pair.of(event.getVehicle(), event.getSeat()));
+ plugin.getModelManager().getDriversCache().put(player, Pair.of(event.getVehicle(), event.getSeat()));
}
}
@EventHandler(priority = EventPriority.MONITOR)
public void onModelDismount(ModelDismountEvent event) {
if (event.getPassenger() instanceof Player player) {
- plugin.getBedrockMountControlManager().getDriversCache().remove(player);
+ plugin.getModelManager().getDriversCache().remove(player);
}
}
diff --git a/src/main/java/re/imc/geysermodelengine/listener/MountPacketListener.java b/src/main/java/re/imc/geysermodelengine/listener/MountPacketListener.java
index 43dafe0..a8ab5d7 100644
--- a/src/main/java/re/imc/geysermodelengine/listener/MountPacketListener.java
+++ b/src/main/java/re/imc/geysermodelengine/listener/MountPacketListener.java
@@ -28,7 +28,7 @@ public class MountPacketListener implements PacketListener {
Player player = event.getPlayer();
WrapperPlayClientEntityAction action = new WrapperPlayClientEntityAction(event);
- Pair seat = plugin.getBedrockMountControlManager().getDriversCache().get(player);
+ Pair seat = plugin.getModelManager().getDriversCache().get(player);
if (seat == null) return;
if (action.getAction() != WrapperPlayClientEntityAction.Action.START_SNEAKING) return;
diff --git a/src/main/java/re/imc/geysermodelengine/managers/bedrock/BedrockMountControlManager.java b/src/main/java/re/imc/geysermodelengine/managers/bedrock/BedrockMountControlManager.java
deleted file mode 100644
index 74e1917..0000000
--- a/src/main/java/re/imc/geysermodelengine/managers/bedrock/BedrockMountControlManager.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package re.imc.geysermodelengine.managers.bedrock;
-
-import com.ticxo.modelengine.api.model.ActiveModel;
-import com.ticxo.modelengine.api.model.bone.type.Mount;
-import org.apache.commons.lang3.tuple.Pair;
-import org.bukkit.entity.Player;
-
-import java.util.concurrent.ConcurrentHashMap;
-
-public class BedrockMountControlManager {
-
- private final ConcurrentHashMap> driversCache = new ConcurrentHashMap<>();
-
- public ConcurrentHashMap> getDriversCache() {
- return driversCache;
- }
-}
diff --git a/src/main/java/re/imc/geysermodelengine/managers/model/ModelManager.java b/src/main/java/re/imc/geysermodelengine/managers/model/ModelManager.java
index e7166ee..bf6089d 100644
--- a/src/main/java/re/imc/geysermodelengine/managers/model/ModelManager.java
+++ b/src/main/java/re/imc/geysermodelengine/managers/model/ModelManager.java
@@ -3,7 +3,10 @@ package re.imc.geysermodelengine.managers.model;
import com.ticxo.modelengine.api.ModelEngineAPI;
import com.ticxo.modelengine.api.model.ActiveModel;
import com.ticxo.modelengine.api.model.ModeledEntity;
+import com.ticxo.modelengine.api.model.bone.type.Mount;
+import org.apache.commons.lang3.tuple.Pair;
import org.bukkit.entity.Entity;
+import org.bukkit.entity.Player;
import re.imc.geysermodelengine.GeyserModelEngine;
import re.imc.geysermodelengine.managers.model.data.ModelEntityData;
import re.imc.geysermodelengine.runnables.EntityTaskRunnable;
@@ -20,6 +23,8 @@ public class ModelManager {
private final ConcurrentHashMap> entitiesCache = new ConcurrentHashMap<>();
private final Map modelEntitiesCache = new ConcurrentHashMap<>();
+ private final ConcurrentHashMap> driversCache = new ConcurrentHashMap<>();
+
public ModelManager(GeyserModelEngine plugin) {
this.plugin = plugin;
}
@@ -56,4 +61,8 @@ public class ModelManager {
public Map getModelEntitiesCache() {
return modelEntitiesCache;
}
+
+ public ConcurrentHashMap> getDriversCache() {
+ return driversCache;
+ }
}
diff --git a/src/main/java/re/imc/geysermodelengine/runnables/BedrockMountControlRunnable.java b/src/main/java/re/imc/geysermodelengine/runnables/BedrockMountControlRunnable.java
index ad1f9a7..403d18d 100644
--- a/src/main/java/re/imc/geysermodelengine/runnables/BedrockMountControlRunnable.java
+++ b/src/main/java/re/imc/geysermodelengine/runnables/BedrockMountControlRunnable.java
@@ -28,13 +28,12 @@ public class BedrockMountControlRunnable implements Consumer {
if (!FloodgateApi.getInstance().isFloodgatePlayer(player.getUniqueId())) continue;
float pitch = player.getLocation().getPitch();
- Pair seat = plugin.getBedrockMountControlManager().getDriversCache().get(player);
+ Pair seat = plugin.getModelManager().getDriversCache().get(player);
if (seat == null) continue;
if (pitch < -30) {
- MountController controller = ModelEngineAPI.getMountPairManager()
- .getController(player.getUniqueId());
+ MountController controller = ModelEngineAPI.getMountPairManager().getController(player.getUniqueId());
if (controller != null) {
MountController.MountInput input = controller.getInput();
if (input != null) {