added a floodgate hook option, defaults to true _yes will be doing versioning from now on)

This commit is contained in:
xSquishyLiam
2025-12-13 23:42:18 +00:00
parent 76de3aead1
commit b8f4be8391
7 changed files with 36 additions and 11 deletions

13
.idea/workspace.xml generated
View File

@@ -11,7 +11,7 @@
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="DarkyenusTimeTracker">
<option name="totalTimeSeconds" value="26083" />
<option name="totalTimeSeconds" value="28359" />
</component>
<component name="ExternalProjectsData">
<projectState path="$PROJECT_DIR$">
@@ -31,6 +31,17 @@
<item name="" type="6a2764b6:ExternalProjectsStructure$RootNode" />
<item name="GeyserModelEngine" type="f1a62948:ProjectNode" />
</path>
<path>
<item name="" type="6a2764b6:ExternalProjectsStructure$RootNode" />
<item name="GeyserModelEngine" type="f1a62948:ProjectNode" />
<item name="Tasks" type="e4a08cd1:TasksNode" />
</path>
<path>
<item name="" type="6a2764b6:ExternalProjectsStructure$RootNode" />
<item name="GeyserModelEngine" type="f1a62948:ProjectNode" />
<item name="Tasks" type="e4a08cd1:TasksNode" />
<item name="build" type="c8890929:TasksNode$1" />
</path>
</expand>
<select />
</tree_state>

View File

@@ -4,7 +4,7 @@ plugins {
}
group = "re.imc"
version = "1.0.0"
version = "1.0.1"
repositories {
mavenCentral()
@@ -59,3 +59,12 @@ tasks.shadowJar {
tasks.build {
dependsOn("shadowJar")
}
tasks.processResources {
val props = mapOf("version" to version)
inputs.properties(props)
filteringCharset = "UTF-8"
filesMatching("paper-plugin.yml") {
expand(props)
}
}

View File

@@ -35,6 +35,7 @@ public class GeyserModelEngine extends JavaPlugin {
PacketEvents.getAPI().load();
// CommandAPI.onLoad(new CommandAPIPaperConfig(this));
preLoadManagers();
}
@Override
@@ -68,9 +69,11 @@ public class GeyserModelEngine extends JavaPlugin {
if (this.configManager.getConfig().getBoolean("metrics.bstats", true)) new Metrics(this, 26981);
}
private void loadManagers() {
private void preLoadManagers() {
this.configManager = new ConfigManager(this);
}
private void loadManagers() {
this.commandManager = new CommandManager(this);
this.modelManager = new ModelManager(this);

View File

@@ -9,15 +9,13 @@ public class FloodgateAPIHook {
private static FloodgateApi floodgateAPI;
public static void loadHook(GeyserModelEngine plugin) {
if (Bukkit.getPluginManager().getPlugin("floodgate") == null) {
plugin.getLogger().info("floodgate hook not enabled!");
if (Bukkit.getPluginManager().getPlugin("floodgate") == null || !plugin.getConfigManager().getConfig().getBoolean("options.hooks.floodgate", true)) {
plugin.getLogger().info("Floodgate hook disabled!");
return;
}
floodgateAPI = FloodgateApi.getInstance();
plugin.getLogger().info("Hooking into floodgate!");
plugin.getLogger().info("Floodgate hook enabled!");
}
public static FloodgateApi getAPI() {

View File

@@ -95,6 +95,8 @@ public class ModelEnginePropertyHandler implements PropertyHandler {
if (anim.isOverride() && anim.getLoopMode() == BlueprintAnimation.LoopMode.ONCE) {
break;
}
plugin.getLogger().info(animId);
}
}
@@ -121,8 +123,8 @@ public class ModelEnginePropertyHandler implements PropertyHandler {
if (boneUpdates.isEmpty() && animUpdates.isEmpty()) return;
Map<String, Integer> intUpdates = new HashMap<>();
int i = 0;
int i = 0;
for (Integer integer : BooleanPacker.mapBooleansToInts(boneUpdates)) {
intUpdates.put(plugin.getConfigManager().getConfig().getString("models.namespace") + ":bone" + i, integer);
i++;

View File

@@ -11,3 +11,5 @@ models:
options:
debug: false
hooks:
floodgate: true # Recommended method

View File

@@ -1,6 +1,6 @@
main: re.imc.geysermodelengine.GeyserModelEngine
name: GeyserModelEngine
version: '1.0.0'
version: '${version}'
api-version: '1.21'
authors: