Solved Inventory Help!

Discussion in 'Plugin Development' started by Gabum, Jun 3, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    Gabum

    Hello Bukkiteers!

    I need help developing a special plugin, which creates all-new weapons and effects and stuff.
    The Battle System is changed, and so a Player can only have one weapon (marked by Damage: X in the lore) in the quickbar, unless he changes it in special areas.

    Any ideas how to do this? I would like to use InventoryCloseEvent, but I have no idea how to use it.

    Could you guys help me?
    1st: How do I get the player who just closed the inventory? (getPlayer() only returns a HumanEntity, And I'm not sure whether that would work. What's the difference by the way?)
    2nd: Which slots do I have to check to have the quickbar controlled?
    3rd: Can I get the armor of the player using the player.getEquipment().getHelmet() method right during handling the event?
     
  2. Offline

    L33m4n123

    Gabum likes this.
  3. Offline

    Gabum

    Thanks for the quick help!

    Well, you anwered 1 and 3 very well, and thx for this, but I meant with 2nd how I would loop through the slots of the quickbar, Like slot-numbers or something like that.
     
  4. Offline

    L33m4n123

    Yea slot number would be possible. iirc the Quickbar is slot 0 - slot 8
     
    Gabum likes this.
  5. Offline

    Gabum

    Thank you! If there would be something like thumbs up for comments, I would give you 1000000000! :D
     
  6. Offline

    L33m4n123

    There's a "like" button :p
     
    Gabum likes this.
  7. Offline

    Gabum

    Whoops :D
     
    L33m4n123 likes this.
Thread Status:
Not open for further replies.

Share This Page