Created
October 1, 2016 01:43
-
-
Save mattysweeps/8a3423707ac0865155f28e4179fbc04d to your computer and use it in GitHub Desktop.
Drop inventory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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