forked from Upstream/CommandPanels
Added customdata
Added custom data check to the panel generation allowing automatic setup for custom resource items. This was added inside the itemcreation file and requires 1.14 or above to work.
This commit is contained in:
parent
bb08202e7b
commit
1738be4950
@ -481,6 +481,9 @@ public class ItemCreation {
|
||||
}
|
||||
file.set("panels." + panelName + ".item." + i + ".name", Objects.requireNonNull(cont.getItemMeta()).getDisplayName());
|
||||
file.set("panels." + panelName + ".item." + i + ".lore", Objects.requireNonNull(cont.getItemMeta()).getLore());
|
||||
if(plugin.legacy.LOCAL_VERSION.greaterThanOrEqualTo(MinecraftVersions.v1_14)){
|
||||
file.set("panels." + panelName + ".item." + i + ".customdata", Objects.requireNonNull(cont.getItemMeta()).getCustomModelData());
|
||||
}
|
||||
}catch(Exception n){
|
||||
//skip over an item that spits an error
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user