mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
Change ability particles due to confusion over glass-breaking sound.
This commit is contained in:
parent
8833ceb3b5
commit
79bcd76aa0
@ -3,20 +3,24 @@ package com.gmail.nossr50.skills.utilities;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.bukkit.Effect;
|
import org.bukkit.Color;
|
||||||
|
import org.bukkit.FireworkEffect;
|
||||||
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.FireworkEffect.Type;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.enchantments.Enchantment;
|
import org.bukkit.enchantments.Enchantment;
|
||||||
|
import org.bukkit.entity.EntityType;
|
||||||
|
import org.bukkit.entity.Firework;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.entity.FoodLevelChangeEvent;
|
import org.bukkit.event.entity.FoodLevelChangeEvent;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.PlayerInventory;
|
import org.bukkit.inventory.PlayerInventory;
|
||||||
|
import org.bukkit.inventory.meta.FireworkMeta;
|
||||||
import org.bukkit.inventory.meta.ItemMeta;
|
import org.bukkit.inventory.meta.ItemMeta;
|
||||||
import org.bukkit.plugin.PluginManager;
|
import org.bukkit.plugin.PluginManager;
|
||||||
import org.bukkit.potion.Potion;
|
|
||||||
import org.bukkit.potion.PotionEffect;
|
import org.bukkit.potion.PotionEffect;
|
||||||
import org.bukkit.potion.PotionEffectType;
|
import org.bukkit.potion.PotionEffectType;
|
||||||
import org.bukkit.potion.PotionType;
|
|
||||||
import org.getspout.spoutapi.SpoutManager;
|
import org.getspout.spoutapi.SpoutManager;
|
||||||
import org.getspout.spoutapi.player.SpoutPlayer;
|
import org.getspout.spoutapi.player.SpoutPlayer;
|
||||||
|
|
||||||
@ -199,7 +203,18 @@ public class SkillTools {
|
|||||||
|
|
||||||
profile.setAbilityMode(ability, false);
|
profile.setAbilityMode(ability, false);
|
||||||
profile.setAbilityInformed(ability, false);
|
profile.setAbilityInformed(ability, false);
|
||||||
player.playEffect(player.getEyeLocation(), Effect.POTION_BREAK, new Potion(PotionType.STRENGTH));
|
|
||||||
|
Location location = player.getLocation();
|
||||||
|
location.setY(location.getY() - 2.0);
|
||||||
|
location.setPitch(-90);
|
||||||
|
|
||||||
|
Firework firework = (Firework) player.getWorld().spawnEntity(location, EntityType.FIREWORK);
|
||||||
|
FireworkMeta fireworkMeta = firework.getFireworkMeta();
|
||||||
|
FireworkEffect effect = FireworkEffect.builder().flicker(false).withColor(Color.RED). with(Type.BALL_LARGE).trail(true).build();
|
||||||
|
fireworkMeta.addEffect(effect);
|
||||||
|
fireworkMeta.addEffect(effect);
|
||||||
|
fireworkMeta.setPower(0);
|
||||||
|
firework.setFireworkMeta(fireworkMeta);
|
||||||
|
|
||||||
if (profile.useChatNotifications()) {
|
if (profile.useChatNotifications()) {
|
||||||
player.sendMessage(ability.getAbilityOff());
|
player.sendMessage(ability.getAbilityOff());
|
||||||
@ -394,7 +409,17 @@ public class SkillTools {
|
|||||||
if (!profile.getAbilityMode(ability) && cooldownOver(profile.getSkillDATS(ability), ability.getCooldown(), player)) {
|
if (!profile.getAbilityMode(ability) && cooldownOver(profile.getSkillDATS(ability), ability.getCooldown(), player)) {
|
||||||
int ticks = PerksUtils.handleActivationPerks(player, 2 + (profile.getSkillLevel(type) / abilityLengthIncreaseLevel), ability.getMaxTicks());
|
int ticks = PerksUtils.handleActivationPerks(player, 2 + (profile.getSkillLevel(type) / abilityLengthIncreaseLevel), ability.getMaxTicks());
|
||||||
|
|
||||||
player.playEffect(player.getEyeLocation(), Effect.POTION_BREAK, new Potion(PotionType.POISON));
|
Location location = player.getLocation();
|
||||||
|
location.setY(location.getY() - 2.0);
|
||||||
|
location.setPitch(-90);
|
||||||
|
|
||||||
|
Firework firework = (Firework) player.getWorld().spawnEntity(location, EntityType.FIREWORK);
|
||||||
|
FireworkMeta fireworkMeta = firework.getFireworkMeta();
|
||||||
|
FireworkEffect effect = FireworkEffect.builder().flicker(false).withColor(Color.GREEN). with(Type.BALL_LARGE).trail(true).build();
|
||||||
|
fireworkMeta.addEffect(effect);
|
||||||
|
fireworkMeta.addEffect(effect);
|
||||||
|
fireworkMeta.setPower(0);
|
||||||
|
firework.setFireworkMeta(fireworkMeta);
|
||||||
|
|
||||||
if (profile.useChatNotifications()) {
|
if (profile.useChatNotifications()) {
|
||||||
player.sendMessage(ability.getAbilityOn());
|
player.sendMessage(ability.getAbilityOn());
|
||||||
|
Loading…
Reference in New Issue
Block a user