diff --git a/.github/workflows/checkstyle.yml b/.github/workflows/checkstyle.yml deleted file mode 100644 index 971c6423..00000000 --- a/.github/workflows/checkstyle.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Check PR Codestyle -on: [ pull_request ] - -jobs: - checkstyle: - name: Checkstyle - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: dbelyaev/action-checkstyle@v0.5.1 - with: - github_token: ${{ secrets.github_token }} - reporter: github-pr-review - level: warning - checkstyle_config: ../../config/checkstyle/checkstyle.xml \ No newline at end of file diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/EcoSpigotPlugin.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/EcoSpigotPlugin.kt index c47dbfc0..105dbc08 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/EcoSpigotPlugin.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/EcoSpigotPlugin.kt @@ -294,7 +294,7 @@ abstract class EcoSpigotPlugin : EcoPlugin() { IntegrationLoader("MythicMobs") { CustomEntitiesManager.register(CustomEntitiesMythicMobs()) }, // Custom Items - IntegrationLoader("Oraxen") { CustomItemsManager.register(CustomItemsOraxen()) }, + IntegrationLoader("Oraxen") { CustomItemsManager.register(CustomItemsOraxen(this)) }, IntegrationLoader("ItemsAdder") { CustomItemsManager.register(CustomItemsItemsAdder()) }, IntegrationLoader("HeadDatabase") { CustomItemsManager.register(CustomItemsHeadDatabase(this)) }, IntegrationLoader("ExecutableItems") { CustomItemsManager.register(CustomItemsExecutableItems()) }, diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/integrations/customitems/CustomItemsOraxen.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/integrations/customitems/CustomItemsOraxen.kt index 68d4aa9b..072cfcd0 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/integrations/customitems/CustomItemsOraxen.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/integrations/customitems/CustomItemsOraxen.kt @@ -12,9 +12,11 @@ import io.th0rgal.oraxen.api.events.OraxenItemsLoadedEvent import org.bukkit.event.EventHandler import org.bukkit.event.Listener -class CustomItemsOraxen : CustomItemsIntegration, Listener { +class CustomItemsOraxen( + private val plugin: EcoPlugin +) : CustomItemsIntegration, Listener { override fun registerProvider() { - Eco.get().ecoPlugin.server.pluginManager.registerEvents(this, Eco.get().ecoPlugin) + plugin.eventManager.registerListener(this) } override fun getPluginName(): String {