diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Flash.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Flash.java index 52ecc9089..04102b8c1 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Flash.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Flash.java @@ -95,7 +95,7 @@ public class Flash extends SkillActive int charges = _flash.get(cur); int level = getLevel(cur); - if (charges >= 1 + level) + if (charges >= 2 + level) continue; if (!mineplex.core.recharge.Recharge.Instance.use(cur, "Flash Recharge", 9000 - (1000 * level), false, false)) diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/SmokeArrow.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/SmokeArrow.java index ffc925437..6497a305d 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/SmokeArrow.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/SmokeArrow.java @@ -139,7 +139,7 @@ public class SmokeArrow extends SkillActive event.AddMod(damager.getName(), GetName(), 0, true); //Effect - UtilParticle.PlayParticle(ParticleType.HUGE_EXPLOSION, projectile.getLocation(), 0, 0, 0, 0, 1); + UtilParticle.PlayParticle(ParticleType.LARGE_EXPLODE, projectile.getLocation(), 0, 0, 0, 0, 1); } @EventHandler diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Stealth.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Stealth.java index d80a0388d..e4cc4ba99 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Stealth.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Stealth.java @@ -44,14 +44,14 @@ public class Stealth extends Skill "Invisible, but also Slow #4#-1.", "", "Stealth ends if you an enemy comes", - "within #8#-2 Blocks of you, or you attack.", + "within #10#-2 Blocks of you, or you attack.", }); } @Override public String GetEnergyString() { - return "Energy: 8 per Second"; + return "Energy: #13#1 per Second"; } @EventHandler @@ -81,7 +81,7 @@ public class Stealth extends Skill return; } - if (!UtilTime.elapsed(Factory.Combat().Get(player).LastCombat, 4000)) + if (!UtilTime.elapsed(Factory.Combat().Get(player).GetLastCombat(), 4000)) { UtilPlayer.message(player, F.main(GetClassType().name(), "You cannot use " + F.skill(GetName()) + " while in Combat.")); return; @@ -222,7 +222,7 @@ public class Stealth extends Skill continue; } - if (!Factory.Energy().Use(cur, GetName(), 0.4, true, false)) + if (!Factory.Energy().Use(cur, GetName(), 0.9 - (0.1 * getLevel(cur)), true, false)) { Remove(cur, null); continue; diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/ViperStrikes.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/ViperStrikes.java index a4711ac1d..70a64eea1 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/ViperStrikes.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/ViperStrikes.java @@ -22,7 +22,7 @@ public class ViperStrikes extends Skill SetDesc(new String[] { "Your attacks give enemies", - "Poison 1 for #0#2 seconds,", + "Poison 1 for #1#2 seconds,", "but deal #1#1 less damage." }); } @@ -49,7 +49,7 @@ public class ViperStrikes extends Skill if (damagee == null) return; //Confuse - Factory.Condition().Factory().Poison(GetName(), damagee, damager, 0 + 2*level, 0, false, false, false); + Factory.Condition().Factory().Poison(GetName(), damagee, damager, 1 + 2*level, 0, false, false, false); //Damage event.AddMod(damager.getName(), GetName(), -1 - level, true); diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/BlockToss.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/BlockToss.java index 7b6a3f926..f2dda28c7 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/BlockToss.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/BlockToss.java @@ -210,7 +210,7 @@ public class BlockToss extends SkillCharge implements IThrown Player damager = event.GetDamagerPlayer(true); if (damager == null) return; - if (event.GetReason() != null && !event.GetReason().equals(GetName())) + if (event.GetReason() == null || !event.GetReason().equals(GetName())) return; event.AddKnockback(GetName(), 1.5d); diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/SeismicSlam.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/SeismicSlam.java index 36d1f0d4b..cf9991f5c 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/SeismicSlam.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/SeismicSlam.java @@ -108,15 +108,12 @@ public class SeismicSlam extends SkillActive _live.remove(player); //Action - HashMap targets = UtilEnt.getInRadius(player.getLocation(), 5 + level); + HashMap targets = UtilEnt.getInRadius(player.getLocation(), 5d + level); for (LivingEntity cur : targets.keySet()) { if (cur.equals(player)) continue; - if (!UtilEnt.isGrounded(player)) - continue; - //Damage Event Factory.Damage().NewDamageEvent(cur, player, null, DamageCause.CUSTOM, (3+level) * targets.get(cur) + 0.5, false, true, false, diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Global/Resistance.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Global/Resistance.java index 7ee8681bf..3f7f59759 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Global/Resistance.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Global/Resistance.java @@ -34,9 +34,13 @@ public class Resistance extends Skill event.GetCondition().GetType() != ConditionType.BLINDNESS) return; - double reduction = (0.25 * getLevel(event.GetCondition().GetEnt())); + int level = getLevel(event.GetCondition().GetEnt()); + if (level <= 0) + return; + + double reduction = -(0.25f * level); - event.GetCondition().ModifyTicks((int) (event.GetCondition().GetTicksTotal() * (1 - reduction))); + event.GetCondition().ModifyTicks((int) (event.GetCondition().GetTicksTotal() * reduction)); } @Override diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/Cleave.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/Cleave.java index c56d2be67..492be14d9 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/Cleave.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/Cleave.java @@ -61,7 +61,7 @@ public class Cleave extends Skill //Splash for (Player other : UtilPlayer.getNearby(damagee.getLocation(), 1.5 + (0.5 * level))) { - if (!other.equals(damagee)) + if (!other.equals(damagee) && !other.equals(damager)) if (Factory.Relation().CanHurt(damager, other)) { //Damage Event diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/HoldPosition.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/HoldPosition.java index fa0c92a4c..d640db7e4 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/HoldPosition.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/HoldPosition.java @@ -42,8 +42,8 @@ public class HoldPosition extends SkillActive SetDesc(new String[] { "Hold your position, gaining", - "Protection 4, Slow 4 and no", - "knockback for #3.5#1.5 seconds." + "Protection 4, Slow 3 and no", + "knockback for #2.5#1.5 seconds." }); } @@ -62,10 +62,10 @@ public class HoldPosition extends SkillActive @Override public void Skill(Player player, int level) { - double duration = 3.5 + (1.5 * level); + double duration = 3 + (1 * level); //Action - Factory.Condition().Factory().Slow(GetName(), player, player, duration, 3, false, true, false, true); + Factory.Condition().Factory().Slow(GetName(), player, player, duration, 2, false, true, false, true); Factory.Condition().Factory().Protection(GetName(), player, player, duration, 3, false, true, true); //Inform diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Blizzard.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Blizzard.java index b2e44f236..a16b45866 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Blizzard.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Blizzard.java @@ -127,7 +127,7 @@ public class Blizzard extends SkillActive //Snow if (target == null || target.getType() == Material.AIR || UtilMath.offset(target.getLocation(), cur.getLocation()) > 5) - for (int i=0 ; i<4 ; i++) + for (int i=0 ; i<1+level ; i++) { Projectile snow = cur.launchProjectile(Snowball.class); double x = 0.2 - (UtilMath.r(40)/100d); diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/FireBlast.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/FireBlast.java index 97683e709..6d237c4ec 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/FireBlast.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/FireBlast.java @@ -41,7 +41,7 @@ public class FireBlast extends SkillActive { "Launch a fireball which explodes on impact", "dealing large knockback to enemies within", - "#3.5#1.5 Blocks range. Also ignites enemies", + "#6#0.5 Blocks range. Also ignites enemies", "for up to #2#2 seconds." }); } @@ -98,20 +98,20 @@ public class FireBlast extends SkillActive if (level == 0) return; //Velocity Players - HashMap hitMap = UtilPlayer.getInRadius(proj.getLocation(), 4 + (2 * level)); + HashMap hitMap = UtilPlayer.getInRadius(proj.getLocation(), 5.5 + (0.5 * level)); for (Player cur : hitMap.keySet()) { double range = hitMap.get(cur); //Damage Event - Factory.Condition().Factory().Ignite(GetName(), cur, player, (2 + (2 * level)) * range, false, false); + Factory.Condition().Factory().Ignite(GetName(), cur, player, (2 + (1 * level)) * range, false, false); //Condition Factory.Condition().Factory().Falling(GetName(), cur, player, 10, false, true); //Velocity UtilAction.velocity(cur, UtilAlg.getTrajectory(proj.getLocation().add(0, -0.5, 0), cur.getEyeLocation()), - 0.5 + 1.5 * range, false, 0, 0.2 + 0.6 * range, 1.2, true); + 1.6 * range, false, 0, 0.8 * range, 1.2, true); } } diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/MagmaBlade.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/MagmaBlade.java index 5501affc4..865526749 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/MagmaBlade.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/MagmaBlade.java @@ -54,7 +54,7 @@ public class MagmaBlade extends Skill if (level == 0) return; //Damage - event.AddMod(damager.getName(), GetName(), level, true); + event.AddMod(damager.getName(), GetName(), 1 + level, true); //Effect damager.getWorld().playSound(damager.getLocation(), Sound.FIZZ, 0.8f, 0f); diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Rupture.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Rupture.java index b205ccb8d..25b5d4416 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Rupture.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Rupture.java @@ -60,7 +60,7 @@ public class Rupture extends SkillActiveCharge { "Hold Block to create a rupture", "at your feet. It will snake through", - "the ground with #1#0.1 velocity, moving" + + "the ground with #1#0.1 velocity, moving", "towards where you are looking,", "giving Slow 2 to nearby opponents.", "", diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Void.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Void.java index 6bc4a6919..79728ee7d 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Void.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/Void.java @@ -36,8 +36,8 @@ public class Void extends Skill "Slow 3, take no knockback and", "use no energy to swing weapons.", "", - "Reduces incoming damage by #2#1 , but", - "burns #7#-1 Energy per 1 damage reduced." + "Reduces incoming damage by #1#1 , but", + "burns #9#-1 Energy per 1 damage reduced." }); } @@ -129,7 +129,20 @@ public class Void extends Skill //Energy Factory.Energy().ModifyEnergy(cur, -0.3); + } + } + + @EventHandler + public void Conditions(UpdateEvent event) + { + if (event.getType() != UpdateType.FAST) + return; + for (Player cur : _active) + { + if (cur.isDead()) + continue; + //Condition Factory.Condition().Factory().Invisible(GetName(), cur, cur, 1.9, 0, false, true, true); Factory.Condition().Factory().Slow(GetName(), cur, cur, 1.9, 1, false, true, false, true); @@ -151,7 +164,7 @@ public class Void extends Skill int level = getLevel(damagee); if (level == 0) return; - double dmgToEnergy = 7 - level; + double dmgToEnergy = 9 - level; int dmgLower = 1 + level; int currentEnergy = (int)Factory.Energy().GetCurrent(damagee); diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/VitalitySpores.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/VitalitySpores.java index 04ddd93e4..6b1f68837 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/VitalitySpores.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/VitalitySpores.java @@ -24,7 +24,7 @@ public class VitalitySpores extends Skill { "After #12#-2 seconds of not taking damage,", "forest spores surround you, giving", - "you Regeneration 1 for #4#2 seconds.", + "you Regeneration 1 for #3#2 seconds.", "", "This remains until you take damage." }); @@ -40,11 +40,11 @@ public class VitalitySpores extends Skill { int level = getLevel(cur); if (level == 0) continue; - - if (UtilTime.elapsed(Factory.Combat().Get(cur).LastDamaged, 10000)) + + if (UtilTime.elapsed(Factory.Combat().Get(cur).GetLastDamaged(), 12000 - 2000*level)) { - Factory.Condition().Factory().Regen(GetName(), cur, cur, 6.9, 0, false, true, true); - UtilPlayer.health(cur, 1); + Factory.Condition().Factory().Regen(GetName(), cur, cur, 3.9 + 2*level, 0, false, true, true); + UtilPlayer.health(cur, 0.5); if (Recharge.Instance.use(cur, GetName(), 2000, false, false)) UtilParticle.PlayParticle(ParticleType.HEART, cur.getEyeLocation(), 0, 0.2f, 0, 0, 1); diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/WolfsFury.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/WolfsFury.java index 95b9b6e03..a8edc69e8 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/WolfsFury.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/WolfsFury.java @@ -72,7 +72,7 @@ public class WolfsFury extends SkillActive _active.put(player, System.currentTimeMillis() + 8000); //Condition - Factory.Condition().Factory().Strength(GetName(), player, player, 2 + 2*level, 2, false, true, true); + Factory.Condition().Factory().Strength(GetName(), player, player, 2 + 2*level, level-1, false, true, true); //Inform UtilPlayer.message(player, F.main(GetClassType().name(), "You used " + F.skill(GetName(level)) + ".")); diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Skill.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Skill.java index cbd41716d..37a28a931 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Skill.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Skill.java @@ -190,10 +190,10 @@ public abstract class Skill implements ISkill, Listener try { - double base = Double.parseDouble(numberToks[0]); - double bonus = Double.parseDouble(numberToks[1]); + float base = Float.parseFloat(numberToks[0]); + float bonus = Float.parseFloat(numberToks[1]); - double levelValue = base + ((double)level * bonus); + float levelValue = base + (level * bonus); String plusMinus = "+"; if (bonus < 0) @@ -211,7 +211,7 @@ public abstract class Skill implements ISkill, Listener //Only display what you'd get with level 1 if (level == 0 ) { - levelValue = base + ((double)1 * bonus); + levelValue = base + (1f * bonus); totalString = levelValue + ""; if (levelValue % 1 == 0) diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/SkillFactory.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/SkillFactory.java index 7cb886346..eb65a8772 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/SkillFactory.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/SkillFactory.java @@ -154,7 +154,7 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory AddSkill(new Resistance(this, "Resistance", ClassType.Global, SkillType.GlobalPassive, 5, 3)); AddSkill(new Rations(this, "Rations", ClassType.Global, SkillType.GlobalPassive, 5, 2)); - AddSkill(new Fitness(this, "Mana Pool", ClassType.Mage, SkillType.GlobalPassive, 5, 5)); + AddSkill(new Fitness(this, "Mana Pool", ClassType.Mage, SkillType.GlobalPassive, 5, 3)); AddSkill(new Recharge(this, "Mana Regeneration", ClassType.Mage, SkillType.GlobalPassive, 5, 3)); AddSkill(new Fitness(this, "Fitness", ClassType.Assassin, SkillType.GlobalPassive, 5, 3)); @@ -418,7 +418,6 @@ public class SkillFactory extends MiniPlugin implements ISkillFactory AddSkill(new Void(this, "Void", ClassType.Mage, SkillType.PassiveA, 5, 3)); AddSkill(new LifeBonds(this, "Life Bonds", ClassType.Mage, SkillType.PassiveA, 5, 3)); - //Passive B AddSkill(new GlacialBlade(this, "Glacial Blade", ClassType.Mage, SkillType.PassiveB, 5, 3, diff --git a/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/combat/ClientCombat.java b/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/combat/ClientCombat.java index 311e5d4c4..eedee5f8c 100644 --- a/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/combat/ClientCombat.java +++ b/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/combat/ClientCombat.java @@ -3,6 +3,8 @@ package mineplex.minecraft.game.core.combat; import java.util.LinkedList; import java.util.WeakHashMap; +import mineplex.core.common.util.UtilTime; + import org.bukkit.entity.LivingEntity; public class ClientCombat @@ -13,7 +15,8 @@ public class ClientCombat private WeakHashMap _lastHurt = new WeakHashMap(); private WeakHashMap _lastHurtBy = new WeakHashMap(); - + private long _lastHurtByWorld = 0; + public LinkedList GetKills() { return _kills; @@ -32,8 +35,18 @@ public class ClientCombat public boolean CanBeHurtBy(LivingEntity damager) { if (damager == null) - return true; - + { + if (UtilTime.elapsed(_lastHurtByWorld, 250)) + { + _lastHurtByWorld = System.currentTimeMillis(); + return true; + } + else + { + return false; + } + } + if (!_lastHurtBy.containsKey(damager)) { _lastHurtBy.put(damager, System.currentTimeMillis()); diff --git a/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/combat/CombatLog.java b/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/combat/CombatLog.java index 666feb91b..391bab2df 100644 --- a/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/combat/CombatLog.java +++ b/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/combat/CombatLog.java @@ -23,8 +23,8 @@ public class CombatLog private String _killerColor = ChatColor.YELLOW + ""; protected CombatComponent LastDamager; - public long LastDamaged; - public long LastCombat; + protected long _lastDamaged; + protected long _lastCombat; public CombatLog(Player player, long expireTime) { @@ -49,11 +49,11 @@ public class CombatLog CombatComponent comp = GetEnemy(damagerName, damagerEnt); comp.AddDamage(attackName, damage); - + // Set Last LastDamager = comp; - LastDamaged = System.currentTimeMillis(); - LastCombat = System.currentTimeMillis(); + _lastDamaged = System.currentTimeMillis(); + _lastCombat = System.currentTimeMillis(); } public CombatComponent GetEnemy(String name, LivingEntity ent) @@ -133,6 +133,21 @@ public class CombatLog { return LastDamager; } + + public long GetLastDamaged() + { + return _lastDamaged; + } + + public long GetLastCombat() + { + return _lastCombat; + } + + public void SetLastCombat(long time) + { + _lastCombat = time; + } public long GetDeathTime() { @@ -163,4 +178,6 @@ public class CombatLog { _killerColor = color; } + + } diff --git a/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/combat/CombatManager.java b/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/combat/CombatManager.java index 4cb382a02..36bd71534 100644 --- a/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/combat/CombatManager.java +++ b/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/combat/CombatManager.java @@ -79,7 +79,7 @@ public class CombatManager extends MiniPlugin if (damagerEnt != null) { if (damagerEnt instanceof Player) - Get((Player)damagerEnt).LastCombat = System.currentTimeMillis(); + Get((Player)damagerEnt).SetLastCombat(System.currentTimeMillis()); Get(damagee).Attacked( UtilEnt.getName(damagerEnt), @@ -226,7 +226,7 @@ public class CombatManager extends MiniPlugin } if (event.GetDamagerEntity(true) instanceof Player) - Get((Player)event.GetDamagerEntity(true)).LastCombat = System.currentTimeMillis(); + Get((Player)event.GetDamagerEntity(true)).SetLastCombat(System.currentTimeMillis()); Get(event.GetDamageePlayer()).Attacked( UtilEnt.getName(event.GetDamagerEntity(true)), @@ -521,7 +521,10 @@ public class CombatManager extends MiniPlugin public CombatLog Get(Player player) { if (!_active.containsKey(player)) + { Add(player); + } + return _active.get(player); } diff --git a/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/condition/ConditionEffect.java b/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/condition/ConditionEffect.java index e643baa35..2145eb550 100644 --- a/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/condition/ConditionEffect.java +++ b/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/condition/ConditionEffect.java @@ -339,6 +339,7 @@ public class ConditionEffect implements Listener event.SetDamager(condition.GetSource()); event.AddMod(UtilEnt.getName(condition.GetSource()), condition.GetReason(), 0, true); event.SetIgnoreArmor(true); + event.SetKnockback(false); } @EventHandler diff --git a/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/damage/DamageManager.java b/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/damage/DamageManager.java index fe0c81565..103fa45d4 100644 --- a/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/damage/DamageManager.java +++ b/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/damage/DamageManager.java @@ -139,7 +139,7 @@ public class DamageManager extends MiniPlugin public void NewDamageEvent(LivingEntity damagee, LivingEntity damager, Projectile proj, DamageCause cause, double damage, boolean knockback, boolean ignoreRate, boolean ignoreArmor, String source, String reason, boolean cancelled) - { + { _plugin.getServer().getPluginManager().callEvent( new CustomDamageEvent(damagee, damager, proj, cause, damage, knockback, ignoreRate, ignoreArmor, @@ -166,12 +166,12 @@ public class DamageManager extends MiniPlugin return; } - //Limit World Damage Rate + //Limit Mob/World Damage Rate if (!event.IgnoreRate()) { if (!_combatManager.Get(damagee.getName()).CanBeHurtBy(event.GetDamagerEntity(true))) { - event.SetCancelled("Damage Rate"); + event.SetCancelled("World/Monster Damage Rate"); return; } } @@ -192,7 +192,7 @@ public class DamageManager extends MiniPlugin if (!event.IgnoreRate()) if (!_combatManager.Get(damager.getName()).CanHurt(event.GetDamageeEntity())) { - event.SetCancelled("Damage Rate"); + event.SetCancelled("PvP Damage Rate"); return; } } @@ -545,4 +545,9 @@ public class DamageManager extends MiniPlugin { _enabled = var; } + + public CombatManager GetCombatManager() + { + return _combatManager; + } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java index 74e8c7568..d106c3830 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java @@ -144,7 +144,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation if (serverConfig.GameList.contains(GameType.Dominate)) { - _skillFactory = new SkillFactory(plugin, damageManager, this, new CombatManager(plugin), conditionManager, _projectileManager, _blockRestore, _fire, new Movement(plugin), teleport, new Energy(plugin), webAddress); + _skillFactory = new SkillFactory(plugin, damageManager, this, _damageManager.GetCombatManager(), conditionManager, _projectileManager, _blockRestore, _fire, new Movement(plugin), teleport, new Energy(plugin), webAddress); _classManager = new ClassManager(plugin, clientManager, donationManager, _skillFactory, webAddress); _classShopManager = new ClassShopManager(_plugin, _classManager, _skillFactory, new ItemPackFactory(_plugin)); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/command/StopCommand.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/command/StopCommand.java index 4d0d123b4..ea1369bbc 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/command/StopCommand.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/command/StopCommand.java @@ -22,9 +22,7 @@ public class StopCommand extends CommandBase return; HandlerList.unregisterAll(Plugin.GetGame()); - Plugin.GetGame().SetState(GameState.Dead); - Plugin.GetGame().WorldData.Uninitialize(); - Plugin.SetGame(null); + Plugin.GetGame().SetState(GameState.End); caller.sendMessage("Stopped Game!"); } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/Dominate.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/Dominate.java index 86cf8ec60..37dc0eb16 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/Dominate.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/Dominate.java @@ -17,6 +17,7 @@ import mineplex.core.common.util.C; import mineplex.core.common.util.UtilPlayer; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; +import mineplex.minecraft.game.core.combat.DeathMessageType; import mineplex.minecraft.game.core.combat.event.CombatDeathEvent; import nautilus.game.arcade.ArcadeManager; import nautilus.game.arcade.GameType; @@ -33,8 +34,8 @@ import nautilus.game.arcade.kit.Kit; import nautilus.game.arcade.kit.KitAvailability; public class Dominate extends TeamGame -{ - //Map Data +{ + //Map Data private ArrayList _points = new ArrayList(); private ArrayList _emerald = new ArrayList(); private ArrayList _resupply = new ArrayList(); @@ -51,39 +52,49 @@ public class Dominate extends TeamGame { super(manager, GameType.Dominate, - new Kit[] + new Kit[] { new KitBrute(manager), new KitRanger(manager), new KitKnight(manager), new KitMage(manager), new KitAssassin(manager), - }, - + }, + new String[] { "Capture Beacons for Points", "+500 Points for Emerald Powerups", - "+200 Point for Kills", + "+50 Points for Kills", "First team to 15000 Points wins" - }); - + }); + + _help = new String[] + { + "Capture Beacons faster with more people!", + + + }; + this.DeathOut = false; - this.PrepareFreeze = false; - this.HungerSet = 20; - + this.PrepareFreeze = false; + this.HungerSet = 20; + this.WorldTimeSet = 2000; + this.DeathSpectateSecs = 10; + + this.Manager.GetDamage().UseSimpleWeaponDamage = false; } - @Override + @Override public void ParseData() - { + { for (String pointName : WorldData.GetAllCustomLocs().keySet()) { _points.add(new CapturePoint(this, pointName, WorldData.GetAllCustomLocs().get(pointName).get(0))); } - + for (Location loc : WorldData.GetDataLocs("YELLOW")) { _resupply.add(new Resupply(this, loc)); @@ -173,7 +184,7 @@ public class Dominate extends TeamGame if (killerTeam.equals(killedTeam)) return; - AddScore(killerTeam, 200); + AddScore(killerTeam, 50); } public void AddScore(GameTeam team, int score) @@ -245,12 +256,12 @@ public class Dominate extends TeamGame _lastScoreboard.add(out); GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(5 - i); } - } - - public void EndCheckScore() + } + + public void EndCheckScore() { GameTeam winner = null; - + if (_redScore >= _victoryScore) winner = GetTeam(ChatColor.RED); else if (_blueScore >= _victoryScore) @@ -258,7 +269,7 @@ public class Dominate extends TeamGame if (winner == null) return; - + ScoreboardWrite(); //Announce @@ -276,7 +287,7 @@ public class Dominate extends TeamGame if (player.isOnline()) AddGems(player, 10, "Participation", false); } - + //End SetState(GameState.End); } @@ -284,7 +295,7 @@ public class Dominate extends TeamGame @Override public double GetKillsGems(Player killer, Player killed, boolean assist) { - return 1; + return 1; } @Override @@ -292,7 +303,7 @@ public class Dominate extends TeamGame { // NOTHING } - + @EventHandler public void InventoryLock(InventoryClickEvent event) { @@ -302,4 +313,10 @@ public class Dominate extends TeamGame event.getWhoClicked().closeInventory(); } } + + @Override + public DeathMessageType GetDeathMessageType() + { + return DeathMessageType.Detailed; + } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/kits/KitAssassin.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/kits/KitAssassin.java index 11b997ec2..dde8199b3 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/kits/KitAssassin.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/kits/KitAssassin.java @@ -72,4 +72,10 @@ public class KitAssassin extends Kit ent.getEquipment().setLeggings(new ItemStack(Material.LEATHER_LEGGINGS)); ent.getEquipment().setBoots(new ItemStack(Material.LEATHER_BOOTS)); } + + @Override + public void DisplayDesc(Player player) + { + + } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/kits/KitBrute.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/kits/KitBrute.java index 431480f5c..fc1e3e7a3 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/kits/KitBrute.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/kits/KitBrute.java @@ -72,4 +72,10 @@ public class KitBrute extends Kit ent.getEquipment().setLeggings(new ItemStack(Material.DIAMOND_LEGGINGS)); ent.getEquipment().setBoots(new ItemStack(Material.DIAMOND_BOOTS)); } + + @Override + public void DisplayDesc(Player player) + { + + } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/kits/KitKnight.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/kits/KitKnight.java index 0be8b1103..f0c2b4d35 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/kits/KitKnight.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/kits/KitKnight.java @@ -72,4 +72,10 @@ public class KitKnight extends Kit ent.getEquipment().setLeggings(new ItemStack(Material.IRON_LEGGINGS)); ent.getEquipment().setBoots(new ItemStack(Material.IRON_BOOTS)); } + + @Override + public void DisplayDesc(Player player) + { + + } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/kits/KitMage.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/kits/KitMage.java index 5aa07aff1..b6a5404f3 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/kits/KitMage.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/kits/KitMage.java @@ -72,4 +72,10 @@ public class KitMage extends Kit ent.getEquipment().setLeggings(new ItemStack(Material.GOLD_LEGGINGS)); ent.getEquipment().setBoots(new ItemStack(Material.GOLD_BOOTS)); } + + @Override + public void DisplayDesc(Player player) + { + + } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/kits/KitRanger.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/kits/KitRanger.java index 3e9181959..d32039831 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/kits/KitRanger.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/kits/KitRanger.java @@ -72,4 +72,10 @@ public class KitRanger extends Kit ent.getEquipment().setLeggings(new ItemStack(Material.CHAINMAIL_LEGGINGS)); ent.getEquipment().setBoots(new ItemStack(Material.CHAINMAIL_BOOTS)); } + + @Override + public void DisplayDesc(Player player) + { + + } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/map/CapturePoint.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/map/CapturePoint.java index fdd8e8c5f..43e8e6e34 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/map/CapturePoint.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/champions_dominate/map/CapturePoint.java @@ -71,6 +71,25 @@ public class CapturePoint floor.setType(Material.WOOL); _floor.add(floor); } + else + { + Block block = loc.getBlock().getRelative(x, -1, z); + block.setType(Material.BEACON); + } + } + + //Glass + if (Math.abs(x) <= 2 && Math.abs(z) <= 2) + { + Block block = loc.getBlock().getRelative(x, -1, z); + block.setType(Material.GLASS); + } + + //Iron + if (Math.abs(x) <= 1 && Math.abs(z) <= 1) + { + Block block = loc.getBlock().getRelative(x, -3, z); + block.setType(Material.IRON_BLOCK); } } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GamePlayerManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GamePlayerManager.java index 97b54b2df..b34ed22df 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GamePlayerManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GamePlayerManager.java @@ -34,6 +34,7 @@ import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; +import org.bukkit.event.entity.EntityDamageEvent.DamageCause; import org.bukkit.event.player.PlayerInteractEntityEvent; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerRespawnEvent; @@ -260,6 +261,9 @@ public class GamePlayerManager implements Listener @EventHandler public void KitDamage(CustomDamageEvent event) { + if (event.GetCause() != DamageCause.ENTITY_ATTACK) + return; + Player player = event.GetDamagerPlayer(false); if (player == null) return; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/world/WorldParser.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/world/WorldParser.java index 2d11ed140..359caa587 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/world/WorldParser.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/world/WorldParser.java @@ -7,10 +7,13 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; +import mineplex.core.common.util.UtilWorld; + import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; +import org.bukkit.block.Sign; import org.bukkit.entity.Player; import org.bukkit.material.Wool; @@ -19,7 +22,7 @@ public class WorldParser public void Parse(Player caller, String[] args) { HashSet dataId = new HashSet(); - + if (args != null) for (String arg : args) { @@ -32,11 +35,11 @@ public class WorldParser caller.sendMessage("Invalid Data ID: " + arg); } } - + HashMap> TeamLocs = new HashMap>(); HashMap> DataLocs = new HashMap>(); HashMap> CustomLocs = new HashMap>(); - + Location cornerA = null; Location cornerB = null; @@ -57,15 +60,45 @@ public class WorldParser if (dataId.contains(block.getTypeId())) { String key = ""+block.getTypeId(); - + if (!CustomLocs.containsKey(key)) CustomLocs.put(key, new ArrayList()); - + CustomLocs.get(key).add(block.getLocation()); continue; } - - //Sign Post > Spawns + + //Signs + if (block.getType() == Material.SIGN_POST || block.getType() == Material.WALL_SIGN) + { + if (block.getRelative(BlockFace.DOWN).getType() == Material.SPONGE) + { + Sign s = (Sign) block.getState(); + + String name = ""; + + try + { + name = s.getLine(0); + } + catch (Exception e) + { + caller.sendMessage("Invalid Sign Data: " + UtilWorld.locToStr(block.getLocation())); + } + + //Add + if (!CustomLocs.containsKey(name)) + CustomLocs.put(name, new ArrayList()); + + CustomLocs.get(name).add(block.getRelative(BlockFace.DOWN).getLocation()); + + //Remove Blocks + block.setTypeId(0); + block.getRelative(BlockFace.DOWN).setTypeId(0); + } + } + + //Spawns if (block.getTypeId() == 147) { Block wool = block.getRelative(BlockFace.DOWN); @@ -78,200 +111,200 @@ public class WorldParser { if (!TeamLocs.containsKey("Red")) TeamLocs.put("Red", new ArrayList()); - + TeamLocs.get("Red").add(wool.getLocation()); - + //Remove Blocks block.setTypeId(0); wool.setTypeId(0); } - + if (wool.getData() == 4) //RED > Spawn { if (!TeamLocs.containsKey("Yellow")) TeamLocs.put("Yellow", new ArrayList()); - + TeamLocs.get("Yellow").add(wool.getLocation()); - + //Remove Blocks block.setTypeId(0); wool.setTypeId(0); } - + if (wool.getData() == 13) //RED > Spawn { if (!TeamLocs.containsKey("Green")) TeamLocs.put("Green", new ArrayList()); - + TeamLocs.get("Green").add(wool.getLocation()); - + //Remove Blocks block.setTypeId(0); wool.setTypeId(0); } - + if (wool.getData() == 11) //RED > Spawn { if (!TeamLocs.containsKey("Blue")) TeamLocs.put("Blue", new ArrayList()); - + TeamLocs.get("Blue").add(wool.getLocation()); - + //Remove Blocks block.setTypeId(0); wool.setTypeId(0); } - + if (wool.getData() == 1) { if (!TeamLocs.containsKey("Orange")) TeamLocs.put("Orange", new ArrayList()); - + TeamLocs.get("Orange").add(wool.getLocation()); - + //Remove Blocks block.setTypeId(0); wool.setTypeId(0); } - + if (wool.getData() == 2) { if (!TeamLocs.containsKey("Magenta")) TeamLocs.put("Magenta", new ArrayList()); - + TeamLocs.get("Magenta").add(wool.getLocation()); - + //Remove Blocks block.setTypeId(0); wool.setTypeId(0); } - + if (wool.getData() == 3) { if (!TeamLocs.containsKey("Sky")) TeamLocs.put("Sky", new ArrayList()); - + TeamLocs.get("Sky").add(wool.getLocation()); - + //Remove Blocks block.setTypeId(0); wool.setTypeId(0); } - + if (wool.getData() == 5) { if (!TeamLocs.containsKey("Lime")) TeamLocs.put("Lime", new ArrayList()); - + TeamLocs.get("Lime").add(wool.getLocation()); - + //Remove Blocks block.setTypeId(0); wool.setTypeId(0); } - + if (wool.getData() == 6) { if (!TeamLocs.containsKey("Pink")) TeamLocs.put("Pink", new ArrayList()); - + TeamLocs.get("Pink").add(wool.getLocation()); - + //Remove Blocks block.setTypeId(0); wool.setTypeId(0); } - + if (wool.getData() == 7) { if (!TeamLocs.containsKey("Gray")) TeamLocs.put("Gray", new ArrayList()); - + TeamLocs.get("Gray").add(wool.getLocation()); - + //Remove Blocks block.setTypeId(0); wool.setTypeId(0); } - + if (wool.getData() == 8) { if (!TeamLocs.containsKey("LGray")) TeamLocs.put("LGray", new ArrayList()); - + TeamLocs.get("LGray").add(wool.getLocation()); - + //Remove Blocks block.setTypeId(0); wool.setTypeId(0); } - + if (wool.getData() == 9) { if (!TeamLocs.containsKey("Cyan")) TeamLocs.put("Cyan", new ArrayList()); - + TeamLocs.get("Cyan").add(wool.getLocation()); - + //Remove Blocks block.setTypeId(0); wool.setTypeId(0); } - + if (wool.getData() == 10) { if (!TeamLocs.containsKey("Purple")) TeamLocs.put("Purple", new ArrayList()); - + TeamLocs.get("Purple").add(wool.getLocation()); - + //Remove Blocks block.setTypeId(0); wool.setTypeId(0); } - + if (wool.getData() == 11) { if (!TeamLocs.containsKey("DBlue")) TeamLocs.put("DBlue", new ArrayList()); - + TeamLocs.get("DBlue").add(wool.getLocation()); - + //Remove Blocks block.setTypeId(0); wool.setTypeId(0); } - + if (wool.getData() == 12) { if (!TeamLocs.containsKey("Brown")) TeamLocs.put("Brown", new ArrayList()); - + TeamLocs.get("Brown").add(wool.getLocation()); - + //Remove Blocks block.setTypeId(0); wool.setTypeId(0); } - + if (wool.getData() == 15) { if (!TeamLocs.containsKey("Black")) TeamLocs.put("Black", new ArrayList()); - + TeamLocs.get("Black").add(wool.getLocation()); - + //Remove Blocks block.setTypeId(0); wool.setTypeId(0); } - + if (wool.getData() == 0) //WHITE > Corner { if (cornerA == null) cornerA = wool.getLocation(); else if (cornerB == null) cornerB = wool.getLocation(); else caller.sendMessage("More than 2 Corner Locations found!"); - + //Remove Blocks block.setTypeId(0); wool.setTypeId(0); @@ -288,16 +321,16 @@ public class WorldParser if (wool.getType() != Material.WOOL) continue; - + Wool woolData = new Wool(wool.getType(), wool.getData()); - + String dataType = woolData.getColor().name(); if (!DataLocs.containsKey(dataType)) DataLocs.put(dataType, new ArrayList()); - + DataLocs.get(dataType).add(wool.getLocation()); - + //Remove Blocks block.setTypeId(0); wool.setTypeId(0); @@ -341,7 +374,7 @@ public class WorldParser out.write("\n"); out.write("MAX_Y:"+Math.max(cornerA.getBlockY(), cornerB.getBlockY())); } - + //Teams for (String team : TeamLocs.keySet()) { @@ -351,7 +384,7 @@ public class WorldParser out.write("\n"); out.write("TEAM_SPAWNS:" + LocationsToString(TeamLocs.get(team))); } - + //Data for (String data : DataLocs.keySet()) { @@ -371,7 +404,7 @@ public class WorldParser out.write("\n"); out.write("CUSTOM_LOCS:" + LocationsToString(CustomLocs.get(data))); } - + out.close(); } catch (Exception e) @@ -392,7 +425,7 @@ public class WorldParser return out; } - + public String LocationSignsToString(HashMap locs) { String out = "";