Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Set<Block> chestBlocks = chestContents.keySet();
- for (Block cb : chestBlocks) {
- BlockState st = cb.getState();
- if (st instanceof Chest) {
- Chest ch = (Chest) st;
- if (ch != null) {
- if (ch.getInventory() != null && chestContents.get(cb) != null) {
- ch.getInventory().setContents(chestContents.get(cb));
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment