diff --git a/build.gradle b/build.gradle index b74921e..418c039 100644 --- a/build.gradle +++ b/build.gradle @@ -38,7 +38,7 @@ allprojects { } dependencies { - compileOnly 'com.willfp:eco:6.12.2' + compileOnly 'com.willfp:eco:6.13.8' compileOnly 'org.jetbrains:annotations:19.0.0' diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/reforges/reforges/Reforge.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/reforges/reforges/Reforge.kt index 10b6c35..a570321 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/reforges/reforges/Reforge.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/reforges/reforges/Reforge.kt @@ -23,9 +23,9 @@ class Reforge( ) { val id = config.getString("id") - val name = config.getString("name") + val name = config.getFormattedString("name") - val description: List = config.getStrings("description") + val description: List = config.getFormattedStrings("description") val targets = config.getStrings("targets").map { ReforgeTarget.getByName(it) }.toSet() @@ -44,9 +44,9 @@ class Reforge( val stone: ItemStack = SkullBuilder().apply { if (config.getBool("stone.enabled")) { setSkullTexture(config.getString("stone.texture")) - setDisplayName(plugin.configYml.getString("reforge.stone.name").replace("%reforge%", name)) + setDisplayName(config.getFormattedString("stone.name").replace("%reforge%", name)) addLoreLines( - plugin.configYml.getStrings("stone.lore").map { "${Display.PREFIX}${it.replace("%reforge%", name)}" }) + config.getFormattedStrings("stone.lore").map { "${Display.PREFIX}${it.replace("%reforge%", name)}" }) } }.build() diff --git a/eco-core/core-plugin/src/main/resources/config.yml b/eco-core/core-plugin/src/main/resources/config.yml index a87774b..913a460 100644 --- a/eco-core/core-plugin/src/main/resources/config.yml +++ b/eco-core/core-plugin/src/main/resources/config.yml @@ -133,11 +133,4 @@ reforge: - "&8This item can be reforged!" display-in-lore: true - display-in-name: true # Requires paper to be installed on the server - - stone: - name: "%reforge%&f Reforge Stone" - lore: - - "&7Place on the right of the" - - "&7reforge menu to apply the" - - "%reforge%&7 reforge!" + display-in-name: true # Requires paper to be installed on the server \ No newline at end of file diff --git a/eco-core/core-plugin/src/main/resources/reforges.json b/eco-core/core-plugin/src/main/resources/reforges.json index 3cfae69..ebc389c 100644 --- a/eco-core/core-plugin/src/main/resources/reforges.json +++ b/eco-core/core-plugin/src/main/resources/reforges.json @@ -11,6 +11,8 @@ ], "stone": { "enabled": false, + "name": "", + "lore": [], "texture": "", "craftable": false, "recipe": [] @@ -35,6 +37,8 @@ ], "stone": { "enabled": false, + "name": "", + "lore": [], "texture": "", "craftable": false, "recipe": [] @@ -62,6 +66,8 @@ ], "stone": { "enabled": false, + "name": "", + "lore": [], "texture": "", "craftable": false, "recipe": [] @@ -87,6 +93,12 @@ ], "stone": { "enabled": true, + "name": "Dynamic&f Reforge Stone", + "lore": [ + "&7Place on the right of the", + "&7reforge menu to apply the", + "Dynamic&7 reforge!" + ], "texture": "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMmM0YTY1YzY4OWIyZDM2NDA5MTAwYTYwYzJhYjhkM2QwYTY3Y2U5NGVlYTNjMWY3YWM5NzRmZDg5MzU2OGI1ZCJ9fX0=", "craftable": true, "recipe": [ @@ -125,6 +137,8 @@ ], "stone": { "enabled": false, + "name": "", + "lore": [], "texture": "", "craftable": false, "recipe": [] @@ -150,6 +164,8 @@ ], "stone": { "enabled": false, + "name": "", + "lore": [], "texture": "", "craftable": false, "recipe": [] @@ -176,6 +192,8 @@ ], "stone": { "enabled": false, + "name": "", + "lore": [], "texture": "", "craftable": false, "recipe": [] @@ -210,6 +228,8 @@ ], "stone": { "enabled": false, + "name": "", + "lore": [], "texture": "", "craftable": false, "recipe": [] @@ -237,6 +257,8 @@ ], "stone": { "enabled": false, + "name": "", + "lore": [], "texture": "", "craftable": false, "recipe": [] @@ -261,6 +283,8 @@ ], "stone": { "enabled": false, + "name": "", + "lore": [], "texture": "", "craftable": false, "recipe": [] @@ -286,6 +310,8 @@ ], "stone": { "enabled": false, + "name": "", + "lore": [], "texture": "", "craftable": false, "recipe": [] @@ -311,6 +337,12 @@ ], "stone": { "enabled": true, + "name": "Rich&f Reforge Stone", + "lore": [ + "&7Place on the right of the", + "&7reforge menu to apply the", + "Rich&7 reforge!" + ], "texture": "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvY2RjNTdjNzVhZGYzOWVjNmYwZTA5MTYwNDlkZDk2NzFlOThhOGExZTYwMDEwNGU4NGU2NDVjOTg4OTUwYmQ3In19fQ==", "craftable": true, "recipe": [ @@ -345,6 +377,8 @@ ], "stone": { "enabled": false, + "name": "", + "lore": [], "texture": "", "craftable": false, "recipe": [] @@ -369,6 +403,8 @@ ], "stone": { "enabled": false, + "name": "", + "lore": [], "texture": "", "craftable": false, "recipe": [] @@ -394,6 +430,8 @@ ], "stone": { "enabled": false, + "name": "", + "lore": [], "texture": "", "craftable": false, "recipe": [] @@ -423,6 +461,8 @@ ], "stone": { "enabled": false, + "name": "", + "lore": [], "texture": "", "craftable": false, "recipe": [] @@ -452,6 +492,8 @@ ], "stone": { "enabled": false, + "name": "", + "lore": [], "texture": "", "craftable": false, "recipe": []