diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/Clans.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/Clans.java index 8a06117be..7a9acd65f 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/Clans.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/Clans.java @@ -32,6 +32,7 @@ import mineplex.core.status.ServerStatusManager; import mineplex.core.teleport.Teleport; import mineplex.core.updater.FileUpdater; import mineplex.core.updater.Updater; +import mineplex.core.visibility.VisibilityManager; import mineplex.game.clans.clans.ClansManager; import mineplex.game.clans.clans.worldevent.WorldEventManager; import mineplex.game.clans.items.GearManager; @@ -66,7 +67,8 @@ public class Clans extends JavaPlugin CommandCenter.Instance.setClientManager(_clientManager); ItemStackFactory.Initialize(this, false); - Recharge.Initialize(this); + Recharge.Initialize(this); + VisibilityManager.Initialize(this); _donationManager = new DonationManager(this, _clientManager, webServerAddress); @@ -83,7 +85,6 @@ public class Clans extends JavaPlugin Portal portal = new Portal(this, _clientManager, serverStatusManager.getCurrentServerName()); new FileUpdater(this, portal, serverStatusManager.getCurrentServerName(), serverStatusManager.getRegion()); - Punish punish = new Punish(this, webServerAddress, _clientManager); AntiHack.Initialize(this, punish, portal, preferenceManager, _clientManager); AntiHack.Instance.setKick(false); diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/WorldEventManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/WorldEventManager.java index 1f43b4528..3ffe98626 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/WorldEventManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/WorldEventManager.java @@ -58,7 +58,7 @@ public class WorldEventManager extends MiniPlugin implements ScoreboardElement _factory = new ConcreteWorldEventFactory(this); _events = new LinkedList(); _lastEventEnd = System.currentTimeMillis(); - _nextEventStart = System.currentTimeMillis() + 30000; + updateNextEventTime(); } @Override @@ -95,29 +95,29 @@ public class WorldEventManager extends MiniPlugin implements ScoreboardElement if (removed && _events.size() == 0) { - _nextEventStart = generateNextEventTime(); + updateNextEventTime(); } } - @EventHandler - public void startEvent(UpdateEvent event) - { - if (event.getType() != UpdateType.SEC) - return; - - if (_events.size() == 0 && System.currentTimeMillis() > _nextEventStart) - { - if (UtilServer.getPlayers().length > 0) - { - Bukkit.broadcastMessage("Starting new event from random..."); - startRandomEvent(); - } - else - { - _nextEventStart = generateNextEventTime(); - } - } - } +// @EventHandler +// public void startEvent(UpdateEvent event) +// { +// if (event.getType() != UpdateType.SEC) +// return; +// +// if (_events.size() == 0 && System.currentTimeMillis() > _nextEventStart) +// { +// if (UtilServer.getPlayers().length > 0) +// { +// Bukkit.broadcastMessage("Starting new event from random..."); +// startRandomEvent(); +// } +// else +// { +// updateNextEventTime(); +// } +// } +// } private void startRandomEvent() { @@ -161,7 +161,7 @@ public class WorldEventManager extends MiniPlugin implements ScoreboardElement iterator.remove(); } - _nextEventStart = generateNextEventTime(); + updateNextEventTime(); } public ClansManager getClans() @@ -180,11 +180,11 @@ public class WorldEventManager extends MiniPlugin implements ScoreboardElement addCommand(new WorldEventCommand(this)); } - private long generateNextEventTime() + private void updateNextEventTime() { // 45 Minutes + 0 - 15 Minutes long waitTime = 2700000L + _random.nextInt(900000); - return System.currentTimeMillis() + waitTime; + _nextEventStart = System.currentTimeMillis() + waitTime; } @Override diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/event/boss/slime/ability/AbsorbAbility.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/event/boss/slime/ability/AbsorbAbility.java index bc9893a16..a3d5b93a0 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/event/boss/slime/ability/AbsorbAbility.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/event/boss/slime/ability/AbsorbAbility.java @@ -45,7 +45,6 @@ public class AbsorbAbility extends SlimeAbility private void pulse() { - Bukkit.broadcastMessage("Pulse"); HashMap playerMap = UtilPlayer.getInRadius(getSlime().getEntity().getLocation(), _maxDistance); for (Map.Entry entry : playerMap.entrySet()) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/event/boss/slime/ability/RocketAbility.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/event/boss/slime/ability/RocketAbility.java index c5a605b18..cb3dd2a3b 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/event/boss/slime/ability/RocketAbility.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/event/boss/slime/ability/RocketAbility.java @@ -102,7 +102,7 @@ public class RocketAbility extends SlimeAbility implements IThrown ProjectileManager pm = getSlime().getEvent().getEventManager().getClans().getProjectile(); pm.AddThrow(projectile, getSlime().getEntity(), this, -1, true, true, true, null, 0, 0, UtilParticle.ParticleType.SLIME, UpdateType.FASTEST, 1F); - Bukkit.broadcastMessage("Shot Slime at target " + target); +// Bukkit.broadcastMessage("Shot Slime at target " + target); _rocketsFired++; } @@ -110,7 +110,7 @@ public class RocketAbility extends SlimeAbility implements IThrown @Override public void Collide(LivingEntity target, Block block, ProjectileUser data) { - Bukkit.broadcastMessage("COLLIDE " + target); +// Bukkit.broadcastMessage("COLLIDE " + target); UtilParticle.PlayParticle(UtilParticle.ParticleType.LARGE_EXPLODE, data.GetThrown().getLocation(), 0, 0, 0, 0, 1, UtilParticle.ViewDist.LONG, UtilServer.getPlayers()); target.getLocation().getWorld().playSound(target.getLocation(), Sound.SPLASH, 1, 2); getSlime().getEvent().getDamageManager().NewDamageEvent(target, getSlime().getEntity(), null,