Merge pull request #193 from jedk1/master

Fixed FlightAbility fly glitch.
This commit is contained in:
MistPhizzle 2015-08-04 12:56:00 -04:00
commit f2c9cb69c1
3 changed files with 4 additions and 2 deletions

View file

@ -732,7 +732,7 @@ public class PKListener implements Listener {
Player targetplayer = (Player) e.getEntity();
if (GeneralMethods.canBendPassive(sourceplayer.getName(), Element.Chi)) {
if (GeneralMethods.isBender(sourceplayer.getName(), Element.Chi) && e.getCause() == DamageCause.ENTITY_ATTACK && e.getDamage() == 1) {
if (ChiMethods.isChiAbility(GeneralMethods.getBoundAbility(sourceplayer)) {
if (ChiMethods.isChiAbility(GeneralMethods.getBoundAbility(sourceplayer))) {
if (GeneralMethods.isWeapon(sourceplayer.getItemInHand().getType()) && !plugin.getConfig().getBoolean("Properties.Chi.CanBendWithWeapons")) {
return;
}

View file

@ -19,6 +19,8 @@ public class FlightAbility extends CoreAbility {
public FlightAbility(Player player) {
if (!AirMethods.canFly(player, true, false))
return;
if (flight == null)
flight = new Flight(player);
player.setAllowFlight(true);
player.setVelocity(player.getEyeLocation().getDirection().normalize());
this.player = player;

View file

@ -491,7 +491,7 @@ public class ConfigManager {
config.addDefault("Abilities.Earth.EarthBlast.Range", 20);
config.addDefault("Abilities.Earth.EarthBlast.Speed", 35);
config.addDefault("Abilities.Earth.EarthBlast.Revert", true);
config.addDefault("Abilities.Earth.Earthblast.Damage", 3);
config.addDefault("Abilities.Earth.EarthBlast.Damage", 3);
config.addDefault("Abilities.Earth.EarthBlast.Push", 0.3);
config.addDefault("Abilities.Earth.EarthGrab.Enabled", true);