Skip to content

Commit

Permalink
Merge branch '1.18.2' into 1.17.1
Browse files Browse the repository at this point in the history
  • Loading branch information
senseiwells committed Mar 20, 2024
2 parents de8653c + fd4d379 commit be0014d
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 24 deletions.
13 changes: 1 addition & 12 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -159,18 +157,9 @@ tasks {
publishing {
publications {
create<MavenPublication>("mavenJava") {
artifact(remapJar) {
builtBy(remapJar)
}
artifact(kotlinSourcesJar) {
builtBy(remapSourcesJar)
}
from(project.components.getByName("java"))
}
}

repositories {

}
}

compileKotlin {
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/me/senseiwells/replay/ServerReplay.kt
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -21,6 +21,6 @@ object ServerReplay: ModInitializer {
var config: ReplayConfig = ReplayConfig.read()

override fun onInitialize() {
ReplayPluginManager.loadPlugins()
ServerReplayPluginManager.loadPlugins()
}
}
Original file line number Diff line number Diff line change
@@ -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

/**
Expand All @@ -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<ServerReplayPlugin>()

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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.ducks.`ServerReplay$PackTracker`
import me.senseiwells.replay.player.PlayerRecorder
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 0 additions & 6 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit be0014d

Please sign in to comment.