From 6ef31444ac027b11e409253e879279a785cc5ee4 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Wed, 19 Apr 2023 17:38:09 +0100 Subject: [PATCH] Removed Checkstyle CI, cleaned up Oraxen PR --- .github/workflows/checkstyle.yml | 15 --------------- .../willfp/eco/internal/spigot/EcoSpigotPlugin.kt | 2 +- .../integrations/customitems/CustomItemsOraxen.kt | 6 ++++-- 3 files changed, 5 insertions(+), 18 deletions(-) delete mode 100644 .github/workflows/checkstyle.yml 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 {