diff --git a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/manager/StatManager.java b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/manager/StatManager.java index 04f9ed28..0bc6331d 100644 --- a/MMOItems-API/src/main/java/net/Indyuce/mmoitems/manager/StatManager.java +++ b/MMOItems-API/src/main/java/net/Indyuce/mmoitems/manager/StatManager.java @@ -213,6 +213,10 @@ public class StatManager { case "text": register(new StringStat(statId, Material.PAPER, name, lore, new String[]{"!miscellaneous", "!block", "all"})); break; + case "text-list": + register(new StringListStat(statId, Material.PAPER, name, lore, new String[]{"!miscellaneous", "!block", "all"})); + break; + default: throw new RuntimeException("Cannot register a custom stat of type " + type); } diff --git a/MMOItems-Dist/src/main/resources/default/custom-stats.yml b/MMOItems-Dist/src/main/resources/default/custom-stats.yml index 49341b06..5f9a3a9d 100644 --- a/MMOItems-Dist/src/main/resources/default/custom-stats.yml +++ b/MMOItems-Dist/src/main/resources/default/custom-stats.yml @@ -1,4 +1,7 @@ # Add as many custom stats as you want below +# - +# For each custom stat you add, you must also add a corresponding +# entry in the lore-format.yml and stats.yml files custom-stats: # The key doesn't really matter, although it must be unique @@ -13,4 +16,9 @@ custom-stats: # - boolean (true/false) # - text # - text-list (a list of string) - type: "double" \ No newline at end of file + type: "double" + + # The lore must be a list of strings + lore: + - "This is a test line #1" + - "This is a test line #2" \ No newline at end of file diff --git a/MMOItems-Dist/src/main/resources/default/language/lore-format.yml b/MMOItems-Dist/src/main/resources/default/language/lore-format.yml index 7396a44f..3c3b2058 100644 --- a/MMOItems-Dist/src/main/resources/default/language/lore-format.yml +++ b/MMOItems-Dist/src/main/resources/default/language/lore-format.yml @@ -30,6 +30,7 @@ lore-format: - '#profession-woodcutting#' # - '{bar}&8&m--------&f&l &nStatistics&8 &m-------------' - '{bar}' + - '#custom-myluck#' - '#can-identify#' - '#can-deconstruct#' - '#can-deskin#'