From 7a4ccdf680d8c65a7a65186a0ea0bff241bacb53 Mon Sep 17 00:00:00 2001 From: Mysticate Date: Sun, 11 Oct 2015 22:17:34 -0400 Subject: [PATCH] Bug fixes --- .../core/bonuses/gui/buttons/VoteButton.java | 17 +- .../nautilus/game/arcade/ArcadeManager.java | 2 + .../game/arcade/game/games/bridge/Bridge.java | 173 ++++++++++++++---- .../game/arcade/game/games/build/Build.java | 22 ++- .../game/arcade/game/games/draw/Draw.java | 8 + .../game/games/smash/kits/KitZombie.java | 2 +- .../game/games/turfforts/TurfForts.java | 27 ++- .../game/arcade/game/games/uhc/UHC.java | 70 +++---- .../arcade/game/games/wither/WitherGame.java | 3 + .../game/arcade/kit/perks/PerkDigger.java | 30 +-- 10 files changed, 241 insertions(+), 113 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/buttons/VoteButton.java b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/buttons/VoteButton.java index 0110d5fa0..0812dbe2a 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/buttons/VoteButton.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/buttons/VoteButton.java @@ -2,6 +2,9 @@ package mineplex.core.bonuses.gui.buttons; import java.util.ArrayList; +import mineplex.core.bonuses.BonusAmount; +import mineplex.core.bonuses.BonusClientData; +import mineplex.core.bonuses.BonusManager; import mineplex.core.common.jsonchat.ClickEvent; import mineplex.core.common.jsonchat.JsonMessage; import mineplex.core.common.util.C; @@ -11,10 +14,6 @@ import mineplex.core.common.util.UtilTime.TimeUnit; import mineplex.core.gui.GuiItem; import mineplex.core.gui.ItemRefresher; import mineplex.core.shop.item.ShopItem; -import mineplex.core.bonuses.BonusAmount; -import mineplex.core.bonuses.BonusClientData; -import mineplex.core.bonuses.BonusManager; -import mineplex.core.bonuses.StreakRecord; import org.bukkit.Bukkit; import org.bukkit.ChatColor; @@ -72,15 +71,15 @@ public class VoteButton implements GuiItem, Listener { getPlayer().playSound(getPlayer().getLocation(), Sound.NOTE_PLING, 1, 1.6f); - UtilPlayer.message(getPlayer(), "----------------------------------------------------"); + UtilPlayer.message(getPlayer(), C.cGold + C.Bold + C.Strike + "============================================="); UtilPlayer.message(getPlayer(), ""); - new JsonMessage("Click to Open in Web Browser").click(ClickEvent.OPEN_URL, _url).sendToPlayer(getPlayer()); - new JsonMessage(C.cGreen + _url).click(ClickEvent.OPEN_URL, _url).sendToPlayer(getPlayer()); + new JsonMessage(" " + C.Bold + "Click to Open in Web Browser").click(ClickEvent.OPEN_URL, _url).sendToPlayer(getPlayer()); + new JsonMessage( " " + C.cGreen + C.Line + _url).click(ClickEvent.OPEN_URL, _url).sendToPlayer(getPlayer()); UtilPlayer.message(getPlayer(), ""); - UtilPlayer.message(getPlayer(), "Please be patient, votes may take a few minutes to register."); + UtilPlayer.message(getPlayer(), "Please be patient. Votes may take a few minutes to register."); UtilPlayer.message(getPlayer(), ""); - UtilPlayer.message(getPlayer(), "----------------------------------------------------"); + UtilPlayer.message(getPlayer(), C.cGold + C.Bold + C.Strike + "============================================="); getPlayer().closeInventory(); 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 90b0a8c20..2fba19105 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java @@ -940,6 +940,8 @@ public class ArcadeManager extends MiniPlugin implements IRelation player.setLevel(0); player.setExp(0f); + player.setPlayerTime(player.getWorld().getTime(), false); + ((CraftPlayer) player).getHandle().spectating = false; ((CraftPlayer) player).getHandle().ghost = false; ((CraftPlayer) player).getHandle().k = true; 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 f839c7539..e10942288 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 @@ -6,6 +6,52 @@ import java.util.HashSet; import java.util.Iterator; import java.util.UUID; +import mineplex.core.common.Rank; +import mineplex.core.common.util.C; +import mineplex.core.common.util.F; +import mineplex.core.common.util.MapUtil; +import mineplex.core.common.util.NautHashMap; +import mineplex.core.common.util.UtilAction; +import mineplex.core.common.util.UtilAlg; +import mineplex.core.common.util.UtilBlock; +import mineplex.core.common.util.UtilEvent; +import mineplex.core.common.util.UtilEvent.ActionType; +import mineplex.core.common.util.UtilGear; +import mineplex.core.common.util.UtilInv; +import mineplex.core.common.util.UtilMath; +import mineplex.core.common.util.UtilPlayer; +import mineplex.core.common.util.UtilTextMiddle; +import mineplex.core.common.util.UtilTime; +import mineplex.core.common.util.UtilWorld; +import mineplex.core.explosion.ExplosionEvent; +import mineplex.core.itemstack.ItemStackFactory; +import mineplex.core.updater.UpdateType; +import mineplex.core.updater.event.UpdateEvent; +import mineplex.minecraft.game.core.combat.event.CombatDeathEvent; +import mineplex.minecraft.game.core.damage.CustomDamageEvent; +import nautilus.game.arcade.ArcadeManager; +import nautilus.game.arcade.GameType; +import nautilus.game.arcade.events.GameStateChangeEvent; +import nautilus.game.arcade.events.PlayerDeathOutEvent; +import nautilus.game.arcade.game.Game; +import nautilus.game.arcade.game.GameTeam; +import nautilus.game.arcade.game.TeamGame; +import nautilus.game.arcade.game.games.bridge.kits.KitApple; +import nautilus.game.arcade.game.games.bridge.kits.KitArcher; +import nautilus.game.arcade.game.games.bridge.kits.KitBeserker; +import nautilus.game.arcade.game.games.bridge.kits.KitBomber; +import nautilus.game.arcade.game.games.bridge.kits.KitDestructor; +import nautilus.game.arcade.game.games.bridge.kits.KitMammoth; +import nautilus.game.arcade.game.games.bridge.kits.KitMiner; +import nautilus.game.arcade.kit.Kit; +import nautilus.game.arcade.ore.OreHider; +import nautilus.game.arcade.ore.OreObsfucation; +import nautilus.game.arcade.stats.BridgesSniperStatTracker; +import nautilus.game.arcade.stats.DeathBomberStatTracker; +import nautilus.game.arcade.stats.FoodForTheMassesStatTracker; +import nautilus.game.arcade.stats.KillFastStatTracker; +import nautilus.game.arcade.stats.TntMinerStatTracker; + import org.bukkit.ChatColor; import org.bukkit.Effect; import org.bukkit.Location; @@ -29,6 +75,7 @@ import org.bukkit.event.block.BlockFromToEvent; import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.event.entity.EntityChangeBlockEvent; import org.bukkit.event.entity.EntityExplodeEvent; +import org.bukkit.event.entity.EntitySpawnEvent; import org.bukkit.event.entity.ItemSpawnEvent; import org.bukkit.event.inventory.PrepareItemCraftEvent; import org.bukkit.event.player.PlayerBucketEmptyEvent; @@ -40,45 +87,6 @@ import org.bukkit.inventory.ItemStack; import org.bukkit.metadata.FixedMetadataValue; import org.bukkit.util.Vector; -import mineplex.core.common.Rank; -import mineplex.core.common.util.C; -import mineplex.core.common.util.F; -import mineplex.core.common.util.MapUtil; -import mineplex.core.common.util.NautHashMap; -import mineplex.core.common.util.UtilAction; -import mineplex.core.common.util.UtilAlg; -import mineplex.core.common.util.UtilBlock; -import mineplex.core.common.util.UtilEvent; -import mineplex.core.common.util.UtilGear; -import mineplex.core.common.util.UtilTextMiddle; -import mineplex.core.common.util.UtilWorld; -import mineplex.core.common.util.UtilEvent.ActionType; -import mineplex.core.common.util.UtilMath; -import mineplex.core.common.util.UtilPlayer; -import mineplex.core.common.util.UtilTime; -import mineplex.core.explosion.ExplosionEvent; -import mineplex.core.itemstack.ItemStackFactory; -import mineplex.core.updater.event.UpdateEvent; -import mineplex.core.updater.UpdateType; -import mineplex.minecraft.game.core.combat.event.CombatDeathEvent; -import mineplex.minecraft.game.core.damage.CustomDamageEvent; -import nautilus.game.arcade.ArcadeManager; -import nautilus.game.arcade.GameType; -import nautilus.game.arcade.events.GameStateChangeEvent; -import nautilus.game.arcade.events.PlayerDeathOutEvent; -import nautilus.game.arcade.game.Game; -import nautilus.game.arcade.game.GameTeam; -import nautilus.game.arcade.game.TeamGame; -import nautilus.game.arcade.game.games.bridge.kits.*; -import nautilus.game.arcade.kit.Kit; -import nautilus.game.arcade.ore.OreHider; -import nautilus.game.arcade.ore.OreObsfucation; -import nautilus.game.arcade.stats.BridgesSniperStatTracker; -import nautilus.game.arcade.stats.DeathBomberStatTracker; -import nautilus.game.arcade.stats.KillFastStatTracker; -import nautilus.game.arcade.stats.FoodForTheMassesStatTracker; -import nautilus.game.arcade.stats.TntMinerStatTracker; - public class Bridge extends TeamGame implements OreObsfucation { /** @@ -1159,6 +1167,59 @@ public class Bridge extends TeamGame implements OreObsfucation if (!IsAlive(event.getPlayer())) return; + //No water basing + if (event.getBlock().getRelative(BlockFace.UP).isLiquid() || + event.getBlockReplacedState().getTypeId() == 8 || + event.getBlockReplacedState().getTypeId() == 9 || + event.getBlockReplacedState().getTypeId() == 10 || + event.getBlockReplacedState().getTypeId() == 11) + { + if (event.getItemInHand() != null && + event.getItemInHand().getType() == Material.WOOD_DOOR || + event.getItemInHand().getTypeId() == 193 || //1.8 doors + event.getItemInHand().getTypeId() == 194 || //1.8 doors + event.getItemInHand().getTypeId() == 195 || //1.8 doors + event.getItemInHand().getTypeId() == 196 || //1.8 doors + event.getItemInHand().getTypeId() == 197 || //1.8 doors + event.getItemInHand().getTypeId() == 330 || //1.8 doors + event.getItemInHand().getTypeId() == 427 || //1.8 doors + event.getItemInHand().getTypeId() == 428 || //1.8 doors + event.getItemInHand().getTypeId() == 429 || //1.8 doors + event.getItemInHand().getTypeId() == 430 || //1.8 doors + event.getItemInHand().getTypeId() == 431 || //1.8 doors + event.getItemInHand().getType() == Material.TRAP_DOOR || + event.getItemInHand().getTypeId() == 167 || //Iron trap door + event.getItemInHand().getType() == Material.LADDER || + event.getItemInHand().getType() == Material.STONE_PLATE || + event.getItemInHand().getType() == Material.WOOD_PLATE || + event.getItemInHand().getType() == Material.IRON_PLATE || + event.getItemInHand().getType() == Material.GOLD_PLATE || + event.getItemInHand().getType() == Material.WOOD_BUTTON || + event.getItemInHand().getType() == Material.STONE_BUTTON || + event.getItemInHand().getType() == Material.SIGN || + event.getItemInHand().getType() == Material.FENCE || + event.getItemInHand().getType() == Material.FENCE_GATE || + event.getItemInHand().getTypeId() == 183 || //1.8 Fences stuff + event.getItemInHand().getTypeId() == 184 || + event.getItemInHand().getTypeId() == 185 || + event.getItemInHand().getTypeId() == 186 || + event.getItemInHand().getTypeId() == 187 || + event.getItemInHand().getTypeId() == 188 || + event.getItemInHand().getTypeId() == 189 || + event.getItemInHand().getTypeId() == 190 || + event.getItemInHand().getTypeId() == 191 || + event.getItemInHand().getTypeId() == 192 || + event.getItemInHand().getType() == Material.NETHER_FENCE || + event.getItemInHand().getType() == Material.STEP || + event.getItemInHand().getType() == Material.WOOD_STEP || + event.getItemInHand().getTypeId() == 182) //Red sandstone slab + { + event.getPlayer().getWorld().playEffect(event.getBlock().getLocation(), Effect.STEP_SOUND, event.getItemInHand().getTypeId()); + event.setCancelled(true); + return; + } + } + //Too High if (event.getBlock().getLocation().getBlockY() > GetHeightLimit()) { @@ -1735,6 +1796,40 @@ public class Bridge extends TeamGame implements OreObsfucation cheaterKill(damager); } } + + @EventHandler + public void preventMinecarts(PlayerInteractEvent event) + { + if (!IsLive()) + return; + + if (!IsAlive(event.getPlayer())) + return; + + if (!UtilEvent.isAction(event, ActionType.R)) + return; + + if (event.getItem() == null) + return; + + if (event.getItem().getType().toString().toLowerCase().contains("minecart")) + { + event.setCancelled(true); + UtilInv.Update(event.getPlayer()); + } + } + + @EventHandler + public void preventMinecarts(EntitySpawnEvent event) + { + if (!IsLive()) + return; + + if (event.getEntityType().toString().toLowerCase().contains("minecart")) + { + event.getEntity().remove(); + } + } public void cheaterKill(Player player) { diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/build/Build.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/build/Build.java index 8fe75397a..e0fad7f01 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/build/Build.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/build/Build.java @@ -943,19 +943,25 @@ public class Build extends SoloGame if (!event.getBlock().isLiquid()) return; + boolean in = false; for (BuildData data : _data.values()) { - if (!data.inBuildArea(event.getBlock())) + if (data.inBuildArea(event.getBlock())) { - event.setCancelled(true); - - event.getEntity().remove(); - - //Effect - event.getBlock().getWorld().playEffect(event.getBlock().getLocation(), Effect.STEP_SOUND, ((FallingBlock) event.getEntity()).getBlockId()); - return; + in = true; + break; } } + + if (!in) + { + event.setCancelled(true); + + event.getEntity().remove(); + + //Effect + event.getBlock().getWorld().playEffect(event.getBlock().getLocation(), Effect.STEP_SOUND, ((FallingBlock) event.getEntity()).getBlockId()); + } } @EventHandler diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/draw/Draw.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/draw/Draw.java index 9d30a56f1..cde5143bf 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/draw/Draw.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/draw/Draw.java @@ -358,6 +358,14 @@ public class Draw extends SoloGame return; } } + else if (_drawers.HasPlayer(event.getPlayer())) + { + if (event.getMessage().toLowerCase().contains(_round.Word.toLowerCase())) + { + event.setCancelled(true); + return; + } + } } @EventHandler diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitZombie.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitZombie.java index 00e5e30fb..08ea676e6 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitZombie.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/smash/kits/KitZombie.java @@ -58,7 +58,7 @@ public class KitZombie extends SmashKit UtilInv.Clear(player); player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.IRON_AXE, (byte)0, 1, - C.cYellow + C.Bold + "Left-Click" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Bile Blaster", + C.cYellow + C.Bold + "Right-Click" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Bile Blaster", new String[] { ChatColor.RESET + "Spew up your dinner from last night.", diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/turfforts/TurfForts.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/turfforts/TurfForts.java index 3e4b5c774..e1c15992d 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/turfforts/TurfForts.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/turfforts/TurfForts.java @@ -287,10 +287,20 @@ public class TurfForts extends TeamGame { if (event.isCancelled()) // this statement might save just a small amount of time return; - - if(getArcadeManager().isSpectator(event.getPlayer())) event.setCancelled(true); + + if (!IsAlive(event.getPlayer())) + { + event.setCancelled(true); + return; + } + + if (UtilPlayer.isSpectator(event.getPlayer())) + { + event.setCancelled(true); + return; + } } - + @EventHandler public void BlockPlace(BlockPlaceEvent event) { @@ -304,7 +314,18 @@ public class TurfForts extends TeamGame return; } + if (!IsAlive(event.getPlayer())) + { + event.setCancelled(true); + return; + } + if (UtilPlayer.isSpectator(event.getPlayer())) + { + event.setCancelled(true); + return; + } + //On Own Block block = event.getBlock().getRelative(BlockFace.DOWN); while (block.getTypeId() == 0) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/uhc/UHC.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/uhc/UHC.java index 9175d6350..84e3459ae 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/uhc/UHC.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/uhc/UHC.java @@ -4,6 +4,37 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; +import mineplex.core.common.util.C; +import mineplex.core.common.util.F; +import mineplex.core.common.util.NautHashMap; +import mineplex.core.common.util.UtilAction; +import mineplex.core.common.util.UtilAlg; +import mineplex.core.common.util.UtilBlock; +import mineplex.core.common.util.UtilEvent; +import mineplex.core.common.util.UtilInv; +import mineplex.core.common.util.UtilMath; +import mineplex.core.common.util.UtilPlayer; +import mineplex.core.common.util.UtilServer; +import mineplex.core.common.util.UtilTextMiddle; +import mineplex.core.common.util.UtilTime; +import mineplex.core.common.util.UtilWorld; +import mineplex.core.itemstack.ItemStackFactory; +import mineplex.core.packethandler.PacketPlayOutWorldBorder; +import mineplex.core.recharge.Recharge; +import mineplex.core.timing.TimingManager; +import mineplex.core.updater.UpdateType; +import mineplex.core.updater.event.UpdateEvent; +import mineplex.minecraft.game.core.combat.CombatLog; +import mineplex.minecraft.game.core.combat.event.CombatDeathEvent; +import mineplex.minecraft.game.core.damage.CustomDamageEvent; +import mineplex.serverdata.Utility; +import nautilus.game.arcade.ArcadeManager; +import nautilus.game.arcade.GameType; +import nautilus.game.arcade.events.GameStateChangeEvent; +import nautilus.game.arcade.game.GameTeam; +import nautilus.game.arcade.game.TeamGame; +import nautilus.game.arcade.kit.Kit; + import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Chunk; @@ -26,12 +57,12 @@ import org.bukkit.event.EventPriority; import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.event.entity.EntityDamageEvent; +import org.bukkit.event.entity.EntityDamageEvent.DamageCause; import org.bukkit.event.entity.EntityDeathEvent; import org.bukkit.event.entity.EntityExplodeEvent; import org.bukkit.event.entity.EntityRegainHealthEvent; -import org.bukkit.event.entity.PlayerDeathEvent; -import org.bukkit.event.entity.EntityDamageEvent.DamageCause; import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason; +import org.bukkit.event.entity.PlayerDeathEvent; import org.bukkit.event.inventory.PrepareItemCraftEvent; import org.bukkit.event.player.PlayerChangedWorldEvent; import org.bukkit.event.player.PlayerCommandPreprocessEvent; @@ -55,37 +86,6 @@ import org.bukkit.potion.PotionEffectType; import org.bukkit.scoreboard.DisplaySlot; import org.bukkit.scoreboard.Objective; -import mineplex.core.common.util.C; -import mineplex.core.common.util.F; -import mineplex.core.common.util.NautHashMap; -import mineplex.core.common.util.UtilAction; -import mineplex.core.common.util.UtilAlg; -import mineplex.core.common.util.UtilBlock; -import mineplex.core.common.util.UtilEvent; -import mineplex.core.common.util.UtilInv; -import mineplex.core.common.util.UtilMath; -import mineplex.core.common.util.UtilWorld; -import mineplex.core.common.util.UtilPlayer; -import mineplex.core.common.util.UtilServer; -import mineplex.core.common.util.UtilTime; -import mineplex.core.common.util.UtilTextMiddle; -import mineplex.core.itemstack.ItemStackFactory; -import mineplex.core.packethandler.PacketPlayOutWorldBorder; -import mineplex.core.recharge.Recharge; -import mineplex.core.timing.TimingManager; -import mineplex.core.updater.UpdateType; -import mineplex.core.updater.event.UpdateEvent; -import mineplex.minecraft.game.core.combat.CombatLog; -import mineplex.minecraft.game.core.combat.event.CombatDeathEvent; -import mineplex.minecraft.game.core.damage.CustomDamageEvent; -import mineplex.serverdata.Utility; -import nautilus.game.arcade.ArcadeManager; -import nautilus.game.arcade.GameType; -import nautilus.game.arcade.events.GameStateChangeEvent; -import nautilus.game.arcade.game.GameTeam; -import nautilus.game.arcade.game.TeamGame; -import nautilus.game.arcade.kit.Kit; - public class UHC extends TeamGame { private NautHashMap _teamReqs = new NautHashMap(); @@ -344,6 +344,10 @@ public class UHC extends TeamGame player.getWorld().playSound(loc, Sound.NOTE_BASS, 2f, 1f); player.getWorld().playSound(loc, Sound.NOTE_BASS, 2f, 1f); } + else + { + player.teleport(GetSpectatorLocation()); + } } } } 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 925d0d6fb..47f61d98f 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 @@ -143,6 +143,9 @@ public class WitherGame extends TeamGame implements IBlockRestorer this.TeamArmor = true; this.TeamArmorHotbar = false; + + this.InventoryClick = false; + this.InventoryOpenBlock = false; _help = new String[] { diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkDigger.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkDigger.java index da6f350e3..400cb8b65 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkDigger.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkDigger.java @@ -1,13 +1,10 @@ package nautilus.game.arcade.kit.perks; -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; - import mineplex.core.common.util.C; -import mineplex.core.updater.event.UpdateEvent; -import mineplex.core.updater.UpdateType; import nautilus.game.arcade.kit.Perk; +import org.bukkit.entity.Player; + public class PerkDigger extends Perk { public PerkDigger() @@ -18,21 +15,14 @@ public class PerkDigger extends Perk }); } - @EventHandler - public void DigSpeed(UpdateEvent event) + @Override + public void Apply(Player player) + { + addEffects(player); + } + + private void addEffects(Player player) { - if (event.getType() != UpdateType.FAST) - return; - - if (Manager.GetGame() == null) - return; - - for (Player player : Manager.GetGame().GetPlayers(true)) - { - if (!Kit.HasKit(player)) - continue; - - Manager.GetCondition().Factory().DigFast(GetName(), player, player, 2.9, 1, false, false, true); - } + Manager.GetCondition().Factory().DigFast(GetName(), player, null, Integer.MAX_VALUE, 1, false, false, true); } }