diff --git a/src/com/projectkorra/ProjectKorra/Methods.java b/src/com/projectkorra/ProjectKorra/Methods.java index c3a4c3e5..c8a559e3 100644 --- a/src/com/projectkorra/ProjectKorra/Methods.java +++ b/src/com/projectkorra/ProjectKorra/Methods.java @@ -65,6 +65,7 @@ import com.palmergames.bukkit.towny.war.flagwar.TownyWarConfig; import com.projectkorra.ProjectKorra.Ability.AbilityModule; import com.projectkorra.ProjectKorra.Ability.AbilityModuleManager; import com.projectkorra.ProjectKorra.Ability.AvatarState; +import com.projectkorra.ProjectKorra.Utilities.ParticleEffect; import com.projectkorra.ProjectKorra.airbending.AirBlast; import com.projectkorra.ProjectKorra.airbending.AirBubble; import com.projectkorra.ProjectKorra.airbending.AirBurst; @@ -1112,6 +1113,12 @@ public class Methods { if (isNight(world)) return plugin.getConfig().getDouble("Properties.Water.NightFactor"); return 1; } + + public static void playAirbendingParticles(Location loc) { + for (int i = 0; i < 30; i++) { + ParticleEffect.SPELL.display(loc, (float) Math.random(), (float) Math.random(), (float) Math.random(), 0, 1); + } + } public static boolean isNight(World world) { if (world.getEnvironment() == Environment.NETHER || world.getEnvironment() == Environment.THE_END) { diff --git a/src/com/projectkorra/ProjectKorra/TagAPIListener.java b/src/com/projectkorra/ProjectKorra/TagAPIListener.java index 25180d4f..19ee5ba3 100644 --- a/src/com/projectkorra/ProjectKorra/TagAPIListener.java +++ b/src/com/projectkorra/ProjectKorra/TagAPIListener.java @@ -3,6 +3,7 @@ package com.projectkorra.ProjectKorra; import java.util.List; import org.bukkit.ChatColor; +import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.kitteh.tag.AsyncPlayerReceiveNameTagEvent; @@ -14,6 +15,7 @@ public class TagAPIListener implements Listener { this.plugin = plugin; } + @EventHandler public void onNameTag(AsyncPlayerReceiveNameTagEvent e) { List elements = Methods.getBendingPlayer(e.getNamedPlayer().getName()).getElements(); if (elements.size() > 1) diff --git a/src/com/projectkorra/ProjectKorra/airbending/AirBurst.java b/src/com/projectkorra/ProjectKorra/airbending/AirBurst.java index a63f28eb..d56e36c3 100644 --- a/src/com/projectkorra/ProjectKorra/airbending/AirBurst.java +++ b/src/com/projectkorra/ProjectKorra/airbending/AirBurst.java @@ -179,11 +179,12 @@ public class AirBurst { } else if (charged) { Location location = player.getEyeLocation(); // location = location.add(location.getDirection().normalize()); - location.getWorld().playEffect( - location, - Effect.SMOKE, - Methods.getIntCardinalDirection(player.getEyeLocation() - .getDirection()), 3); + Methods.playAirbendingParticles(location); +// location.getWorld().playEffect( +// location, +// Effect.SMOKE, +// Methods.getIntCardinalDirection(player.getEyeLocation() +// .getDirection()), 3); } } diff --git a/src/com/projectkorra/ProjectKorra/airbending/AirScooter.java b/src/com/projectkorra/ProjectKorra/airbending/AirScooter.java index d4d34620..3cad18c1 100644 --- a/src/com/projectkorra/ProjectKorra/airbending/AirScooter.java +++ b/src/com/projectkorra/ProjectKorra/airbending/AirScooter.java @@ -130,8 +130,9 @@ public class AirScooter { double x = Math.cos(Math.toRadians(angles.get(i))) * scooterradius; double y = ((double) i) / 2 * scooterradius - scooterradius; double z = Math.sin(Math.toRadians(angles.get(i))) * scooterradius; - player.getWorld().playEffect(origin.clone().add(x, y, z), - Effect.SMOKE, 4, (int) AirBlast.defaultrange); + Methods.playAirbendingParticles(origin.clone().add(x, y, z)); +// player.getWorld().playEffect(origin.clone().add(x, y, z), +// Effect.SMOKE, 4, (int) AirBlast.defaultrange); } for (int i = 0; i < 5; i++) { angles.set(i, angles.get(i) + 10); diff --git a/src/com/projectkorra/ProjectKorra/airbending/AirShield.java b/src/com/projectkorra/ProjectKorra/airbending/AirShield.java index 9b6d70f6..30ada07d 100644 --- a/src/com/projectkorra/ProjectKorra/airbending/AirShield.java +++ b/src/com/projectkorra/ProjectKorra/airbending/AirShield.java @@ -105,8 +105,9 @@ public class AirShield { Location effect = new Location(origin.getWorld(), x, y, z); if (!Methods.isRegionProtectedFromBuild(player, "AirShield", effect)) - origin.getWorld().playEffect(effect, Effect.SMOKE, 4, - (int) AirBlast.defaultrange); + Methods.playAirbendingParticles(effect); +// origin.getWorld().playEffect(effect, Effect.SMOKE, 4, +// (int) AirBlast.defaultrange); angles.put(i, angles.get(i) + (int) (10 * speedfactor)); } diff --git a/src/com/projectkorra/ProjectKorra/airbending/AirSpout.java b/src/com/projectkorra/ProjectKorra/airbending/AirSpout.java index 7d177d94..f6afc8ea 100644 --- a/src/com/projectkorra/ProjectKorra/airbending/AirSpout.java +++ b/src/com/projectkorra/ProjectKorra/airbending/AirSpout.java @@ -131,8 +131,9 @@ public class AirSpout { Location effectloc2 = new Location(location.getWorld(), location.getX(), block.getY() + i, location.getZ()); - location.getWorld().playEffect(effectloc2, Effect.SMOKE, - (int) directions[index], (int) height + 5); + Methods.playAirbendingParticles(effectloc2); +// location.getWorld().playEffect(effectloc2, Effect.SMOKE, +// (int) directions[index], (int) height + 5); // Methods.verbose(directions[index]); diff --git a/src/com/projectkorra/ProjectKorra/airbending/AirSuction.java b/src/com/projectkorra/ProjectKorra/airbending/AirSuction.java index 27e06956..dc01c0f1 100644 --- a/src/com/projectkorra/ProjectKorra/airbending/AirSuction.java +++ b/src/com/projectkorra/ProjectKorra/airbending/AirSuction.java @@ -268,8 +268,9 @@ public class AirSuction { } private void advanceLocation() { - location.getWorld().playEffect(location, Effect.SMOKE, 4, - (int) AirBlast.defaultrange); + Methods.playAirbendingParticles(location); +// location.getWorld().playEffect(location, Effect.SMOKE, 4, +// (int) AirBlast.defaultrange); location = location.add(direction.clone().multiply(speedfactor)); } @@ -304,9 +305,11 @@ public class AirSuction { origins.remove(player); return; } - - origin.getWorld().playEffect(origin, Effect.SMOKE, 4, - (int) originselectrange); + + Methods.playAirbendingParticles(origin); +// +// origin.getWorld().playEffect(origin, Effect.SMOKE, 4, +// (int) originselectrange); } public static String getDescription() { diff --git a/src/com/projectkorra/ProjectKorra/airbending/AirSwipe.java b/src/com/projectkorra/ProjectKorra/airbending/AirSwipe.java index c0b454ff..3f5e73b3 100644 --- a/src/com/projectkorra/ProjectKorra/airbending/AirSwipe.java +++ b/src/com/projectkorra/ProjectKorra/airbending/AirSwipe.java @@ -163,10 +163,11 @@ public class AirSwipe { pushfactor *= factor; return true; } else if (System.currentTimeMillis() >= time + maxchargetime) { - player.getWorld().playEffect( - player.getEyeLocation(), - Effect.SMOKE, - Methods.getIntCardinalDirection(player.getEyeLocation().getDirection()), 3); + Methods.playAirbendingParticles(player.getEyeLocation()); +// player.getWorld().playEffect( +// player.getEyeLocation(), +// Effect.SMOKE, +// Methods.getIntCardinalDirection(player.getEyeLocation().getDirection()), 3); } } return true; @@ -219,8 +220,9 @@ public class AirSwipe { } } } else { - location.getWorld().playEffect(location, Effect.SMOKE, - 4, (int) AirBlast.defaultrange); + Methods.playAirbendingParticles(location); +// location.getWorld().playEffect(location, Effect.SMOKE, +// 4, (int) AirBlast.defaultrange); affectPeople(location, direction); } } diff --git a/src/com/projectkorra/ProjectKorra/airbending/Tornado.java b/src/com/projectkorra/ProjectKorra/airbending/Tornado.java index 2f3dd801..ffa19a0e 100644 --- a/src/com/projectkorra/ProjectKorra/airbending/Tornado.java +++ b/src/com/projectkorra/ProjectKorra/airbending/Tornado.java @@ -173,7 +173,8 @@ public class Tornado { Location effect = new Location(origin.getWorld(), x, y, z); if (!Methods.isRegionProtectedFromBuild(player, "AirBlast", effect)) - origin.getWorld().playEffect(effect, Effect.SMOKE, 4, (int) AirBlast.defaultrange); + Methods.playAirbendingParticles(effect); +// origin.getWorld().playEffect(effect, Effect.SMOKE, 4, (int) AirBlast.defaultrange); angles.put(i, angles.get(i) + 25 * (int) speedfactor); }