diff --git a/build.gradle.kts b/build.gradle.kts index 4db1a84..8b35159 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -71,8 +71,6 @@ dependencies { include(modImplementation("me.lucko:fabric-permissions-api:${property("permissions_version")}")!!) // include(implementation(annotationProcessor("com.github.llamalad7.mixinextras:mixinextras-fabric:${property("mixin_extras_version")}")!!)!!) - - implementation(kotlin("stdlib-jdk8")) } loom { @@ -159,18 +157,9 @@ tasks { publishing { publications { create("mavenJava") { - artifact(remapJar) { - builtBy(remapJar) - } - artifact(kotlinSourcesJar) { - builtBy(remapSourcesJar) - } + from(project.components.getByName("java")) } } - - repositories { - - } } compileKotlin { diff --git a/src/main/kotlin/me/senseiwells/replay/ServerReplay.kt b/src/main/kotlin/me/senseiwells/replay/ServerReplay.kt index b0dd223..ffd4501 100644 --- a/src/main/kotlin/me/senseiwells/replay/ServerReplay.kt +++ b/src/main/kotlin/me/senseiwells/replay/ServerReplay.kt @@ -1,6 +1,6 @@ package me.senseiwells.replay -import me.senseiwells.replay.api.ReplayPluginManager +import me.senseiwells.replay.api.ServerReplayPluginManager import me.senseiwells.replay.config.ReplayConfig import net.fabricmc.api.ModInitializer import net.fabricmc.loader.api.FabricLoader @@ -21,6 +21,6 @@ object ServerReplay: ModInitializer { var config: ReplayConfig = ReplayConfig.read() override fun onInitialize() { - ReplayPluginManager.loadPlugins() + ServerReplayPluginManager.loadPlugins() } } \ No newline at end of file diff --git a/src/main/kotlin/me/senseiwells/replay/api/ReplayPluginManager.kt b/src/main/kotlin/me/senseiwells/replay/api/ServerReplayPluginManager.kt similarity index 94% rename from src/main/kotlin/me/senseiwells/replay/api/ReplayPluginManager.kt rename to src/main/kotlin/me/senseiwells/replay/api/ServerReplayPluginManager.kt index 3458860..412a818 100644 --- a/src/main/kotlin/me/senseiwells/replay/api/ReplayPluginManager.kt +++ b/src/main/kotlin/me/senseiwells/replay/api/ServerReplayPluginManager.kt @@ -1,7 +1,7 @@ package me.senseiwells.replay.api import me.senseiwells.replay.ServerReplay -import me.senseiwells.replay.api.ReplayPluginManager.registerPlugin +import me.senseiwells.replay.api.ServerReplayPluginManager.registerPlugin import net.fabricmc.loader.api.FabricLoader /** @@ -10,7 +10,7 @@ import net.fabricmc.loader.api.FabricLoader * Your plugins should be specified in your fabric.mod.json, * see [registerPlugin] for more information. */ -object ReplayPluginManager { +object ServerReplayPluginManager { internal val plugins = ArrayList() /** diff --git a/src/main/kotlin/me/senseiwells/replay/compat/voicechat/ReplayVoicechatPlugin.kt b/src/main/kotlin/me/senseiwells/replay/compat/voicechat/ReplayVoicechatPlugin.kt index cb4ba42..03283b7 100644 --- a/src/main/kotlin/me/senseiwells/replay/compat/voicechat/ReplayVoicechatPlugin.kt +++ b/src/main/kotlin/me/senseiwells/replay/compat/voicechat/ReplayVoicechatPlugin.kt @@ -11,6 +11,7 @@ import de.maxhenkel.voicechat.api.packets.SoundPacket import de.maxhenkel.voicechat.net.* import de.maxhenkel.voicechat.plugins.impl.VolumeCategoryImpl import me.senseiwells.replay.ServerReplay +import me.senseiwells.replay.api.ServerReplayPluginManager import me.senseiwells.replay.api.ServerReplayPlugin import me.senseiwells.replay.chunk.ChunkRecorder import me.senseiwells.replay.chunk.ChunkRecorders @@ -58,6 +59,9 @@ object ReplayVoicechatPlugin: VoicechatPlugin, ServerReplayPlugin { if (!ServerReplay.config.recordVoiceChat) { ServerReplay.logger.info("Not currently recording voice chat in replays, you must enabled this in the config") } + + @Suppress("DEPRECATION") + ServerReplayPluginManager.registerPlugin(this) } override fun registerEvents(registration: EventRegistration) { diff --git a/src/main/kotlin/me/senseiwells/replay/rejoin/RejoinedReplayPlayer.kt b/src/main/kotlin/me/senseiwells/replay/rejoin/RejoinedReplayPlayer.kt index 8e80fcc..54a7b56 100644 --- a/src/main/kotlin/me/senseiwells/replay/rejoin/RejoinedReplayPlayer.kt +++ b/src/main/kotlin/me/senseiwells/replay/rejoin/RejoinedReplayPlayer.kt @@ -1,6 +1,6 @@ package me.senseiwells.replay.rejoin -import me.senseiwells.replay.api.ReplayPluginManager +import me.senseiwells.replay.api.ServerReplayPluginManager import me.senseiwells.replay.chunk.ChunkRecorder import me.senseiwells.replay.mixin.common.PlayerListAccessor import me.senseiwells.replay.ducks.`ServerReplay$PackTracker` @@ -129,7 +129,7 @@ class RejoinedReplayPlayer private constructor( this.recorder.record(ClientboundUpdateMobEffectPacket(this.id, mobEffectInstance)) } - for (plugin in ReplayPluginManager.plugins) { + for (plugin in ServerReplayPluginManager.plugins) { when (this.recorder) { is PlayerRecorder -> plugin.onPlayerReplayStart(this.recorder) is ChunkRecorder -> plugin.onChunkReplayStart(this.recorder) diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 99be350..2829b59 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -24,12 +24,6 @@ "adapter": "kotlin", "value": "me.senseiwells.replay.compat.voicechat.ReplayVoicechatPlugin" } - ], - "server_replay": [ - { - "adapter": "kotlin", - "value": "me.senseiwells.replay.compat.voicechat.ReplayVoicechatPlugin" - } ] }, "accessWidener": "serverreplay.accesswidener",