Air Particles are now White + TagAPI Fix

This commit is contained in:
MistPhizzle 2014-07-22 21:18:37 -04:00
parent cf93334386
commit e9c334453e
9 changed files with 42 additions and 23 deletions

View file

@ -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) {

View file

@ -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<Element> elements = Methods.getBendingPlayer(e.getNamedPlayer().getName()).getElements();
if (elements.size() > 1)

View file

@ -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);
}
}

View file

@ -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);

View file

@ -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));
}

View file

@ -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]);

View file

@ -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() {

View file

@ -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);
}
}

View file

@ -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);
}