Skip to content

Instantly share code, notes, and snippets.

@mattysweeps
Created October 1, 2016 01:43
Show Gist options
  • Save mattysweeps/8a3423707ac0865155f28e4179fbc04d to your computer and use it in GitHub Desktop.
Save mattysweeps/8a3423707ac0865155f28e4179fbc04d to your computer and use it in GitHub Desktop.
Drop inventory
while (!player.getInventory().isEmpty()) {
player.getInventory().poll()
.map(DataSerializable::toContainer)
.ifPresent(world::createEntity);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment