moar undead fixes

This commit is contained in:
phobia 2016-02-14 12:37:37 +11:00
parent 24254635a8
commit d7ad2cdc58
2 changed files with 10 additions and 2 deletions

View File

@ -182,7 +182,7 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
private Explosion _explosion; private Explosion _explosion;
private GoldManager _goldManager; private GoldManager _goldManager;
private WarPointEvasion _warPointEvasion; private WarPointEvasion _warPointEvasion;
private ObserverManager _observerManager;
private Punish _punish; private Punish _punish;
private int _inviteExpire = 2; private int _inviteExpire = 2;
@ -271,7 +271,7 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
new Spawn(plugin, this); new Spawn(plugin, this);
new NPCManager(this, _hologramManager); new NPCManager(this, _hologramManager);
new SafeLog(plugin, this); new SafeLog(plugin, this);
new ObserverManager(plugin, _condition, this); _observerManager = new ObserverManager(plugin, _condition, this);
new ClanEnergyTracker(plugin, this); new ClanEnergyTracker(plugin, this);
new StuckManager(this); new StuckManager(this);
@ -1172,4 +1172,10 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
return null; return null;
} }
public ObserverManager getObserverManager()
{
return _observerManager;
}
} }

View File

@ -4,6 +4,7 @@ import java.util.HashSet;
import java.util.Iterator; import java.util.Iterator;
import java.util.Set; import java.util.Set;
import mineplex.game.clans.clans.ClansManager;
import org.bukkit.Effect; import org.bukkit.Effect;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;
@ -474,6 +475,7 @@ public class UndeadCamp extends WorldEvent
@EventHandler(priority = EventPriority.HIGHEST) @EventHandler(priority = EventPriority.HIGHEST)
public void onChestOpen(PlayerInteractEvent event) public void onChestOpen(PlayerInteractEvent event)
{ {
if(ClansManager.getInstance().getObserverManager().isObserver(event.getPlayer())) return;;
Block block = event.getClickedBlock(); Block block = event.getClickedBlock();
if (_containers.contains(block)) if (_containers.contains(block))
{ {