Merge branch 'master' of ssh://184.154.0.242:7999/min/Mineplex

This commit is contained in:
Jonathan Williams 2014-11-07 16:09:05 -08:00
commit c310ba734b
3 changed files with 7 additions and 17 deletions

View File

@ -125,8 +125,6 @@ public class Draw extends SoloGame
new KeenEyeStatTracker(this),
new PureLuckStatTracker(this)
);
getArcadeManager().getIdleManager().setEnabled(false);
}
@Override

View File

@ -1255,6 +1255,12 @@ public class UHC extends TeamGame
Manager.GetPortal().SendPlayerToServer(player, "Lobby");
}
}
@Override
public boolean CanJoinTeam(GameTeam team)
{
return team.GetSize() < 2;
}
//Ensure 2 players per team
@Override

View File

@ -27,7 +27,6 @@ public class IdleManager implements Listener
private final Map<Player, Float> _yaw = new HashMap<>();
private final Map<Player, Long> _idle = new HashMap<>();
private final Map<Player, Integer> _beep = new HashMap<>();
private boolean _enabled = true;
public IdleManager(ArcadeManager manager)
{
@ -39,7 +38,7 @@ public class IdleManager implements Listener
@EventHandler
public void ChatIdle(final AsyncPlayerChatEvent event)
{
if (!isEnabled())
if (!getArcadeManager().IsPlayerKickIdle())
return;
Bukkit.getServer().getScheduler().runTaskLater(getArcadeManager().GetPlugin(), new Runnable()
@ -55,9 +54,6 @@ public class IdleManager implements Listener
@EventHandler
public void kickIdlePlayers(UpdateEvent event)
{
if (!isEnabled())
return;
if (event.getType() != UpdateType.FAST)
return;
@ -133,16 +129,6 @@ public class IdleManager implements Listener
_beep.remove(event.getPlayer());
}
public boolean isEnabled()
{
return _enabled;
}
public void setEnabled(boolean enabled)
{
_enabled = enabled;
}
public ArcadeManager getArcadeManager()
{
return _arcadeManager;