Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void infinitesHandler(Player player) {
- ArrayList<CPet> activatablePets = CPetUtil.getActivatablePets(player, null);
- for (CPet cPet : Core.getCustomPetHandler().getPets()) {
- String id = player.getName() + "+" + cPet.getcName();
- if (activeInfinites.containsKey(id)) {
- boolean isInInventory = false;
- for (CPet aPet : activatablePets) {
- if (cPet.getcName().equals(aPet.getcName())) {
- isInInventory = true;
- }
- }
- if (isInInventory == false) {
- player.removePotionEffect(activeInfinites.get(id));
- activeInfinites.remove(id);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement