Lore option & some more documentation

This commit is contained in:
Roch Blonndiaux 2023-01-11 13:48:52 +01:00
parent 0c69a4d259
commit e442d030ad
3 changed files with 14 additions and 1 deletions

View File

@ -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);
}

View File

@ -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"
type: "double"
# The lore must be a list of strings
lore:
- "This is a test line #1"
- "This is a test line #2"

View File

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