diff --git a/src/net/peacefulcraft/trenchpvp/gameclasses/abilities/DoubleJump.java b/src/net/peacefulcraft/trenchpvp/gameclasses/abilities/DoubleJump.java index 4eec13d..fd08216 100644 --- a/src/net/peacefulcraft/trenchpvp/gameclasses/abilities/DoubleJump.java +++ b/src/net/peacefulcraft/trenchpvp/gameclasses/abilities/DoubleJump.java @@ -58,33 +58,27 @@ public void triggerAbility(Event ev) { if(ev instanceof PlayerToggleFlightEvent) { ((PlayerToggleFlightEvent) ev).getPlayer().setFlying(false); ((PlayerToggleFlightEvent) ev).setCancelled(true); + System.out.println("Canceling double jump."); } //Double jump logic if(canDoubleJump && ev instanceof PlayerToggleFlightEvent) { + System.out.println("Vector 1"); Player p = ((PlayerToggleFlightEvent)ev).getPlayer(); Block b = p.getWorld().getBlockAt(p.getLocation().subtract(0,2,0)); - //Check that the user is actually jumping - if(!b.getType().equals(Material.AIR)){ - - //"Boost" their movement vector to simulate a double jump - Vector v = new Vector(p.getVelocity().getX(), p.getVelocity().getY(), p.getVelocity().getZ()); - Vector forward = p.getLocation().getDirection().multiply(0.3); - Vector jump = p.getLocation().getDirection().multiply(0.05).setY(1); - v.add(forward).add(jump); - p.setVelocity(v); - - //Disable flight / jump until they touch the ground. - canDoubleJump = false; - p.setAllowFlight(false); - - } + System.out.println("Vector 2"); + //"Boost" their movement vector to simulate a double jump + Vector v = new Vector(p.getVelocity().getX(), p.getVelocity().getY(), p.getVelocity().getZ()); + Vector forward = p.getLocation().getDirection().multiply(0.3); + Vector jump = p.getLocation().getDirection().multiply(0.05).setY(1); + v.add(forward).add(jump); + p.setVelocity(v); + + //Disable flight / jump until they touch the ground. + canDoubleJump = false; + p.setAllowFlight(false); return; - } - + } } - - - -} +} \ No newline at end of file diff --git a/src/net/peacefulcraft/trenchpvp/gameclasses/abilities/HiddenBlade.java b/src/net/peacefulcraft/trenchpvp/gameclasses/abilities/HiddenBlade.java index 5d5f9fe..b1640cb 100644 --- a/src/net/peacefulcraft/trenchpvp/gameclasses/abilities/HiddenBlade.java +++ b/src/net/peacefulcraft/trenchpvp/gameclasses/abilities/HiddenBlade.java @@ -15,7 +15,8 @@ public class HiddenBlade extends TrenchAbility{ - private final int EFFECT_TIME = 140; + private final int EFFECT_TIME = 160; + private final int BUFF_TIME = 100; public HiddenBlade(TrenchKit k) { super(k.getTrenchPlayer(), 16000, "Hidden Blade"); @@ -56,7 +57,7 @@ public void triggerAbility(Event ev) { Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(TrenchPvP.getPluginInstance(), new Runnable() { public void run() { - p.addPotionEffect(new PotionEffect(PotionEffectType.INCREASE_DAMAGE, EFFECT_TIME, 3)); + p.addPotionEffect(new PotionEffect(PotionEffectType.INCREASE_DAMAGE, BUFF_TIME, 3)); } }, EFFECT_TIME); diff --git a/src/net/peacefulcraft/trenchpvp/gameclasses/abilities/LaunchPad.java b/src/net/peacefulcraft/trenchpvp/gameclasses/abilities/LaunchPad.java index a07ce66..6cadeea 100644 --- a/src/net/peacefulcraft/trenchpvp/gameclasses/abilities/LaunchPad.java +++ b/src/net/peacefulcraft/trenchpvp/gameclasses/abilities/LaunchPad.java @@ -63,11 +63,13 @@ public void triggerAbility(Event ev) Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(TrenchPvP.getPluginInstance(), new Runnable() { public void run() { + // Remove launch pad + padLoc.getBlock().setType(Material.AIR); + + // Check if we should give the launch pad back to the player. TrenchPlayer t = TeamManager.findTrenchPlayer(p); - if(!(t.getKitType() == TrenchKits.ADRENALINE_JUNKIE)) {return;} - - padLoc.getBlock().setType(Material.AIR); - p.getInventory().setItem(itemIndex, pad); + if(!(t.getKitType() == TrenchKits.ADRENALINE_JUNKIE)) {return;} + p.getInventory().setItem(itemIndex, pad); } }, 300); } diff --git a/src/net/peacefulcraft/trenchpvp/gameclasses/classConfigurations/TrenchDemoman.java b/src/net/peacefulcraft/trenchpvp/gameclasses/classConfigurations/TrenchDemoman.java index 8bdb317..13b26aa 100644 --- a/src/net/peacefulcraft/trenchpvp/gameclasses/classConfigurations/TrenchDemoman.java +++ b/src/net/peacefulcraft/trenchpvp/gameclasses/classConfigurations/TrenchDemoman.java @@ -86,7 +86,7 @@ public void equipItems() { * Melee Weapon */ - ItemStack melee = new ItemStack(Material.IRON_AXE, 1); + ItemStack melee = new ItemStack(Material.STONE_AXE, 1); ItemMeta meleeMeta = melee.getItemMeta(); meleeMeta.setDisplayName(MELEE_NAME);