Skip to content

Commit

Permalink
Move componentId registration up to onLoad
Browse files Browse the repository at this point in the history
  • Loading branch information
0ffz committed Dec 5, 2023
1 parent dd034af commit 6bb8bc8
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ class ChattyPlugin : JavaPlugin() {
all()
}
}

// register components we'll use async now since they'll error otherwise
componentId<ChattyNickname>()
componentId<ChannelData>()
}

override fun onEnable() {
Expand All @@ -39,16 +43,11 @@ class ChattyPlugin : JavaPlugin() {

ChattyCommands()
listeners(ChatListener(), PlayerListener())

if (chatty.isPlaceholderApiLoaded)
PlaceholderAPIHook().register()

if (chatty.isDiscordSRVLoaded)
DiscordSRV.api.subscribe(DiscordListener())

// register components we'll use async now since they'll error otherwise
componentId<ChattyNickname>()
componentId<ChannelData>()
}

fun createChattyContext() {
Expand Down

0 comments on commit 6bb8bc8

Please sign in to comment.