Merge pull request #250 from TinyTank800/master

Added CustomData to panel generation using /cpg
This commit is contained in:
RockyHawk 2023-03-28 15:19:26 +11:00 committed by GitHub
commit a1b6d9c9fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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