Guest User

Untitled

a guest
Oct 20th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. Set<Block> chestBlocks = chestContents.keySet();
  2. for (Block cb : chestBlocks) {
  3. BlockState st = cb.getState();
  4. if (st instanceof Chest) {
  5. Chest ch = (Chest) st;
  6. if (ch != null) {
  7. if (ch.getInventory() != null && chestContents.get(cb) != null) {
  8. ch.getInventory().setContents(chestContents.get(cb));
  9. }
  10. }
  11. }
  12. }
Add Comment
Please, Sign In to add comment