Skip to content

Commit 2e227a6

Browse files
authored
Merge pull request #144 from peacefulcraft-network/feat/march_fixes
Feat/march fixes
2 parents 1bdb56c + f24a565 commit 2e227a6

File tree

4 files changed

+25
-28
lines changed

4 files changed

+25
-28
lines changed

src/net/peacefulcraft/trenchpvp/gameclasses/abilities/DoubleJump.java

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -58,33 +58,27 @@ public void triggerAbility(Event ev) {
5858
if(ev instanceof PlayerToggleFlightEvent) {
5959
((PlayerToggleFlightEvent) ev).getPlayer().setFlying(false);
6060
((PlayerToggleFlightEvent) ev).setCancelled(true);
61+
System.out.println("Canceling double jump.");
6162
}
6263

6364
//Double jump logic
6465
if(canDoubleJump && ev instanceof PlayerToggleFlightEvent) {
66+
System.out.println("Vector 1");
6567
Player p = ((PlayerToggleFlightEvent)ev).getPlayer();
6668
Block b = p.getWorld().getBlockAt(p.getLocation().subtract(0,2,0));
6769

68-
//Check that the user is actually jumping
69-
if(!b.getType().equals(Material.AIR)){
70-
71-
//"Boost" their movement vector to simulate a double jump
72-
Vector v = new Vector(p.getVelocity().getX(), p.getVelocity().getY(), p.getVelocity().getZ());
73-
Vector forward = p.getLocation().getDirection().multiply(0.3);
74-
Vector jump = p.getLocation().getDirection().multiply(0.05).setY(1);
75-
v.add(forward).add(jump);
76-
p.setVelocity(v);
77-
78-
//Disable flight / jump until they touch the ground.
79-
canDoubleJump = false;
80-
p.setAllowFlight(false);
81-
82-
}
70+
System.out.println("Vector 2");
71+
//"Boost" their movement vector to simulate a double jump
72+
Vector v = new Vector(p.getVelocity().getX(), p.getVelocity().getY(), p.getVelocity().getZ());
73+
Vector forward = p.getLocation().getDirection().multiply(0.3);
74+
Vector jump = p.getLocation().getDirection().multiply(0.05).setY(1);
75+
v.add(forward).add(jump);
76+
p.setVelocity(v);
77+
78+
//Disable flight / jump until they touch the ground.
79+
canDoubleJump = false;
80+
p.setAllowFlight(false);
8381
return;
84-
}
85-
82+
}
8683
}
87-
88-
89-
90-
}
84+
}

src/net/peacefulcraft/trenchpvp/gameclasses/abilities/HiddenBlade.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515

1616
public class HiddenBlade extends TrenchAbility{
1717

18-
private final int EFFECT_TIME = 140;
18+
private final int EFFECT_TIME = 160;
19+
private final int BUFF_TIME = 100;
1920

2021
public HiddenBlade(TrenchKit k) {
2122
super(k.getTrenchPlayer(), 16000, "Hidden Blade");
@@ -56,7 +57,7 @@ public void triggerAbility(Event ev) {
5657

5758
Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(TrenchPvP.getPluginInstance(), new Runnable() {
5859
public void run() {
59-
p.addPotionEffect(new PotionEffect(PotionEffectType.INCREASE_DAMAGE, EFFECT_TIME, 3));
60+
p.addPotionEffect(new PotionEffect(PotionEffectType.INCREASE_DAMAGE, BUFF_TIME, 3));
6061
}
6162
}, EFFECT_TIME);
6263

src/net/peacefulcraft/trenchpvp/gameclasses/abilities/LaunchPad.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,13 @@ public void triggerAbility(Event ev)
6363

6464
Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(TrenchPvP.getPluginInstance(), new Runnable() {
6565
public void run() {
66+
// Remove launch pad
67+
padLoc.getBlock().setType(Material.AIR);
68+
69+
// Check if we should give the launch pad back to the player.
6670
TrenchPlayer t = TeamManager.findTrenchPlayer(p);
67-
if(!(t.getKitType() == TrenchKits.ADRENALINE_JUNKIE)) {return;}
68-
69-
padLoc.getBlock().setType(Material.AIR);
70-
p.getInventory().setItem(itemIndex, pad);
71+
if(!(t.getKitType() == TrenchKits.ADRENALINE_JUNKIE)) {return;}
72+
p.getInventory().setItem(itemIndex, pad);
7173
}
7274
}, 300);
7375
}

src/net/peacefulcraft/trenchpvp/gameclasses/classConfigurations/TrenchDemoman.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public void equipItems() {
8686
* Melee Weapon
8787
*/
8888

89-
ItemStack melee = new ItemStack(Material.IRON_AXE, 1);
89+
ItemStack melee = new ItemStack(Material.STONE_AXE, 1);
9090
ItemMeta meleeMeta = melee.getItemMeta();
9191
meleeMeta.setDisplayName(MELEE_NAME);
9292

0 commit comments

Comments
 (0)