Setting Items of an Anvil

Discussion in 'Spigot Plugin Development' started by Ziron5, Jun 5, 2015.

  1. Hi,

    I am trying to set the contents of an Anvil Inventory for a while now and searched many forums but I just can't find a way for 1.8. Neither the common inv.setItem(slot, ItemStack) nor the ways provided by people in forums work. Is it even possible?

    I want to set the item of the left slot.

    sincerly

    Ziron5
     
    #1 Ziron5, Jun 5, 2015
    Last edited: Jun 5, 2015
  2. I don't think this is possible... that seems more on the client side of minecraft.
     
  3. Thanks, I have been trough that but it doen't help me to set the contents of an Anvil slot. Maybe some of you have seen the friend add system on mineplex. When you add a friend there you get an Anvil GUI aswell where you can put a player name. But as far as I know mineplex is still running 1.7
     
  4. Nope. It's 1.8.

    Titles, ActionBars, TAB headers and footers... etc..
     
  5. So there has to be a way...
     
  6. What makes you believe it doesn't work?
     
  7. I tested it out
     
  8. post your test code.
     
    • Agree Agree x 1
  9. You need to send packets
     
  10. Why send packets when the CraftAnvilInventory is implemented properly in the CraftBukkit code (and Inventory exposes all the methods you require)
     
  11. Wait, he is trying to do what? open an anvil inventory? modify an existing one?
     
  12. he wants to modify the contents of the anvil (as you can see in the OP)