Plugin onDisable() Tasks

Discussion in 'Plugin Development' started by Exloki, Dec 6, 2013.

Thread Status:
Not open for further replies.
  1. Hello!

    I'm making a shop plugin that involves having items float on top of half slabs. All is fine and dandy, except the method that is supposed to be run in the plugin onDisable() that removes all the current shop entities does not run for some reason.

    Is there something special I need to do to ensure the method is run?

    Thanks in advance!
     
  2. Offline

    felixfritz

    What have you tried to make them disappear?
     
  3. Whenever I create the items, I store them in ' Set<Entity> currentItems '. I then call the following method onDisable() for the plugin:

    Code:java
    1. public void removeItems()
    2. {
    3. Iterator<Entity> it = currentItems.iterator();
    4. while(it.hasNext())
    5. {
    6. it.next().remove();
    7. }
    8. }
     
Thread Status:
Not open for further replies.

Share This Page