Skip to content

Commit

Permalink
Remove the WiredPlugin annotation and processor
Browse files Browse the repository at this point in the history
  • Loading branch information
gdude2002 committed Jul 31, 2024
1 parent b12bdbb commit 0769532
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 249 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
dev.kordex.core.annotations.ConverterProcessorProvider
dev.kordex.core.annotations.PluginProcessorProvider

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import org.koin.core.component.inject
import org.pf4j.Plugin

/**
* Abstract class representing a plugin. This is intended to be used with the @WiredPlugin annotation.
* Abstract class representing a plugin.
*
* Registered plugins will always be loaded at the end of the setup process, so that everything else is available
* The bot will always load registered plugins at the end of the setup process so that everything else is available
* and ready to be used.
*/
public abstract class KordExPlugin : Plugin(), KordExKoinComponent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,23 @@

package dev.kordex.modules.func.mappings.plugins

import dev.kordex.core.annotations.plugins.WiredPlugin
import dev.kordex.core.plugins.KordExPlugin
import dev.kordex.modules.func.mappings.MappingsExtension
import dev.kordex.modules.func.mappings.builders.ExtMappingsBuilder

/** Class representing a simplified mappings plugin. No configuration supported yet. **/
@WiredPlugin(
MappingsPlugin.PLUGIN_ID,
"0.0.1",
"kord-extensions",
"KordEx Minecraft Mappings plugin",
"MPL 2.0"
)
// @WiredPlugin(
// MappingsPlugin.PLUGIN_ID,
// "0.0.1",
// "kord-extensions",
// "KordEx Minecraft Mappings plugin",
// "MPL 2.0"
// )

/**
* Class representing a simplified mappings plugin. No configuration supported yet.
*
* TODO: Switch to the official Gradle plugin for development, or find some other way to package this.
**/
class MappingsPlugin : KordExPlugin() {
override suspend fun setup() {
MappingsExtension.configure(ExtMappingsBuilder())
Expand Down
21 changes: 13 additions & 8 deletions test-bot/src/main/kotlin/dev/kordex/test/bot/plugin/TestPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,23 @@

package dev.kordex.test.bot.plugin

import dev.kordex.core.annotations.plugins.WiredPlugin
import dev.kordex.core.plugins.KordExPlugin
import dev.kordex.core.storage.StorageType
import dev.kordex.core.storage.StorageUnit

@WiredPlugin(
TestPlugin.PLUGIN_ID,
"0.0.1",
"kord-extensions",
"KordEx testing plugin",
"MPL 2.0"
)
// @WiredPlugin(
// TestPlugin.PLUGIN_ID,
// "0.0.1",
// "kord-extensions",
// "KordEx testing plugin",
// "MPL 2.0"
// )

/**
* Class representing a test plugin.
*
* TODO: Switch to the official Gradle plugin for development, or find some other way to package this.
**/
public class TestPlugin : KordExPlugin() {
override suspend fun setup() {
extension(::TestPluginExtension)
Expand Down

0 comments on commit 0769532

Please sign in to comment.