Examples of Tameable


Examples of org.bukkit.entity.Tameable

        entity1.setFireTicks(40);
      } else if (type.equalsIgnoreCase("baby")){
        Ageable age = (Ageable) entity1;
        age.setBaby();
      } else if (type.equalsIgnoreCase("tamed")){
        Tameable tame = (Tameable) entity1;
        tame.setTamed(true);
      } else if (type.equalsIgnoreCase("angry")){
        if (toSpawn == EntityType.WOLF){
          Wolf wolf = (Wolf) entity1;
          wolf.setAngry(true);
        }
View Full Code Here

Examples of org.bukkit.entity.Tameable

            entity1.setFireTicks(40);
          } else if (type.equalsIgnoreCase("baby")){
            Ageable age = (Ageable) entity1;
            age.setBaby();
          } else if (type.equalsIgnoreCase("tamed")){
            Tameable tame = (Tameable) entity1;
            tame.setTamed(true);
          } else if (type.equalsIgnoreCase("angry")){
            if (toSpawn == EntityType.WOLF){
              Wolf wolf = (Wolf) entity1;
              wolf.setAngry(true);
            }
View Full Code Here

Examples of org.bukkit.entity.Tameable

          Ageable ageable = (Ageable) entity;
          ageable.setBaby();
        }
       
        if (type.equalsIgnoreCase("tamed")){
          Tameable tame = (Tameable) entity;
          tame.setTamed(true);
          tame.setOwner((AnimalTamer) player);
        }
       
        if (type.equalsIgnoreCase("angry")){
          Wolf wolf = (Wolf) entity;
          wolf.setAngry(true);
View Full Code Here

Examples of org.bukkit.entity.Tameable

            if(e.getDamager() instanceof org.bukkit.entity.Player) {
                pDamager = (org.bukkit.entity.Player) e.getDamager();
            } else if(e.getDamager() instanceof Projectile && ((Projectile)e.getDamager()).getShooter() instanceof org.bukkit.entity.Player) {
                pDamager = (org.bukkit.entity.Player)((Projectile)e.getDamager()).getShooter();
            } else if(e.getDamager() instanceof Tameable) {
                Tameable t = (Tameable) e.getDamager();
                if (t.isTamed() && t.getOwner() instanceof org.bukkit.entity.Player) {
                    pDamager = (org.bukkit.entity.Player) t.getOwner();
                }
            }
            if(pDamager != null) {
                // check if in creative
                if (pDamager.getGameMode().equals(GameMode.CREATIVE) && !ConfigManager.getJobsConfiguration().payInCreative())
View Full Code Here

Examples of org.bukkit.entity.Tameable

            if (event.getFinalDamage() >= 1) {
                mcMMOPlayer.actualizeRecentlyHurt();
            }
        }
        else if (livingEntity instanceof Tameable) {
            Tameable pet = (Tameable) livingEntity;
            AnimalTamer owner = pet.getOwner();

            if (Taming.canPreventDamage(pet, owner)) {
                Player player = (Player) owner;
                Wolf wolf = (Wolf) pet;
View Full Code Here

Examples of org.bukkit.entity.Tameable

        if (!(entity instanceof Tameable) || !(target instanceof Player)) {
            return;
        }

        Player player = (Player) target;
        Tameable tameable = (Tameable) entity;

        if (!UserManager.hasPlayerDataKey(player) || !CombatUtils.isFriendlyPet(player, tameable)) {
            return;
        }

        // isFriendlyPet ensures that the Tameable is: Tamed, owned by a player, and the owner is in the same party
        // So we can make some assumptions here, about our casting and our check
        if (!(Permissions.friendlyFire(player) && Permissions.friendlyFire((Player) tameable.getOwner()))) {
            event.setCancelled(true);
        }
    }
View Full Code Here

Examples of org.bukkit.entity.Tameable

     *
     * @param target The entity to examine
     */
    public void beastLore(LivingEntity target) {
        Player player = getPlayer();
        Tameable beast = (Tameable) target;

        String message = LocaleLoader.getString("Combat.BeastLore") + " ";

        if (beast.isTamed() && beast.getOwner() != null) {
            message = message.concat(LocaleLoader.getString("Combat.BeastLoreOwner", beast.getOwner().getName()) + " ");
        }

        message = message.concat(LocaleLoader.getString("Combat.BeastLoreHealth", target.getHealth(), target.getMaxHealth()));
        player.sendMessage(message);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.