From 01f0e5fab49c1ae0a85944563019f49181339dd8 Mon Sep 17 00:00:00 2001 From: Chiss Date: Sun, 23 Nov 2014 10:35:56 +1100 Subject: [PATCH 1/3] fixed static laser not doing less dmg when not charged --- .../minecraft/game/classcombat/Skill/Mage/StaticLazer.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/StaticLazer.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/StaticLazer.java index e43624dc0..10e364d40 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/StaticLazer.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/StaticLazer.java @@ -28,8 +28,6 @@ import org.bukkit.event.entity.EntityDamageEvent.DamageCause; public class StaticLazer extends SkillChargeSword { - private NautHashMap _chargeStore = new NautHashMap(); - public StaticLazer(SkillFactory skills, String name, ClassType classType, SkillType skillType, int cost, int maxLevel) @@ -107,7 +105,7 @@ public class StaticLazer extends SkillChargeSword //Damage Event Factory.Damage().NewDamageEvent(other, player, null, - DamageCause.CUSTOM, 2 + (5 + level) * hit.get(other), true, true, false, + DamageCause.CUSTOM, (2 + (5 + level) * hit.get(other)) * charge, true, true, false, player.getName(), GetName()); } @@ -117,8 +115,6 @@ public class StaticLazer extends SkillChargeSword //Effect player.getWorld().playSound(player.getEyeLocation(), Sound.ZOMBIE_REMEDY, 0.5f + player.getExp(), 1.75f - charge); - - _chargeStore.put(player, charge); } @EventHandler(priority = EventPriority.NORMAL) From f0c87e439a658dbd7fe1af6887f0c4862616dd18 Mon Sep 17 00:00:00 2001 From: Chiss Date: Sun, 23 Nov 2014 11:16:01 +1100 Subject: [PATCH 2/3] fixed nametag color in paintball --- .../nautilus/game/arcade/game/games/paintball/Paintball.java | 2 +- .../nautilus/game/arcade/game/games/paintball/PlayerCopy.java | 4 ++-- .../nautilus/game/arcade/game/games/wither/WitherGame.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/paintball/Paintball.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/paintball/Paintball.java index 86cc17306..90e5dd9ad 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/paintball/Paintball.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/paintball/Paintball.java @@ -333,7 +333,7 @@ public class Paintball extends TeamGame player.setVelocity(new Vector(0,1.2,0)); - _doubles.put(player, new PlayerCopy(this, player)); + _doubles.put(player, new PlayerCopy(this, player, GetTeam(player).GetColor())); } // @EventHandler diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/paintball/PlayerCopy.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/paintball/PlayerCopy.java index cd3b822ca..b072dea9a 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/paintball/PlayerCopy.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/paintball/PlayerCopy.java @@ -19,7 +19,7 @@ public class PlayerCopy private Skeleton _ent; private Player _owner; - public PlayerCopy(Game host, Player owner) + public PlayerCopy(Game host, Player owner, ChatColor nameColor) { Host = host; @@ -36,7 +36,7 @@ public class PlayerCopy //Armor _ent.getEquipment().setArmorContents(owner.getInventory().getArmorContents()); - _ent.setCustomName(C.cWhite + C.Bold + C.Scramble + "XX" + ChatColor.RESET + " " + C.cYellow + owner.getName() + " " + C.cWhite + C.Bold + C.Scramble + "XX"); + _ent.setCustomName(C.cWhite + C.Bold + C.Scramble + "XX" + ChatColor.RESET + " " + nameColor + owner.getName() + " " + C.cWhite + C.Bold + C.Scramble + "XX"); _ent.setCustomNameVisible(true); //Disguise diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/wither/WitherGame.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/wither/WitherGame.java index 4fd00205b..038033d3d 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/wither/WitherGame.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/wither/WitherGame.java @@ -540,7 +540,7 @@ public class WitherGame extends TeamGame implements IBlockRestorer player.setVelocity(new Vector(0,1.2,0)); - _doubles.put(player, new PlayerCopy(this, player)); + _doubles.put(player, new PlayerCopy(this, player, ChatColor.YELLOW)); } public void playerIn(final Player player, final LivingEntity copy) From 0e4b21e6b14c9f2015b12ea254075619131a1b51 Mon Sep 17 00:00:00 2001 From: Chiss Date: Sun, 23 Nov 2014 11:46:47 +1100 Subject: [PATCH 3/3] disabled charge skills being usable in hub --- .../game/classcombat/Skill/SkillChargeSword.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/SkillChargeSword.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/SkillChargeSword.java index e7857556a..0e9ccaccd 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/SkillChargeSword.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/SkillChargeSword.java @@ -5,7 +5,9 @@ import mineplex.core.recharge.Recharge; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType; +import mineplex.minecraft.game.classcombat.Skill.event.SkillTriggerEvent; +import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -58,6 +60,13 @@ public abstract class SkillChargeSword extends SkillCharge implements Listener if (!_canChargeInWater && cur.getLocation().getBlock().isLiquid()) continue; + //Check Allowed + SkillTriggerEvent triggerEvent = new SkillTriggerEvent(cur, GetName(), GetClassType()); + Bukkit.getServer().getPluginManager().callEvent(triggerEvent); + + if (triggerEvent.IsCancelled()) + continue; + //Recharged Check (uses recharge upon activation) if (!_charge.containsKey(cur)) if (!Recharge.Instance.usable(cur, GetName()))