How to store dropped item in YML file or other way ?

Discussion in 'Plugin Development' started by max16150, Jan 31, 2019.

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

    max16150

    Hi all,
    I use the dropItem() method to drop an item on a chest and i want remove it when i break the chest.

    Item item = back.getWorld().dropItem(itemloc.add(0.5,0,0.5), itemstack);

    I have try to store his UUID in yml file but I dont know how to retrieve it ...
     
  2. Offline

    MightyOne

    Store the uuids of the items related to the worlds they are spawned in. When loading the plugin you can go through every entity of World#getEntities() and look if it's uuid is matching to any of the one you stored.
     
  3. Offline

    max16150

    Okay thanks ! I'm going to do that !
     
Thread Status:
Not open for further replies.

Share This Page