Skip to content

Commit

Permalink
Updated libreforge
Browse files Browse the repository at this point in the history
  • Loading branch information
WillFP committed Jan 12, 2022
1 parent 9f4408c commit e02d1ad
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 25 deletions.
3 changes: 1 addition & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,11 @@ allprojects {

shadowJar {
relocate('com.willfp.libreforge', 'com.willfp.talismans.libreforge')
relocate('redempt.crunch', 'com.willfp.talismans.libreforge.crunch')
}

dependencies {
compileOnly 'com.willfp:eco:6.18.1'
implementation 'com.willfp:libreforge:2.18.1'
implementation 'com.willfp:libreforge:3.0.0'

compileOnly 'org.jetbrains:annotations:23.0.0'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,52 +1,40 @@
package com.willfp.talismans

import com.willfp.eco.core.EcoPlugin
import com.willfp.eco.core.command.impl.PluginCommand
import com.willfp.eco.core.display.DisplayModule
import com.willfp.eco.core.integrations.IntegrationLoader
import com.willfp.eco.core.items.CustomItem
import com.willfp.libreforge.LibReforge
import com.willfp.libreforge.LibReforgePlugin
import com.willfp.talismans.command.CommandTalismans
import com.willfp.talismans.config.TalismansYml
import com.willfp.talismans.display.TalismanDisplay
import com.willfp.talismans.talismans.Talismans
import com.willfp.talismans.talismans.util.*
import com.willfp.talismans.talismans.util.BlockPlaceListener
import com.willfp.talismans.talismans.util.DiscoverRecipeListener
import com.willfp.talismans.talismans.util.TalismanChecks
import com.willfp.talismans.talismans.util.TalismanCraftListener
import com.willfp.talismans.talismans.util.TalismanEnableListeners
import org.bukkit.event.Listener

class TalismansPlugin : EcoPlugin(611, 9865, "&6", true) {
class TalismansPlugin : LibReforgePlugin(611, 9865, "&6") {
val talismansYml = TalismansYml(this)

/**
* Internal constructor called by bukkit on plugin load.
*/
init {
instance = this
LibReforge.init(this)
LibReforge.registerHolderProvider { TalismanChecks.getTalismansOnPlayer(it) }
registerHolderProvider { TalismanChecks.getTalismansOnPlayer(it) }
}

override fun handleEnable() {
LibReforge.enable(this)
}

override fun handleDisable() {
LibReforge.disable(this)
}

override fun handleReload() {
override fun handleReloadAdditional() {
logger.info("${Talismans.values().size} Talismans Loaded")
LibReforge.reload(this);
CustomItem(
this.namespacedKeyFactory.create("any_talisman"),
{ test -> TalismanChecks.getTalismanOnItem(test) != null },
Talismans.values()[0].itemStack
).register()
}

override fun loadIntegrationLoaders(): List<IntegrationLoader> {
return LibReforge.getIntegrationLoaders()
}

override fun loadPluginCommands(): List<PluginCommand> {
return listOf(
CommandTalismans(this)
Expand All @@ -67,7 +55,7 @@ class TalismansPlugin : EcoPlugin(611, 9865, "&6", true) {
}

override fun getMinimumEcoVersion(): String {
return "6.17.0"
return "6.19.0"
}

companion object {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version = 5.7.3
version = 5.8.0
plugin-name = Talismans

0 comments on commit e02d1ad

Please sign in to comment.