Skip to content

Instantly share code, notes, and snippets.

@Haarolean
Created October 24, 2016 09:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Haarolean/1399f97ff5e467c3a81162ff1532293f to your computer and use it in GitHub Desktop.
Save Haarolean/1399f97ff5e467c3a81162ff1532293f to your computer and use it in GitHub Desktop.
clearlag
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
public void onEntityRemoveEvent(EntityRemoveEvent e) {
Iterator<Entity> it = e.getEntityList().iterator();
while (it.hasNext()) {
Entity item = it.next();
if (item.hasMetadata("MySuperItem")) {
it.remove();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment