How to say if Hopper InventoryMoveItemEvent is taking item with MetaData?

Discussion in 'Plugin Development' started by UltraMC, Jan 27, 2014.

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

    UltraMC

    On player pickup I can do following, but how to check if item taken by Hopper has same MetaData?

    Code:java
    1. // PlayerPickupItemEvent event
    2. List<MetadataValue> mdvl = item.getMetadata("moneyValue");
    3.  
    4. for (MetadataValue mdv : mdvl) {
    5. if ((mdv instanceof MoneyMetaData)) {
    6. //
    7. }
    8. }
     
  2. Offline

    desht

Thread Status:
Not open for further replies.

Share This Page