Updated libreforge

This commit is contained in:
Auxilor
2022-02-05 13:41:50 +00:00
parent 953860fbf3
commit e6c0f93ccb
4 changed files with 29 additions and 2 deletions

View File

@@ -12,6 +12,7 @@ import com.willfp.ecoitems.items.ItemUtils
import com.willfp.ecoitems.items.toSingletonList
import com.willfp.ecoitems.util.DiscoverRecipeListener
import com.willfp.libreforge.LibReforgePlugin
import com.willfp.libreforge.chains.EffectChains
import org.bukkit.event.Listener
class EcoItemsPlugin : LibReforgePlugin(1241, 12205, "&#ff0000") {
@@ -29,6 +30,12 @@ class EcoItemsPlugin : LibReforgePlugin(1241, 12205, "&#ff0000") {
registerHolderProvider { ItemUtils.getEcoItemOnPlayer(it).toSingletonList() }
}
override fun handleEnableAdditional() {
itemsYml.getSubsections("effects").mapNotNull {
EffectChains.compile(it, "Chains")
}
}
override fun handleReloadAdditional() {
FuelHandler.createRunnable(this)
}

View File

@@ -1,3 +1,23 @@
chains:
- id: example_chain
effects:
- id: teleport
- id: potion_effect
args:
effect: blindness
level: 3
duration: 30
apply_to_player: true
- id: send_message
args:
message: "&fYou have been teleported!"
action_bar: true
- id: play_sound
args:
sound: entity_dragon_fireball_explode
pitch: 1.5
volume: 4
items:
- id: enchanted_ender_eye
baseDamage: 0