diff --git a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilTextBottom.java b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilTextBottom.java index 485eee9d0..302120cb8 100644 --- a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilTextBottom.java +++ b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilTextBottom.java @@ -67,5 +67,5 @@ public class UtilTextBottom display((prefix == null ? "" : prefix + ChatColor.RESET + " ") + progressBar + (suffix == null ? "" : ChatColor.RESET + " " + suffix), players); } } - } + } } diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/CripplingBlow.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/CripplingBlow.java index 71f0fa777..40d570fe3 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/CripplingBlow.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Brute/CripplingBlow.java @@ -53,7 +53,7 @@ public class CripplingBlow extends Skill if (level == 0) return; //Stun - Factory.Condition().Factory().Slow(GetName(), damagee, damager, 0.5 + 0.5 * 1, 1, false, true, false, true); + Factory.Condition().Factory().Slow(GetName(), damagee, damager, 0.5 + 0.5 * 1, 0, false, true, false, true); //Damage event.AddMod(damager.getName(), GetName(), 0, true); diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/Deflection.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/Deflection.java index 59338f8f2..75bae265b 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/Deflection.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/Deflection.java @@ -9,6 +9,8 @@ import org.bukkit.event.entity.EntityDamageEvent.DamageCause; import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType; import mineplex.minecraft.game.core.damage.CustomDamageEvent; +import mineplex.core.common.util.F; +import mineplex.core.common.util.UtilPlayer; import mineplex.core.recharge.Recharge; import mineplex.core.updater.event.UpdateEvent; import mineplex.core.updater.UpdateType; @@ -71,13 +73,19 @@ public class Deflection extends Skill if (!Recharge.Instance.use(cur, GetName(), 5000 - (1000 * level), false, false)) continue; + int max = 2 + (1 * level); + int charge = 1; if (_charges.containsKey(cur)) charge += _charges.get(cur); - charge = Math.min(2 + (1 * level), charge); - - _charges.put(cur, charge); + if (charge <= max) + { + _charges.put(cur, charge); + + //Inform + UtilPlayer.message(cur, F.main(GetClassType().name(), "Deflection Charges: " + F.elem(charge+""))); + } } } diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/Swordsmanship.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/Swordsmanship.java index f803ac8e6..1e29be118 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/Swordsmanship.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Knight/Swordsmanship.java @@ -9,7 +9,9 @@ import org.bukkit.event.entity.EntityDamageEvent.DamageCause; import mineplex.minecraft.game.classcombat.Class.IPvpClass.ClassType; import mineplex.minecraft.game.core.damage.CustomDamageEvent; +import mineplex.core.common.util.F; import mineplex.core.common.util.UtilGear; +import mineplex.core.common.util.UtilPlayer; import mineplex.core.recharge.Recharge; import mineplex.core.updater.event.UpdateEvent; import mineplex.core.updater.UpdateType; @@ -76,14 +78,20 @@ public class Swordsmanship extends Skill if (!Recharge.Instance.use(cur, GetName(), 5000 - (1000 * level), false, false)) continue; + + int max = level; int charge = 1; if (_charges.containsKey(cur)) charge += _charges.get(cur); - charge = Math.min(level, charge); - - _charges.put(cur, charge); + if (charge <= max) + { + _charges.put(cur, charge); + + //Inform + UtilPlayer.message(cur, F.main(GetClassType().name(), "Swordsmanship Charges: " + F.elem(charge+""))); + } } } diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/ArcticArmor.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/ArcticArmor.java index 68e783503..db6b5eda7 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/ArcticArmor.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/ArcticArmor.java @@ -44,7 +44,7 @@ public class ArcticArmor extends Skill "", "Create a freezing area around you", "in a #3#1 Block radius. Allies inside", - "this area receive Protection 1.", + "this area receive Protection 2.", "", "You are permanently immune to the", "Slowing effect of snow." 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 2a99c9b68..bfc029e61 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 @@ -68,7 +68,7 @@ public class Rupture extends SkillActiveCharge "", "Release Block to release the rupture,", "causing earth and players to fly upward,", - "dealing up to #3#1 inital damage." + "dealing up to #4#1 inital damage." }); } 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 f30602658..149ae1336 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 @@ -33,7 +33,7 @@ public class Void extends Skill "Drop Axe/Sword to Toggle.", "", "While in void form, you receive", - "Slow 3, take no knockback and", + "Slow 2, take no knockback and", "use no energy to swing weapons.", "", "Reduces incoming damage by #1#1 , but", diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/PinDown.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/PinDown.java index 34afeb87b..abc8292de 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/PinDown.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/PinDown.java @@ -46,7 +46,7 @@ public class PinDown extends SkillActive SetDesc(new String[] { "Instantly fire an arrow, giving", - "target Slow 3 for #3#1 seconds." + "target Slow 4 for #3#1 seconds." }); } 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 a7122b497..c501014b5 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 @@ -78,7 +78,7 @@ public class WolfsFury extends SkillActive _active.put(player, System.currentTimeMillis() + 8000); //Condition - Factory.Condition().Factory().Strength(GetName(), player, player, 2 + 2*level, level-1, false, true, true); + Factory.Condition().Factory().Strength(GetName(), player, player, 2 + 2*level, 2, false, true, true); //Inform UtilPlayer.message(player, F.main(GetClassType().name(), "You used " + F.skill(GetName(level)) + ".")); @@ -133,6 +133,9 @@ public class WolfsFury extends SkillActive int level = getLevel(damager); if (level == 0) return; + + if (!_active.containsKey(damager)) + return; //Remove Swing _swing.remove(damager); diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/ClassShopManager.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/ClassShopManager.java index 4842ce011..05b905b05 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/ClassShopManager.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/ClassShopManager.java @@ -1,8 +1,11 @@ package mineplex.minecraft.game.classcombat.shop; +import org.bukkit.entity.Player; import org.bukkit.plugin.java.JavaPlugin; import mineplex.core.MiniPlugin; +import mineplex.core.achievement.Achievement; +import mineplex.core.achievement.AchievementManager; import mineplex.minecraft.game.classcombat.Class.ClassManager; import mineplex.minecraft.game.classcombat.Skill.SkillFactory; import mineplex.minecraft.game.classcombat.item.ItemFactory; @@ -12,6 +15,7 @@ public class ClassShopManager extends MiniPlugin private ClassManager _classManager; private SkillFactory _skillFactory; private ItemFactory _itemFactory; + private AchievementManager _achievementManager; public ClassShopManager(JavaPlugin plugin, ClassManager classManager, SkillFactory skillFactory, ItemFactory itemFactory) { @@ -20,6 +24,7 @@ public class ClassShopManager extends MiniPlugin _classManager = classManager; _skillFactory = skillFactory; _itemFactory = itemFactory; + //_achievementManager = achievementManager; } public ClassManager GetClassManager() @@ -36,4 +41,18 @@ public class ClassShopManager extends MiniPlugin { return _itemFactory; } + + public boolean hasAchievements(Player player) + { + return _achievementManager.hasCategory(player, new Achievement[] + { + Achievement.CHAMPIONS_ACE, + Achievement.CHAMPIONS_ASSASSINATION, + Achievement.CHAMPIONS_EARTHQUAKE, + Achievement.CHAMPIONS_FLAWLESS_VICTORY, + Achievement.CHAMPIONS_MASS_ELECTROCUTION, + Achievement.CHAMPIONS_THE_LONGEST_SHOT, + Achievement.CHAMPIONS_WINS, + }); + } } 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 23404cac7..4747ac36e 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java @@ -104,6 +104,7 @@ import nautilus.game.arcade.managers.GameLobbyManager; import nautilus.game.arcade.managers.GameLootManager; import nautilus.game.arcade.managers.GameManager; import nautilus.game.arcade.managers.GamePlayerManager; +import nautilus.game.arcade.managers.GameSpectatorManager; import nautilus.game.arcade.managers.GameStatManager; import nautilus.game.arcade.managers.GameTournamentManager; import nautilus.game.arcade.managers.GameWorldManager; @@ -263,6 +264,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation _gameTournamentManager = new GameTournamentManager(this); new GameStatManager(this); new GameLootManager(this, petManager); + new GameSpectatorManager(this); _gameWorldManager = new GameWorldManager(this); new MiscManager(this); _idleManager = new IdleManager(this); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java index 6a6496739..c3832eae2 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java @@ -11,18 +11,27 @@ import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.GameMode; import org.bukkit.Location; +import org.bukkit.Material; import org.bukkit.Sound; import org.bukkit.block.BlockFace; import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer; import org.bukkit.entity.Entity; import org.bukkit.entity.Hanging; +import org.bukkit.entity.Minecart; import org.bukkit.entity.Player; +import org.bukkit.entity.minecart.CommandMinecart; +import org.bukkit.entity.minecart.ExplosiveMinecart; +import org.bukkit.entity.minecart.HopperMinecart; +import org.bukkit.entity.minecart.PoweredMinecart; +import org.bukkit.entity.minecart.StorageMinecart; import org.bukkit.event.EventHandler; import org.bukkit.event.HandlerList; import org.bukkit.event.Listener; import org.bukkit.event.entity.EntityDamageEvent; import org.bukkit.event.hanging.HangingBreakEvent; import org.bukkit.event.hanging.HangingPlaceEvent; +import org.bukkit.event.player.PlayerInteractEntityEvent; +import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerLoginEvent; import org.bukkit.scoreboard.Objective; import org.bukkit.util.Vector; @@ -31,11 +40,14 @@ import mineplex.core.common.util.C; import mineplex.core.common.util.F; import mineplex.core.common.util.NautHashMap; import mineplex.core.common.util.UtilBlock; +import mineplex.core.common.util.UtilEvent; +import mineplex.core.common.util.UtilGear; import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilTabTitle; import mineplex.core.common.util.UtilTime; import mineplex.core.common.util.UtilTextMiddle; +import mineplex.core.common.util.UtilEvent.ActionType; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; import mineplex.minecraft.game.classcombat.event.ClassCombatCreatureAllowSpawnEvent; @@ -1274,4 +1286,8 @@ public abstract class Game implements Listener loc.getY() >= WorldData.MaxY || loc.getY() <= WorldData.MinY); } + + + + } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/bridge/Bridge.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/bridge/Bridge.java index bba5f08b7..98e3758e9 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/bridge/Bridge.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/bridge/Bridge.java @@ -1597,7 +1597,7 @@ public class Bridge extends TeamGame implements OreObsfucation // } @EventHandler - public void boatDeny(PlayerInteractEvent event) + public void vehicleDeny(PlayerInteractEvent event) { if (!UtilEvent.isAction(event, ActionType.R)) return; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/dragonescape/DragonEscape.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/dragonescape/DragonEscape.java index 41d486acc..0f94bac6e 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/dragonescape/DragonEscape.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/dragonescape/DragonEscape.java @@ -562,7 +562,7 @@ public class DragonEscape extends SoloGame if (!UtilTime.elapsed(GetStateTime(), 10000)) { - UtilPlayer.message(player, F.main("Game", "You cannot dig for " + F.elem(UtilTime.MakeStr(6000 - (System.currentTimeMillis() - GetStateTime())) + "."))); + UtilPlayer.message(player, F.main("Game", "You cannot dig for " + F.elem(UtilTime.MakeStr(10000 - (System.currentTimeMillis() - GetStateTime())) + "."))); return; } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameSpectatorManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameSpectatorManager.java new file mode 100644 index 000000000..28fb3fe5f --- /dev/null +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameSpectatorManager.java @@ -0,0 +1,72 @@ +package nautilus.game.arcade.managers; + +import nautilus.game.arcade.ArcadeManager; +import nautilus.game.arcade.GameType; +import nautilus.game.arcade.game.Game.GameState; + +import org.bukkit.Material; +import org.bukkit.entity.Minecart; +import org.bukkit.entity.Player; +import org.bukkit.entity.minecart.CommandMinecart; +import org.bukkit.entity.minecart.ExplosiveMinecart; +import org.bukkit.entity.minecart.HopperMinecart; +import org.bukkit.entity.minecart.PoweredMinecart; +import org.bukkit.entity.minecart.StorageMinecart; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; +import org.bukkit.event.block.Action; +import org.bukkit.event.player.PlayerInteractEntityEvent; +import org.bukkit.event.player.PlayerInteractEvent; +import org.bukkit.event.vehicle.VehicleDamageEvent; + +public class GameSpectatorManager implements Listener +{ + ArcadeManager Manager; + + public GameSpectatorManager(ArcadeManager manager) + { + Manager = manager; + + Manager.GetPluginManager().registerEvents(this, Manager.GetPlugin()); + } + + @EventHandler(priority = EventPriority.LOW) + public void interactCancel(PlayerInteractEvent event) + { + if (Manager.GetGame() == null) + return; + + Player player = event.getPlayer(); + + if (!Manager.GetGame().IsAlive(player)) + event.setCancelled(true); + } + + @EventHandler(priority = EventPriority.LOW) + public void interactEntityCancel(PlayerInteractEntityEvent event) + { + if (Manager.GetGame() == null) + return; + + Player player = event.getPlayer(); + + if (!Manager.GetGame().IsAlive(player)) + event.setCancelled(true); + } + + @EventHandler(priority = EventPriority.LOW) + public void vehicleDamage(VehicleDamageEvent event) + { + if (Manager.GetGame() == null) + return; + + if (!(event.getAttacker() instanceof Player)) + return; + + Player player = (Player)event.getAttacker(); + + if (!Manager.GetGame().IsAlive(player)) + event.setCancelled(true); + } +} diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/MiscManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/MiscManager.java index ca4065813..dceef7794 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/MiscManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/MiscManager.java @@ -52,12 +52,8 @@ public class MiscManager implements Listener Player player = event.getPlayer(); - if (!Manager.GetGame().IsAlive(player)) - { - event.setCancelled(true); - } //BoneMeal - else if (event.getPlayer().getItemInHand().getType() == Material.INK_SACK && event.getPlayer().getItemInHand().getData().getData() == (byte)15) + if (event.getPlayer().getItemInHand().getType() == Material.INK_SACK && event.getPlayer().getItemInHand().getData().getData() == (byte)15) { if (event.getAction() == Action.RIGHT_CLICK_BLOCK && Manager.GetGame().GetType() != GameType.UHC) event.setCancelled(true);