Advertisement
Guest User

Untitled

a guest
Dec 25th, 2014
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.45 KB | None | 0 0
  1. public void loadNBT(ConfigurationSection section, ItemStack itemStack) {
  2.     if (itemStack.getType() == Material.SKULL_ITEM) {
  3.         ItemStack stack = NbtFactory.getCraftItemStack(itemStack);
  4.         NbtFactory.NbtCompound compound = NbtFactory.fromItemTag(stack);
  5.         compound.putPath("SkullOwner.Name", section.getString("owner"));
  6.  
  7.     System.out.println(compound); //prints [20:43:38] [Server thread/INFO]: {SkullOwner={Name=StaticJava}}
  8.     }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement