Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
 public static List<InactiveMyPet> getInactiveMyPets(String owner) {
   if (mInctivePets.containsKey(MyPetPlayer.getMyPetPlayer(owner))) {
     return mInctivePets.get(MyPetPlayer.getMyPetPlayer(owner));
   }
   return null;
 }
Ejemplo n.º 3
0
 public static boolean hasInactiveMyPets(String name) {
   return MyPetPlayer.isMyPetPlayer(name)
       && mInctivePets.containsKey(MyPetPlayer.getMyPetPlayer(name));
 }
Ejemplo n.º 4
0
 public static boolean hasInactiveMyPets(Player player) {
   return mInctivePets.containsKey(MyPetPlayer.getMyPetPlayer(player));
 }
Ejemplo n.º 5
0
 public static boolean hasMyPet(String name) {
   return mActivePets.containsKey(MyPetPlayer.getMyPetPlayer(name));
 }
Ejemplo n.º 6
0
 public static boolean hasMyPet(Player player) {
   return mActivePets.containsKey(MyPetPlayer.getMyPetPlayer(player));
 }
Ejemplo n.º 7
0
 public static MyPet getMyPet(String owner) {
   if (mActivePets.containsKey(MyPetPlayer.getMyPetPlayer(owner))) {
     return mActivePets.get(MyPetPlayer.getMyPetPlayer(owner));
   }
   return null;
 }