Search in sources :

Example 16 with FixedMetadataValue

use of org.bukkit.metadata.FixedMetadataValue in project EliteMobs by MagmaGuy.

the class AttackPush method applyPowers.

@Override
public void applyPowers(Entity entity) {
    entity.setMetadata(powerMetadata, new FixedMetadataValue(plugin, true));
    MinorPowerPowerStance minorPowerPowerStance = new MinorPowerPowerStance();
    minorPowerPowerStance.itemEffect(entity);
}
Also used : FixedMetadataValue(org.bukkit.metadata.FixedMetadataValue) MinorPowerPowerStance(com.magmaguy.elitemobs.powerstances.MinorPowerPowerStance)

Example 17 with FixedMetadataValue

use of org.bukkit.metadata.FixedMetadataValue in project EliteMobs by MagmaGuy.

the class AttackWeakness method applyPowers.

@Override
public void applyPowers(Entity entity) {
    entity.setMetadata(powerMetadata, new FixedMetadataValue(plugin, true));
    MinorPowerPowerStance minorPowerPowerStance = new MinorPowerPowerStance();
    minorPowerPowerStance.itemEffect(entity);
}
Also used : FixedMetadataValue(org.bukkit.metadata.FixedMetadataValue) MinorPowerPowerStance(com.magmaguy.elitemobs.powerstances.MinorPowerPowerStance)

Example 18 with FixedMetadataValue

use of org.bukkit.metadata.FixedMetadataValue in project EliteMobs by MagmaGuy.

the class AttackFireball method applyPowers.

@Override
public void applyPowers(Entity entity) {
    entity.setMetadata(powerMetadata, new FixedMetadataValue(plugin, true));
    MinorPowerPowerStance minorPowerPowerStance = new MinorPowerPowerStance();
    minorPowerPowerStance.itemEffect(entity);
}
Also used : FixedMetadataValue(org.bukkit.metadata.FixedMetadataValue) MinorPowerPowerStance(com.magmaguy.elitemobs.powerstances.MinorPowerPowerStance)

Example 19 with FixedMetadataValue

use of org.bukkit.metadata.FixedMetadataValue in project EliteMobs by MagmaGuy.

the class AttackConfusing method applyPowers.

@Override
public void applyPowers(Entity entity) {
    entity.setMetadata(powerMetadata, new FixedMetadataValue(plugin, true));
    MinorPowerPowerStance minorPowerPowerStance = new MinorPowerPowerStance();
//        minorPowerPowerStance.attackConfusing(entity);
}
Also used : FixedMetadataValue(org.bukkit.metadata.FixedMetadataValue) MinorPowerPowerStance(com.magmaguy.elitemobs.powerstances.MinorPowerPowerStance)

Example 20 with FixedMetadataValue

use of org.bukkit.metadata.FixedMetadataValue in project EliteMobs by MagmaGuy.

the class AttackFreeze method iceEffectApplier.

public void iceEffectApplier(int counter, Entity damagee, Block block) {
    if (counter == 0) {
        damagee.setMetadata(MetadataHandler.FROZEN, new FixedMetadataValue(plugin, true));
        damagee.setMetadata(MetadataHandler.FROZEN_COOLDOWN, new FixedMetadataValue(plugin, true));
        block.setType(Material.PACKED_ICE);
        block.setMetadata("TemporaryBlock", new FixedMetadataValue(plugin, true));
        if (damagee instanceof Player) {
            Player player = (Player) damagee;
            player.sendTitle("", "Frozen!");
        }
    }
    if (counter == 40) {
        damagee.removeMetadata(MetadataHandler.FROZEN, plugin);
        block.setType(Material.AIR);
        block.removeMetadata("TemporaryBlock", plugin);
    }
    if (counter == 20 * 7) {
        damagee.removeMetadata(MetadataHandler.FROZEN_COOLDOWN, plugin);
        Bukkit.getScheduler().cancelTask(processID);
    }
}
Also used : Player(org.bukkit.entity.Player) FixedMetadataValue(org.bukkit.metadata.FixedMetadataValue)

Aggregations

FixedMetadataValue (org.bukkit.metadata.FixedMetadataValue)52 MinorPowerPowerStance (com.magmaguy.elitemobs.powerstances.MinorPowerPowerStance)22 Entity (org.bukkit.entity.Entity)9 EventHandler (org.bukkit.event.EventHandler)8 BukkitRunnable (org.bukkit.scheduler.BukkitRunnable)7 LivingEntity (org.bukkit.entity.LivingEntity)6 Player (org.bukkit.entity.Player)5 ItemStack (org.bukkit.inventory.ItemStack)5 MajorPowerPowerStance (com.magmaguy.elitemobs.powerstances.MajorPowerPowerStance)4 Item (org.bukkit.entity.Item)4 Zombie (org.bukkit.entity.Zombie)4 Vector (org.bukkit.util.Vector)4 IronGolem (org.bukkit.entity.IronGolem)3 PotionEffect (org.bukkit.potion.PotionEffect)3 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 Random (java.util.Random)2 Location (org.bukkit.Location)2 World (org.bukkit.World)2 Block (org.bukkit.block.Block)2