From 9c8c9c174126780f14092bdea6cff56e51bd5f09 Mon Sep 17 00:00:00 2001 From: jedk1 Date: Tue, 9 Feb 2016 15:22:15 +0000 Subject: [PATCH 1/5] Update ComboManager to new ClickTypes --- .../projectkorra/projectkorra/ability/util/ComboManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/projectkorra/projectkorra/ability/util/ComboManager.java b/src/com/projectkorra/projectkorra/ability/util/ComboManager.java index 806b4fd3..4389fc78 100644 --- a/src/com/projectkorra/projectkorra/ability/util/ComboManager.java +++ b/src/com/projectkorra/projectkorra/ability/util/ComboManager.java @@ -75,8 +75,8 @@ public class ComboManager { ArrayList fireWheel = new ArrayList<>(); fireWheel.add(new AbilityInformation("FireShield", ClickType.SHIFT_DOWN)); - fireWheel.add(new AbilityInformation("FireShield", ClickType.RIGHT_CLICK)); - fireWheel.add(new AbilityInformation("FireShield", ClickType.RIGHT_CLICK)); + fireWheel.add(new AbilityInformation("FireShield", ClickType.RIGHT_CLICK_BLOCK)); + fireWheel.add(new AbilityInformation("FireShield", ClickType.RIGHT_CLICK_BLOCK)); fireWheel.add(new AbilityInformation("Blaze", ClickType.SHIFT_UP)); COMBO_ABILITIES.put("FireWheel", new ComboAbilityInfo("FireWheel", fireWheel, FireCombo.class)); DESCRIPTIONS.put("FireWheel", "A high-speed wheel of fire that travels along the ground for long distances dealing high damage."); From 2cb24ac3ad83e8df163dfffb2d87cbe961894616 Mon Sep 17 00:00:00 2001 From: jedk1 Date: Tue, 9 Feb 2016 17:00:16 +0000 Subject: [PATCH 2/5] Fix NPE in IceSpike --- .../projectkorra/projectkorra/waterbending/IceSpikeBlast.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/projectkorra/projectkorra/waterbending/IceSpikeBlast.java b/src/com/projectkorra/projectkorra/waterbending/IceSpikeBlast.java index 8f9d3c30..6bce84f7 100644 --- a/src/com/projectkorra/projectkorra/waterbending/IceSpikeBlast.java +++ b/src/com/projectkorra/projectkorra/waterbending/IceSpikeBlast.java @@ -216,7 +216,9 @@ public class IceSpikeBlast extends IceAbility { progressing = false; } originalSource.revertBlock(); - bPlayer.addCooldown("IceSpikeBlast", cooldown); + if (player != null && player.isOnline()) { + bPlayer.addCooldown("IceSpikeBlast", cooldown); + } } private void returnWater() { From 497e464cc8e0e7059967e0400cc862800d9b3efd Mon Sep 17 00:00:00 2001 From: jedk1 Date: Tue, 9 Feb 2016 17:15:17 +0000 Subject: [PATCH 3/5] Update to commit 373 Remove unused variables Update to commit 373 --- .../projectkorra/projectkorra/ability/EarthAbility.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/com/projectkorra/projectkorra/ability/EarthAbility.java b/src/com/projectkorra/projectkorra/ability/EarthAbility.java index e027fac6..fc1052f0 100644 --- a/src/com/projectkorra/projectkorra/ability/EarthAbility.java +++ b/src/com/projectkorra/projectkorra/ability/EarthAbility.java @@ -23,7 +23,6 @@ import org.bukkit.entity.Entity; import org.bukkit.entity.FallingBlock; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; -import org.bukkit.inventory.ItemStack; import org.bukkit.util.Vector; import java.util.ArrayList; @@ -36,7 +35,7 @@ public abstract class EarthAbility extends ElementalAbility { private static final ConcurrentHashMap MOVED_EARTH = new ConcurrentHashMap(); private static final ConcurrentHashMap TEMP_AIR_LOCATIONS = new ConcurrentHashMap(); private static final ArrayList PREVENT_PHYSICS = new ArrayList(); - private static final ItemStack DIAMOND_PICKAXE = new ItemStack(Material.DIAMOND_PICKAXE); + //private static final ItemStack DIAMOND_PICKAXE = new ItemStack(Material.DIAMOND_PICKAXE); public EarthAbility(Player player) { super(player); @@ -563,8 +562,8 @@ public abstract class EarthAbility extends ElementalAbility { if (sourceblock.getType() == Material.AIR || sourceblock.isLiquid()) { info.getState().update(true); } else { - GeneralMethods.dropItems(block, - GeneralMethods.getDrops(block, info.getState().getType(), info.getState().getRawData(), DIAMOND_PICKAXE)); + //GeneralMethods.dropItems(block, + // GeneralMethods.getDrops(block, info.getState().getType(), info.getState().getRawData(), DIAMOND_PICKAXE)); } if (GeneralMethods.isAdjacentToThreeOrMoreSources(block)) { From 31177b4d98ba8f8eac7271fa1395877982c9ee4b Mon Sep 17 00:00:00 2001 From: jedk1 Date: Tue, 9 Feb 2016 19:27:24 +0000 Subject: [PATCH 4/5] Fix WaterBubble not working --- .../projectkorra/projectkorra/airbending/AirBubble.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/com/projectkorra/projectkorra/airbending/AirBubble.java b/src/com/projectkorra/projectkorra/airbending/AirBubble.java index 8313ea80..8f24d3ed 100644 --- a/src/com/projectkorra/projectkorra/airbending/AirBubble.java +++ b/src/com/projectkorra/projectkorra/airbending/AirBubble.java @@ -73,7 +73,13 @@ public class AirBubble extends AirAbility { @Override public void progress() { - if (!player.isSneaking() || !bPlayer.canBend(this)) { + if (!player.isSneaking()) { + remove(); + return; + } else if (!waterBubble && !bPlayer.canBend(this)) { + remove(); + return; + } else if (waterBubble && !bPlayer.canBend(getAbility("WaterBubble"))) { remove(); return; } else { From 6f0545722994a6052f8e5b49ff38de07b0c5dd33 Mon Sep 17 00:00:00 2001 From: jedk1 Date: Tue, 9 Feb 2016 19:38:06 +0000 Subject: [PATCH 5/5] Fix Event NPE in Remove command --- src/com/projectkorra/projectkorra/command/RemoveCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/projectkorra/projectkorra/command/RemoveCommand.java b/src/com/projectkorra/projectkorra/command/RemoveCommand.java index 4e3ef7fe..0fcfa0e0 100644 --- a/src/com/projectkorra/projectkorra/command/RemoveCommand.java +++ b/src/com/projectkorra/projectkorra/command/RemoveCommand.java @@ -45,7 +45,7 @@ public class RemoveCommand extends PKCommand { return; } sender.sendMessage(e.getColor() + "You have removed your " + e.toString().toLowerCase() + "bending."); - Bukkit.getServer().getPluginManager().callEvent(new PlayerChangeElementEvent(sender, player, e, Result.REMOVE)); + Bukkit.getServer().getPluginManager().callEvent(new PlayerChangeElementEvent(sender, (Player) sender, e, Result.REMOVE)); return; } else { sender.sendMessage(ChatColor.RED + "You do not have that element!");