Klasse ItemTemplates
java.lang.Object
de.delinkedde.mobarenareborn.item.ItemTemplates
Named item templates with full NBT (enchantments, names, lore, components).
An admin saves the item in hand with /ma saveitem <name>; the stack is serialised
natively into items.yml and survives restarts. Kits and rewards reference a template as
item:<name>[:amount] wherever a plain material:amount spec is accepted - this is
how enchanted kit weapons and reward items work.
-
Konstruktordetails
-
ItemTemplates
- Parameter:
plugin- the owning plugin, for the data folder and logging
-
-
Methodendetails
-
load
public void load()Loads (or reloads) all templates fromitems.yml. -
put
Saves an item as a named template.- Parameter:
name- the template nameitem- the item to store (cloned)
-
remove
Deletes a template.- Parameter:
name- the template name- Gibt zurück:
trueif it existed
-
resolve
Resolves a template to a fresh stack.- Parameter:
name- the template nameamount- the desired stack size (<= 0keeps the stored size)- Gibt zurück:
- a cloned stack, or
nullwhen the template is unknown
-
names
- Gibt zurück:
- the sorted template names
-