コード例 #1
0
ファイル: EchoPetAPI.java プロジェクト: sgdc3/EchoPet
 /**
  * Teleports a {@link com.dsh105.echopet.api.pet.Pet} to a {@link org.bukkit.Location}
  *
  * @param pet the {@link com.dsh105.echopet.api.pet.Pet} to be teleported
  * @param location the {@link org.bukkit.Location} to teleport the {@link
  *     com.dsh105.echopet.api.pet.Pet} to
  * @return success of teleportation
  */
 public boolean teleportPet(IPet pet, Location location) {
   if (pet == null) {
     EchoPet.LOG.severe(
         "Failed to teleport Pet to Location through the EchoPetAPI. {@link com.dsh105.echopet.api.pet.Pet} cannot be null.");
     return false;
   }
   if (pet.isHat() || pet.isOwnerRiding()) {
     return false;
   }
   return pet.teleport(location);
 }