Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void loadNBT(ConfigurationSection section, ItemStack itemStack) {
- if (itemStack.getType() == Material.SKULL_ITEM) {
- ItemStack stack = NbtFactory.getCraftItemStack(itemStack);
- NbtFactory.NbtCompound compound = NbtFactory.fromItemTag(stack);
- compound.putPath("SkullOwner.Name", section.getString("owner"));
- System.out.println(compound); //prints [20:43:38] [Server thread/INFO]: {SkullOwner={Name=StaticJava}}
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement