Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //At the top of your class
- HashMap<UUID, Float> saturation = new HashMap<UUID, Float>();
- HashMap<UUID, Integer> foodlevel = new HashMap<UUID, Integer>();
- //Before a player gets blinded and requires aid
- saturation.put(p.getUniqueId(), p.getSaturation());
- foodlevel.put(p.getUniqueId(), p.getFoodLevel());
- //When a player is successfully resurrected
- p.setFoodLevel(foodlevel.get(p.getUniqueId()));
- p.setSaturation(saturation.get(p.getUniqueId()));
Advertisement
Add Comment
Please, Sign In to add comment