Fix hub clock again...
This commit is contained in:
parent
a8077aae15
commit
99bb64c6c8
@ -674,17 +674,10 @@ public class SpeedBuilders extends SoloGame
|
|||||||
|
|
||||||
Manager.runSyncLater(() ->
|
Manager.runSyncLater(() ->
|
||||||
{
|
{
|
||||||
if (!IsLive())
|
if (!IsLive() || !_buildRecreations.containsKey(player) || _perfectBuild.containsKey(player))
|
||||||
return;
|
{
|
||||||
|
|
||||||
if (_state != SpeedBuildersState.BUILDING)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!_buildRecreations.containsKey(player))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (_perfectBuild.containsKey(player))
|
|
||||||
return;
|
return;
|
||||||
|
};
|
||||||
|
|
||||||
if (_buildRecreations.get(player).calculateScoreFromBuild(_currentBuild) == _currentBuild.getPerfectScore())
|
if (_buildRecreations.get(player).calculateScoreFromBuild(_currentBuild) == _currentBuild.getPerfectScore())
|
||||||
{
|
{
|
||||||
@ -876,8 +869,6 @@ public class SpeedBuilders extends SoloGame
|
|||||||
//Sometimes it stops on 0.1 and has one bar green
|
//Sometimes it stops on 0.1 and has one bar green
|
||||||
UtilTextBottom.displayProgress("Time Left:", 0, UtilTime.MakeStr(0), UtilServer.getPlayers());
|
UtilTextBottom.displayProgress("Time Left:", 0, UtilTime.MakeStr(0), UtilServer.getPlayers());
|
||||||
|
|
||||||
for (Player player : GetPlayers(true))
|
|
||||||
|
|
||||||
if (_allPerfect)
|
if (_allPerfect)
|
||||||
{
|
{
|
||||||
UtilTextMiddle.display("", C.cAqua + GUARDIAN_NAME + " is Impressed!", 0, 100, 10);
|
UtilTextMiddle.display("", C.cAqua + GUARDIAN_NAME + " is Impressed!", 0, 100, 10);
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package nautilus.game.arcade.managers;
|
package nautilus.game.arcade.managers;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
@ -14,7 +13,7 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
import mineplex.core.common.util.C;
|
import mineplex.core.common.util.C;
|
||||||
import mineplex.core.common.util.F;
|
import mineplex.core.common.util.F;
|
||||||
import mineplex.core.common.util.UtilServer;
|
import mineplex.core.common.util.UtilServer;
|
||||||
import mineplex.core.itemstack.ItemStackFactory;
|
import mineplex.core.itemstack.ItemBuilder;
|
||||||
import mineplex.core.portal.GenericServer;
|
import mineplex.core.portal.GenericServer;
|
||||||
import mineplex.core.portal.Intent;
|
import mineplex.core.portal.Intent;
|
||||||
import mineplex.core.recharge.Recharge;
|
import mineplex.core.recharge.Recharge;
|
||||||
@ -30,9 +29,10 @@ public class HubClockManager implements Listener
|
|||||||
{
|
{
|
||||||
|
|
||||||
private static final int HUB_CLOCK_SLOT = 8;
|
private static final int HUB_CLOCK_SLOT = 8;
|
||||||
private static final ItemStack HUB_CLOCK_ITEM = ItemStackFactory.Instance.CreateStack(Material.WATCH, (byte) 0, 1, (short) 0,
|
private static final ItemStack HUB_CLOCK_ITEM = new ItemBuilder(Material.WATCH)
|
||||||
C.cGreen + "Return to Hub",
|
.setTitle(C.cGreen + "Return to Hub")
|
||||||
new String[]{"", ChatColor.RESET + "Click while holding this", ChatColor.RESET + "to return to the Hub."});
|
.addLore("", C.Reset + "Click while holding this", C.Reset + "to return to the Hub.")
|
||||||
|
.build();
|
||||||
|
|
||||||
private final ArcadeManager _manager;
|
private final ArcadeManager _manager;
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ public class HubClockManager implements Listener
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void giveOnNextLobby(GameStateChangeEvent event)
|
public void giveOnNextLobby(GameStateChangeEvent event)
|
||||||
{
|
{
|
||||||
if (event.GetState() != GameState.Recruit || !canGiveClock())
|
if (event.GetState() != GameState.Recruit && event.GetState() != GameState.Dead || !canGiveClock())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user