From d7ad2cdc5885c5bc4605113b2855d6b7dc9a962c Mon Sep 17 00:00:00 2001 From: phobia Date: Sun, 14 Feb 2016 12:37:37 +1100 Subject: [PATCH] moar undead fixes --- .../src/mineplex/game/clans/clans/ClansManager.java | 10 ++++++++-- .../game/clans/clans/worldevent/undead/UndeadCamp.java | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java index 9eb461531..7981a5a5e 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java @@ -182,7 +182,7 @@ public class ClansManager extends MiniClientPluginimplements IRelati private Explosion _explosion; private GoldManager _goldManager; private WarPointEvasion _warPointEvasion; - + private ObserverManager _observerManager; private Punish _punish; private int _inviteExpire = 2; @@ -271,7 +271,7 @@ public class ClansManager extends MiniClientPluginimplements IRelati new Spawn(plugin, this); new NPCManager(this, _hologramManager); new SafeLog(plugin, this); - new ObserverManager(plugin, _condition, this); + _observerManager = new ObserverManager(plugin, _condition, this); new ClanEnergyTracker(plugin, this); new StuckManager(this); @@ -1172,4 +1172,10 @@ public class ClansManager extends MiniClientPluginimplements IRelati return null; } + + public ObserverManager getObserverManager() + { + return _observerManager; + } + } diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/undead/UndeadCamp.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/undead/UndeadCamp.java index 0c98c5f45..a3a746469 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/undead/UndeadCamp.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/undead/UndeadCamp.java @@ -4,6 +4,7 @@ import java.util.HashSet; import java.util.Iterator; import java.util.Set; +import mineplex.game.clans.clans.ClansManager; import org.bukkit.Effect; import org.bukkit.Location; import org.bukkit.Material; @@ -474,6 +475,7 @@ public class UndeadCamp extends WorldEvent @EventHandler(priority = EventPriority.HIGHEST) public void onChestOpen(PlayerInteractEvent event) { + if(ClansManager.getInstance().getObserverManager().isObserver(event.getPlayer())) return;; Block block = event.getClickedBlock(); if (_containers.contains(block)) {