diff --git a/changelog.md b/changelog.md index 6fe79ab..64058f6 100644 --- a/changelog.md +++ b/changelog.md @@ -2,4 +2,5 @@ - Addons' permissions are now registered in Bukkit permissions. This resolves auto-complete and goat horns not working properly. - New config option `mono_sources` to use mono sources for playing the audio. - `/vreload` command is now reloading the addon's config properly. -- Add [poToken](https://github.com/lavalink-devs/youtube-source?tab=readme-ov-file#using-a-potoken) support for YouTube source. \ No newline at end of file +- Add [poToken](https://github.com/lavalink-devs/youtube-source?tab=readme-ov-file#using-a-potoken) support for YouTube source. +- Fixed discs commands not working properly after `/vreload`. \ No newline at end of file diff --git a/core/src/main/kotlin/su/plo/voice/discs/command/SubCommand.kt b/core/src/main/kotlin/su/plo/voice/discs/command/SubCommand.kt index 4a823cf..614a246 100644 --- a/core/src/main/kotlin/su/plo/voice/discs/command/SubCommand.kt +++ b/core/src/main/kotlin/su/plo/voice/discs/command/SubCommand.kt @@ -12,14 +12,16 @@ import su.plo.voice.discs.AddonConfig import su.plo.voice.discs.AddonKeys import su.plo.voice.discs.PlasmoAudioPlayerManager import su.plo.voice.discs.utils.PluginKoinComponent +import su.plo.voice.discs.utils.extend.getValue +import su.plo.voice.discs.utils.extend.getter abstract class SubCommand : PluginKoinComponent { protected val voiceServer: PlasmoVoiceServer by inject() protected val keys: AddonKeys by inject() - protected val config: AddonConfig by inject() - protected val audioPlayerManager: PlasmoAudioPlayerManager by inject() - protected val debugLogger: DebugLogger by inject() + protected val config: AddonConfig by getter() + protected val audioPlayerManager: PlasmoAudioPlayerManager by getter() + protected val debugLogger: DebugLogger by getter() protected val scope = CoroutineScope(SupervisorJob() + Dispatchers.Default)