From cb8e1c0f0bcbe39e75fbec7574cdfe0d904334c8 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Tue, 30 Aug 2022 19:15:34 +0100 Subject: [PATCH 1/6] Added prelim load --- .../src/main/kotlin/com/willfp/ecoenchants/EcoEnchantsPlugin.kt | 1 + gradle.properties | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/EcoEnchantsPlugin.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/EcoEnchantsPlugin.kt index 9a5066bd..1713104f 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/EcoEnchantsPlugin.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/EcoEnchantsPlugin.kt @@ -33,6 +33,7 @@ class EcoEnchantsPlugin : LibReforgePlugin() { init { instance = this + EcoEnchants.update(this) } override fun handleEnableAdditional() { diff --git a/gradle.properties b/gradle.properties index 11ba395b..fd137880 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ #libreforge-updater #Mon Aug 29 16:15:50 BST 2022 -version=9.0.0 +version=9.0.0-b0 plugin-name=EcoEnchants From 5aec63ffc0fef0133f1afc0ed2d693cd518d4f2b Mon Sep 17 00:00:00 2001 From: Auxilor Date: Tue, 30 Aug 2022 19:21:48 +0100 Subject: [PATCH 2/6] libreforge-updater --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index fd137880..702995ae 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ #libreforge-updater -#Mon Aug 29 16:15:50 BST 2022 +#Tue Aug 30 19:21:48 BST 2022 version=9.0.0-b0 plugin-name=EcoEnchants From 76d8ce7c86bd545885ef50446b5a3ec80336b6c8 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Tue, 30 Aug 2022 19:34:35 +0100 Subject: [PATCH 3/6] Added lore conversion --- .../willfp/ecoenchants/EcoEnchantsPlugin.kt | 4 +- .../ecoenchants/enchants/LoreConversion.kt | 116 ++++++++++++++++++ .../core-plugin/src/main/resources/config.yml | 7 ++ 3 files changed, 126 insertions(+), 1 deletion(-) create mode 100644 eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/enchants/LoreConversion.kt diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/EcoEnchantsPlugin.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/EcoEnchantsPlugin.kt index 1713104f..3202baa3 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/EcoEnchantsPlugin.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/EcoEnchantsPlugin.kt @@ -11,6 +11,7 @@ import com.willfp.ecoenchants.config.TypesYml import com.willfp.ecoenchants.config.VanillaEnchantsYml import com.willfp.ecoenchants.display.EnchantDisplay import com.willfp.ecoenchants.enchants.EcoEnchants +import com.willfp.ecoenchants.enchants.LoreConversion import com.willfp.ecoenchants.enchants.impl.EnchantmentTelekinesis import com.willfp.ecoenchants.enchants.registerVanillaEnchants import com.willfp.ecoenchants.integrations.EnchantRegistrations @@ -55,7 +56,8 @@ class EcoEnchantsPlugin : LibReforgePlugin() { VillagerSupport(this), EnchantingTableSupport(this), LootSupport(this), - AnvilSupport(this) + AnvilSupport(this), + LoreConversion(this) ) } diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/enchants/LoreConversion.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/enchants/LoreConversion.kt new file mode 100644 index 00000000..d13ca4b2 --- /dev/null +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/enchants/LoreConversion.kt @@ -0,0 +1,116 @@ +package com.willfp.ecoenchants.enchants + +import com.willfp.eco.core.EcoPlugin +import com.willfp.eco.core.fast.fast +import com.willfp.eco.util.NumberUtils +import org.bukkit.ChatColor +import org.bukkit.enchantments.Enchantment +import org.bukkit.event.EventHandler +import org.bukkit.event.Listener +import org.bukkit.event.inventory.InventoryOpenEvent +import org.bukkit.event.player.PlayerItemHeldEvent +import org.bukkit.inventory.BlockInventoryHolder +import org.bukkit.inventory.ItemStack +import org.bukkit.inventory.meta.EnchantmentStorageMeta + + +class LoreConversion( + private val plugin: EcoPlugin +) : Listener { + @EventHandler + fun loreConverter(event: PlayerItemHeldEvent) { + if (!plugin.configYml.getBool("lore-conversion.enabled")) { + return + } + + convertLore(event.player.inventory.getItem(event.newSlot)) + } + + @EventHandler + fun aggressiveLoreConverter(event: InventoryOpenEvent) { + if (!plugin.configYml.getBool("lore-conversion.enabled")) { + return + } + if (!plugin.configYml.getBool("lore-conversion.aggressive")) { + return + } + + val inventory = event.inventory + + if (inventory.holder !is BlockInventoryHolder) { + return + } + + for (itemStack in inventory.contents) { + convertLore(itemStack) + } + } + + private fun convertLore(itemStack: ItemStack?) { + if (itemStack == null) { + return + } + + val meta = itemStack.itemMeta ?: return + + val toAdd = mutableMapOf() + + val lore = itemStack.fast().lore.toMutableList() + + for (line in lore.toList()) { + val uncolored = ChatColor.stripColor(line) ?: continue + + var enchant: EcoEnchant? + var level: Int + val split = uncolored.split(" ").toMutableList() + + if (split.isEmpty()) { + continue + } + + if (split.size == 1) { + enchant = EcoEnchants.getByName(split[0]) + level = 1 + } else { + val attemptFullLine = EcoEnchants.getByName(line) + if (attemptFullLine != null) { + enchant = attemptFullLine + level = 1 + } else { + var levelString = split.last() + split.remove(levelString) + levelString = levelString.trim { it <= ' ' } + level = try { + NumberUtils.fromNumeral(levelString) + } catch (e: IllegalArgumentException) { + continue + } + val enchantName = split.joinToString(" ") + enchant = EcoEnchants.getByName(enchantName) + } + } + + if (enchant == null) { + continue + } + + toAdd[enchant] = level + } + + + if (meta is EnchantmentStorageMeta) { + lore.clear() + for ((enchant, level) in toAdd) { + meta.addStoredEnchant(enchant, level, true) + } + } else { + lore.clear() + for ((enchant, level) in toAdd) { + meta.addEnchant(enchant, level, true) + } + } + + itemStack.itemMeta = meta + itemStack.fast().lore = lore + } +} diff --git a/eco-core/core-plugin/src/main/resources/config.yml b/eco-core/core-plugin/src/main/resources/config.yml index 7493a38d..a4675b8e 100644 --- a/eco-core/core-plugin/src/main/resources/config.yml +++ b/eco-core/core-plugin/src/main/resources/config.yml @@ -95,6 +95,13 @@ enchantinfo: - "&fApplicable to: &a%targets%" - "&fConflicts with: &a%conflicts%" +# Options for converting lore-based enchants (from other plugins) with EcoEnchants enchantments +# with the same names. If you're switching over from another plugin and don't want your players to +# lose their enchantments, just switch this on. +lore-conversion: + enabled: false # If lore conversion should be enabled + aggressive: false # Will convert all items in all inventories when opened, likely to use a lot of performance + cooldown: in-actionbar: true sound: From 079e172d4b988174efac98a4762d5729b34463e3 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Tue, 30 Aug 2022 20:08:07 +0100 Subject: [PATCH 4/6] Fixed Sedri's ymls --- .../src/main/resources/enchants/abattoir.yml | 12 +++++----- .../src/main/resources/enchants/abrasion.yml | 16 ++++++------- .../src/main/resources/enchants/aerial.yml | 14 +++++------ .../src/main/resources/enchants/aquatic.yml | 14 +++++------ .../src/main/resources/enchants/arachnid.yml | 14 +++++------ .../src/main/resources/enchants/arcanic.yml | 14 +++++------ .../main/resources/enchants/atmospheric.yml | 12 +++++----- .../src/main/resources/enchants/bladed.yml | 16 ++++++------- .../main/resources/enchants/blast_mining.yml | 17 +++++++------ .../src/main/resources/enchants/bleed.yml | 16 ++++++------- .../src/main/resources/enchants/blind.yml | 20 ++++++++-------- .../resources/enchants/block_breather.yml | 16 ++++++------- .../main/resources/enchants/boss_hunter.yml | 18 +++++++------- .../main/resources/enchants/butchering.yml | 16 ++++++------- .../src/main/resources/enchants/carve.yml | 16 ++++++------- .../src/main/resources/enchants/cleave.yml | 16 ++++++------- .../src/main/resources/enchants/confusion.yml | 14 +++++------ .../src/main/resources/enchants/corrosive.yml | 16 ++++++------- .../src/main/resources/enchants/criticals.yml | 18 +++++++------- .../src/main/resources/enchants/cubism.yml | 18 +++++++------- .../main/resources/enchants/telekinesis.yml | 4 ++-- .../src/main/resources/enchants/test.yml | 24 ------------------- gradle.properties | 2 +- 23 files changed, 159 insertions(+), 184 deletions(-) delete mode 100644 eco-core/core-plugin/src/main/resources/enchants/test.yml diff --git a/eco-core/core-plugin/src/main/resources/enchants/abattoir.yml b/eco-core/core-plugin/src/main/resources/enchants/abattoir.yml index 45358fdb..05764fad 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/abattoir.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/abattoir.yml @@ -1,10 +1,10 @@ -display-name: Abattoir -description: Tridents deal %placeholder%% more damage against passive mobs -placeholder: '30 * %level%)' +display-name: "Abattoir" +description: "Tridents deal &a%placeholder%% &8more damage against passive mobs" +placeholder: "30 * %level%" type: normal targets: -- trident + - trident conflicts: - serrated - bladed @@ -22,7 +22,7 @@ enchantable: true effects: - id: damage_multiplier args: - multiplier: 1 + 0.3 * %level% + multiplier: "1 + 0.3 * %level%" triggers: - trident_attack filters: @@ -38,4 +38,4 @@ effects: - villager - axolotl - chicken -conditions: [] +conditions: [ ] diff --git a/eco-core/core-plugin/src/main/resources/enchants/abrasion.yml b/eco-core/core-plugin/src/main/resources/enchants/abrasion.yml index 0a0ea91e..7bb164d4 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/abrasion.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/abrasion.yml @@ -1,13 +1,13 @@ -display-name: Abrasion -description: Damages your opponents armor by %placeholder%. -placeholder: '%level%' -type: Normal +display-name: "Abrasion" +description: "Deals &a%placeholder% &8damage to your opponents armor" +placeholder: "%level%" +type: normal targets: -- sword -- axe + - sword + - axe -conflicts: [] +conflicts: [ ] rarity: legendary max-level: 2 @@ -21,4 +21,4 @@ effects: damage: "%level%" triggers: - melee_attack -conditions: [] +conditions: [ ] diff --git a/eco-core/core-plugin/src/main/resources/enchants/aerial.yml b/eco-core/core-plugin/src/main/resources/enchants/aerial.yml index 93d7f9db..995810c1 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/aerial.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/aerial.yml @@ -1,12 +1,12 @@ -display-name: Aerial -description: Deal %placeholder%% more arrow damage when you are in air -placeholder: '10*%level%' +display-name: "Aerial" +description: "Deal &a%placeholder%% &8more arrow damage when you are in air" +placeholder: "10 * %level%" type: normal targets: -- bow -- crossbow -conflicts: [] + - bow + - crossbow +conflicts: [ ] rarity: epic max-level: 3 @@ -17,7 +17,7 @@ enchantable: true effects: - id: damage_multiplier args: - multiplier: 1 + 0.1 * %level% + multiplier: "1 + 0.1 * %level%" triggers: - bow_attack conditions: diff --git a/eco-core/core-plugin/src/main/resources/enchants/aquatic.yml b/eco-core/core-plugin/src/main/resources/enchants/aquatic.yml index 521a069c..ad2ac94a 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/aquatic.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/aquatic.yml @@ -1,11 +1,11 @@ -display-name: Aquatic -description: Trident deals %placeholder%% additional damage when shot from water -placeholder: '5*%level%' -type: Normal +display-name: "Aquatic" +description: "Trident deals &a%placeholder%% &8additional damage when shot from water" +placeholder: "5 * %level%" +type: normal targets: -- trident -conflicts: [] + - trident +conflicts: [ ] rarity: rare max-level: 8 @@ -16,7 +16,7 @@ enchantable: true effects: - id: damage_multiplier args: - multiplier: 1 + 0.05 * %level% + multiplier: "1 + 0.05 * %level%" triggers: - trident_attack conditions: diff --git a/eco-core/core-plugin/src/main/resources/enchants/arachnid.yml b/eco-core/core-plugin/src/main/resources/enchants/arachnid.yml index b5701de1..72577b5c 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/arachnid.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/arachnid.yml @@ -1,10 +1,10 @@ -display-name: Arachnid -description: Increases damage against spiders -placeholder: '30*%level%' -type: Normal +display-name: "Arachnid" +description: "Increases damage against spiders" +placeholder: "30 * %level%" +type: normal targets: -- trident + - trident conflicts: - serrated - bladed @@ -22,11 +22,11 @@ enchantable: true effects: - id: damage_multiplier args: - multiplier: 1 + 0.3 * %level% + multiplier: "1 + 0.3 * %level%" triggers: - trident_attack filters: entities: - spider - cave_spider -conditions: [] +conditions: [ ] diff --git a/eco-core/core-plugin/src/main/resources/enchants/arcanic.yml b/eco-core/core-plugin/src/main/resources/enchants/arcanic.yml index 99ba2b5d..68cc068f 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/arcanic.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/arcanic.yml @@ -1,11 +1,11 @@ -display-name: Arcanic -description: "%placeholder%% chance to ignore potion damage" -placeholder: '%level% * 8' -type: Normal +display-name: "Arcanic" +description: "&a%placeholder%% &8chance to ignore potion damage" +placeholder: "%level% * 8" +type: normal targets: -- armor -conflicts: [] + - armor +conflicts: [ ] rarity: epic max-level: 6 @@ -23,4 +23,4 @@ effects: damageCause: - poison - magic -conditions: [] +conditions: [ ] diff --git a/eco-core/core-plugin/src/main/resources/enchants/atmospheric.yml b/eco-core/core-plugin/src/main/resources/enchants/atmospheric.yml index 4f4e6f48..f29e4c82 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/atmospheric.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/atmospheric.yml @@ -1,11 +1,11 @@ -display-name: Atmospheric -description: Deal %placeholder%% more trident damage when you are in air -placeholder: '10*%level%' +display-name: "Atmospheric" +description: "Deal &a%placeholder%% &8more trident damage when you are in air" +placeholder: "10 * %level%" type: normal targets: -- trident -conflicts: [] + - trident +conflicts: [ ] rarity: epic max-level: 3 @@ -16,7 +16,7 @@ enchantable: true effects: - id: damage_multiplier args: - multiplier: 1 + 0.1 * %level% + multiplier: "1 + 0.1 * %level%" triggers: - bow_attack conditions: diff --git a/eco-core/core-plugin/src/main/resources/enchants/bladed.yml b/eco-core/core-plugin/src/main/resources/enchants/bladed.yml index 7528e860..ac6af839 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/bladed.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/bladed.yml @@ -1,11 +1,11 @@ -display-name: Bladed -description: Trident deals %placeholder%% additional damage -placeholder: '0.5*%level%' -type: Special +display-name: "Bladed" +description: "Trident deals &a%placeholder%% &8more damage" +placeholder: "0.5 * %level%" +type: special targets: -- trident -conflicts: [] + - trident +conflicts: [ ] rarity: veryspecial max-level: 5 @@ -16,7 +16,7 @@ enchantable: true effects: - id: damage_multiplier args: - multiplier: 1 + 0.5 * %level% + multiplier: "1 + 0.5 * %level%" triggers: - trident_attack -conditions: [] +conditions: [ ] diff --git a/eco-core/core-plugin/src/main/resources/enchants/blast_mining.yml b/eco-core/core-plugin/src/main/resources/enchants/blast_mining.yml index b263006f..87be2183 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/blast_mining.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/blast_mining.yml @@ -1,10 +1,10 @@ -display-name: Blast Mining -description: "%placeholder%% chance to mine blocks in a 3x3 area" -placeholder: '20 * %level%' -type: Normal +display-name: "Blast Mining" +description: "&a%placeholder%% &8chance to mine blocks in a 3x3 area" +placeholder: "20 * %level%" +type: normal targets: -- pickaxe + - pickaxe conflicts: - drill - vein @@ -18,12 +18,11 @@ enchantable: true effects: - id: mine_radius args: - chance: 20 * %level% + chance: "20 * %level%" radius: 1 - blacklisted_blocks: [] + blacklisted_blocks: [ ] check_hardness: true disable_on_sneak: true - whitelist: [ ] triggers: - mine_block -conditions: [] +conditions: [ ] diff --git a/eco-core/core-plugin/src/main/resources/enchants/bleed.yml b/eco-core/core-plugin/src/main/resources/enchants/bleed.yml index 0fe638f5..3983eb0c 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/bleed.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/bleed.yml @@ -1,11 +1,11 @@ -display-name: Bleed -description: Causes your opponent to bleed, damaging them repeatedly -placeholder: '1.5 * %level%' +display-name: "Bleed" +description: "&a%placeholder%% &8chance to cause your opponent to bleed, damaging them repeatedly" +placeholder: "1.5 * %level%" type: normal targets: -- sword -conflicts: [] + - sword +conflicts: [ ] rarity: legendary max-level: 7 @@ -16,8 +16,8 @@ enchantable: true effects: - id: bleed args: - chance: 1.5 * %level% + chance: "1.5 * %level%" damage: 1 interval: 15 - amount: 2 * %level% -conditions: [] + amount: "2 * %level%" +conditions: [ ] diff --git a/eco-core/core-plugin/src/main/resources/enchants/blind.yml b/eco-core/core-plugin/src/main/resources/enchants/blind.yml index be7b93ea..8f4395f5 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/blind.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/blind.yml @@ -1,12 +1,12 @@ -display-name: Blind -description: "%placeholder%% chance of blinding your opponent" -placeholder: '%level%' -type: Normal +display-name: "Blind" +description: "&a%placeholder%% &8chance of blinding your opponent" +placeholder: "%level%" +type: normal targets: -- bow -- crossbow -conflicts: [] + - bow + - crossbow +conflicts: [ ] rarity: legendary max-level: 6 @@ -17,9 +17,9 @@ enchantable: true effects: - id: potion_effect args: - chance: %level% + chance: "%level%" effect: blindness level: 1 - duration: 20 * %level% + duration: "20 * %level%" apply_to_player: false -conditions: [] +conditions: [ ] diff --git a/eco-core/core-plugin/src/main/resources/enchants/block_breather.yml b/eco-core/core-plugin/src/main/resources/enchants/block_breather.yml index 80ab74d6..80229eb2 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/block_breather.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/block_breather.yml @@ -1,11 +1,11 @@ -display-name: Block Breather -description: "%placeholder%% chance to ignore suffocation damage" -placeholder: '%level%*15' -type: Normal +display-name: "Block Breather" +description: "&a%placeholder%% &8chance to ignore suffocation damage" +placeholder: "%level% * 15" +type: normal targets: -- helmet -conflicts: [] + - helmet +conflicts: [ ] rarity: common max-level: 3 @@ -21,5 +21,5 @@ effects: - take_damage filters: damageCause: - - SUFFOCATION -conditions: [] + - suffocation +conditions: [ ] diff --git a/eco-core/core-plugin/src/main/resources/enchants/boss_hunter.yml b/eco-core/core-plugin/src/main/resources/enchants/boss_hunter.yml index 6bea7e32..54a13c2e 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/boss_hunter.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/boss_hunter.yml @@ -1,12 +1,12 @@ -display-name: Boss Hunter -description: Deal %placeholder%% more damage against bosses -placeholder: '10 * %level%' -type: Normal +display-name: "Boss Hunter" +description: "Deal &a%placeholder%% &8more damage against bosses" +placeholder: "10 * %level%" +type: normal targets: -- bow -- crossbow -conflicts: [] + - bow + - crossbow +conflicts: [ ] rarity: rare max-level: 8 @@ -17,9 +17,9 @@ enchantable: true effects: - id: damage_multiplier args: - multiplier: 1 + 0.1 * %level% + multiplier: "1 + 0.1 * %level%" triggers: - bow_attack filters: onlyBosses: true -conditions: [] +conditions: [ ] diff --git a/eco-core/core-plugin/src/main/resources/enchants/butchering.yml b/eco-core/core-plugin/src/main/resources/enchants/butchering.yml index 52e0127a..c4453867 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/butchering.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/butchering.yml @@ -1,11 +1,11 @@ -display-name: Butchering -description: Deal %placeholder%% more damage against passive mobs -placeholder: '25*%level%' -type: Normal +display-name: "Butchering" +description: "Deal &a%placeholder%% &8more damage against passive mobs" +placeholder: "25 * %level%" +type: normal targets: -- sword -- axe + - sword + - axe conflicts: - sharpness - bane_of_arthropods @@ -23,7 +23,7 @@ enchantable: true effects: - id: damage_multiplier args: - multiplier: 1 + 0.25 * %level% + multiplier: "1 + 0.25 * %level%" triggers: - melee_attack filters: @@ -39,4 +39,4 @@ effects: - villager - axolotl - chicken -conditions: [] +conditions: [ ] diff --git a/eco-core/core-plugin/src/main/resources/enchants/carve.yml b/eco-core/core-plugin/src/main/resources/enchants/carve.yml index 963b1f4f..6915f793 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/carve.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/carve.yml @@ -1,10 +1,10 @@ -display-name: Carve -description: "%placeholder%% chance to heavily damage all entities around attacked entity" -placeholder: '10*%level%' +display-name: "Carve" +description: "&a%placeholder%% &8chance to heavily damage nearby entities when you swing" +placeholder: "10 * %level%" type: special targets: -- axe + - axe conflicts: - cleave rarity: special @@ -17,12 +17,12 @@ enchantable: true effects: - id: damage_nearby_entities args: - chance: "10*%level%" + chance: "10 * %level%" damage: 2 - radius: "0.5*%level%" - entities: [] + radius: "0.5 * %level%" + entities: [ ] damage_as_player: true damage_self: false triggers: - melee_attack -conditions: [] +conditions: [ ] diff --git a/eco-core/core-plugin/src/main/resources/enchants/cleave.yml b/eco-core/core-plugin/src/main/resources/enchants/cleave.yml index df94ead6..7136f1bd 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/cleave.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/cleave.yml @@ -1,10 +1,10 @@ -display-name: Cleave -description: "%placeholder%% chance to damage all entities around attacked entity" -placeholder: '5*%level%' -type: Normal +display-name: "Cleave" +description: "&a%placeholder%% &8chance to damage all entities around attacked entity" +placeholder: "5 * %level%" +type: normal targets: -- axe + - axe conflicts: - carve rarity: rare @@ -17,12 +17,12 @@ enchantable: true effects: - id: damage_nearby_entities args: - chance: "5*%level%" + chance: "5 * %level%" damage: 2 - radius: "0.25*%level%" + radius: "0.25 * %level%" entities: [ ] damage_as_player: true damage_self: false triggers: - melee_attack -conditions: [] +conditions: [ ] diff --git a/eco-core/core-plugin/src/main/resources/enchants/confusion.yml b/eco-core/core-plugin/src/main/resources/enchants/confusion.yml index 48cfad4b..3c716a0c 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/confusion.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/confusion.yml @@ -1,11 +1,11 @@ -display-name: Confusion -description: "%placeholder%% chance to shuffle your opponents hotbar" -placeholder: '2*%level%' +display-name: "Confusion" +description: "&a%placeholder%% &8chance to shuffle your opponents hotbar" +placeholder: "2 * %level%" type: Special targets: -- sword -conflicts: [] + - sword +conflicts: [ ] rarity: special max-level: 4 @@ -16,7 +16,7 @@ enchantable: true effects: - id: shuffle_hotbar args: - chance: 2 * %level% + chance: "2 * %level%" triggers: - melee_attack -conditions: [] +conditions: [ ] diff --git a/eco-core/core-plugin/src/main/resources/enchants/corrosive.yml b/eco-core/core-plugin/src/main/resources/enchants/corrosive.yml index 2e115c59..3a3f5fc0 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/corrosive.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/corrosive.yml @@ -1,12 +1,12 @@ -display-name: Corrosive -description: Damages your opponents armor -placeholder: '%level%' -type: Normal +display-name: "Corrosive" +description: "Deals &a%placeholder% &8damage to your opponents armor" +placeholder: "%level%" +type: normal targets: -- bow -- crossbow -conflicts: [] + - bow + - crossbow +conflicts: [ ] rarity: legendary max-level: 2 @@ -20,4 +20,4 @@ effects: damage: "%level%" triggers: - melee_attack -conditions: [] +conditions: [ ] diff --git a/eco-core/core-plugin/src/main/resources/enchants/criticals.yml b/eco-core/core-plugin/src/main/resources/enchants/criticals.yml index 1b22ef57..d5906d49 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/criticals.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/criticals.yml @@ -1,12 +1,12 @@ -display-name: Criticals -description: Increases critical damage by %placeholder% -placeholder: '10*%level%' -type: Normal +display-name: "Criticals" +description: "Increases critical damage by &a%placeholder%%" +placeholder: "10 * %level%" +type: normal targets: -- sword -- axe -conflicts: [] + - sword + - axe +conflicts: [ ] rarity: epic max-level: 3 @@ -17,7 +17,7 @@ enchantable: true effects: - id: crit_multiplier args: - multiplier: 1 + 0.1*%level% + multiplier: "1 + 0.1 * %level%" triggers: - melee_attack -conditions: [] +conditions: [ ] diff --git a/eco-core/core-plugin/src/main/resources/enchants/cubism.yml b/eco-core/core-plugin/src/main/resources/enchants/cubism.yml index 0795658d..c3bf32d6 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/cubism.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/cubism.yml @@ -1,12 +1,12 @@ -display-name: Cubism -description: Deal %placeholder%% more against slimes and magma cubes -placeholder: '5*%level%' -type: Normal +display-name: "Cubism" +description: "Deal &a%placeholder%% &8more against slimes and magma cubes" +placeholder: "5 * %level%" +type: normal targets: -- sword -- axe -conflicts: [] + - sword + - axe +conflicts: [ ] rarity: rare max-level: 7 @@ -17,11 +17,11 @@ enchantable: true effects: - id: damage_multiplier args: - multiplier: 1 + 0.05 * %level% + multiplier: "1 + 0.05 * %level%" triggers: - melee_attack filters: entities: - slime - magma_cube -conditions: [] +conditions: [ ] diff --git a/eco-core/core-plugin/src/main/resources/enchants/telekinesis.yml b/eco-core/core-plugin/src/main/resources/enchants/telekinesis.yml index 0b87772a..24bfec9a 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/telekinesis.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/telekinesis.yml @@ -1,12 +1,12 @@ display-name: "Telekinesis" -description: "among us" +description: "Drops and experience go directly into your inventory" type: normal targets: - pickaxe - sword - axe -conflicts: [] +conflicts: [ ] rarity: common max-level: 1 diff --git a/eco-core/core-plugin/src/main/resources/enchants/test.yml b/eco-core/core-plugin/src/main/resources/enchants/test.yml deleted file mode 100644 index 8eb5f522..00000000 --- a/eco-core/core-plugin/src/main/resources/enchants/test.yml +++ /dev/null @@ -1,24 +0,0 @@ -display-name: "Test" -description: "Gives a &a%placeholder%%&8 bonus to damage" -placeholder: "%level% * 20" -type: normal - -targets: - - sword -conflicts: - - sharpness -rarity: common -max-level: 4 - -tradeable: true -discoverable: true -enchantable: true - -effects: - - id: damage_multiplier - args: - multiplier: 1 + 0.2 * %level% - triggers: - - melee_attack - -conditions: [ ] diff --git a/gradle.properties b/gradle.properties index 702995ae..91d8e0fc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ #libreforge-updater #Tue Aug 30 19:21:48 BST 2022 -version=9.0.0-b0 +version=9.0.0-b1 plugin-name=EcoEnchants From f362adf12a3cf972634ed1250da26d72cf15a8c3 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Tue, 30 Aug 2022 20:10:05 +0100 Subject: [PATCH 5/6] Fixed sedri's ymls again --- eco-core/core-plugin/src/main/resources/enchants/bleed.yml | 2 ++ eco-core/core-plugin/src/main/resources/enchants/blind.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/eco-core/core-plugin/src/main/resources/enchants/bleed.yml b/eco-core/core-plugin/src/main/resources/enchants/bleed.yml index 3983eb0c..67a22a2b 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/bleed.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/bleed.yml @@ -20,4 +20,6 @@ effects: damage: 1 interval: 15 amount: "2 * %level%" + triggers: + - melee_attack conditions: [ ] diff --git a/eco-core/core-plugin/src/main/resources/enchants/blind.yml b/eco-core/core-plugin/src/main/resources/enchants/blind.yml index 8f4395f5..5cde5792 100644 --- a/eco-core/core-plugin/src/main/resources/enchants/blind.yml +++ b/eco-core/core-plugin/src/main/resources/enchants/blind.yml @@ -22,4 +22,6 @@ effects: level: 1 duration: "20 * %level%" apply_to_player: false + triggers: + - melee_attack conditions: [ ] From d7ddd5e2337cb794ab63040641605cc97e7935f9 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Tue, 30 Aug 2022 20:29:10 +0100 Subject: [PATCH 6/6] libreforge-updater --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 91d8e0fc..35635dd3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ #libreforge-updater -#Tue Aug 30 19:21:48 BST 2022 +#Tue Aug 30 20:29:10 BST 2022 version=9.0.0-b1 plugin-name=EcoEnchants