9
0
mirror of https://github.com/Auxilor/Reforges.git synced 2025-12-28 19:39:22 +00:00

Reforge stone names and lores are now done per-stone

This commit is contained in:
Auxilor
2021-11-14 11:17:07 +00:00
parent b1f03fe214
commit 19cacea870
4 changed files with 48 additions and 13 deletions

View File

@@ -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'

View File

@@ -23,9 +23,9 @@ class Reforge(
) {
val id = config.getString("id")
val name = config.getString("name")
val name = config.getFormattedString("name")
val description: List<String> = config.getStrings("description")
val description: List<String> = 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()

View File

@@ -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

View File

@@ -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": "<gradient:#AAFFA9>Dynamic</gradient:#11FFBD>&f Reforge Stone",
"lore": [
"&7Place on the right of the",
"&7reforge menu to apply the",
"<gradient:#AAFFA9>Dynamic</gradient:#11FFBD>&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": "<gradient:#DBDBDB>Rich</gradient:#F2F2F2>&f Reforge Stone",
"lore": [
"&7Place on the right of the",
"&7reforge menu to apply the",
"<gradient:#DBDBDB>Rich</gradient:#F2F2F2>&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": []