public static InactiveMyPet setMyPetInactive(Player owner) { if (mActivePets.containsKey(MyPetPlayer.getMyPetPlayer(owner))) { MyPet activeMyPet = getMyPet(owner); MyPetSelectSetInactiveEvent event = new MyPetSelectSetInactiveEvent(activeMyPet); getServer().getPluginManager().callEvent(event); if (event.isCancelled()) { return null; } activeMyPet.removePet(); InactiveMyPet inactiveMyPet = getInactiveMyPet(activeMyPet); removeMyPet(activeMyPet); addInactiveMyPet(inactiveMyPet); MyPetUtil.getDebugLogger().info(" I: " + inactiveMyPet); MyPetUtil.getDebugLogger().info(" A: " + activeMyPet); return inactiveMyPet; } return null; }
public static List<InactiveMyPet> getInactiveMyPets(String owner) { if (mInctivePets.containsKey(MyPetPlayer.getMyPetPlayer(owner))) { return mInctivePets.get(MyPetPlayer.getMyPetPlayer(owner)); } return null; }
public static boolean hasInactiveMyPets(String name) { return MyPetPlayer.isMyPetPlayer(name) && mInctivePets.containsKey(MyPetPlayer.getMyPetPlayer(name)); }
public static boolean hasInactiveMyPets(Player player) { return mInctivePets.containsKey(MyPetPlayer.getMyPetPlayer(player)); }
public static boolean hasMyPet(String name) { return mActivePets.containsKey(MyPetPlayer.getMyPetPlayer(name)); }
public static boolean hasMyPet(Player player) { return mActivePets.containsKey(MyPetPlayer.getMyPetPlayer(player)); }
public static MyPet getMyPet(String owner) { if (mActivePets.containsKey(MyPetPlayer.getMyPetPlayer(owner))) { return mActivePets.get(MyPetPlayer.getMyPetPlayer(owner)); } return null; }