If an MPS and there's no team balaning, put players on teams instantly

This commit is contained in:
Sam 2018-07-07 15:19:19 +01:00 committed by Alexander Meech
parent babece3b21
commit 4d872389cd
2 changed files with 11 additions and 1 deletions

View File

@ -507,7 +507,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
.recalculate(); .recalculate();
scoreboard.get(ArcadeScoreboardLine.PLAYERS_NAME).write(C.cYellowB + "Players"); scoreboard.get(ArcadeScoreboardLine.PLAYERS_NAME).write(C.cYellowB + "Players");
scoreboard.get(ArcadeScoreboardLine.KIT_NAME).write(C.cGrayB + "Kit"); scoreboard.get(ArcadeScoreboardLine.KIT_NAME).write(C.cGoldB + "Kit");
scoreboard.get(ArcadeScoreboardLine.SERVER_NAME).write(C.cAquaB + "Server"); scoreboard.get(ArcadeScoreboardLine.SERVER_NAME).write(C.cAquaB + "Server");
scoreboard.get(ArcadeScoreboardLine.SERVER_VALUE).write(UtilServer.getServerName()); scoreboard.get(ArcadeScoreboardLine.SERVER_VALUE).write(UtilServer.getServerName());
} }

View File

@ -17,6 +17,7 @@ import mineplex.core.common.util.UtilPlayer;
import mineplex.core.friend.FriendManager; import mineplex.core.friend.FriendManager;
import mineplex.core.party.Party; import mineplex.core.party.Party;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.events.GameStateChangeEvent; import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.Game; import nautilus.game.arcade.game.Game;
import nautilus.game.arcade.game.Game.GameState; import nautilus.game.arcade.game.Game.GameState;
@ -209,6 +210,15 @@ public class GameTeamModule extends Module
public void addPlayerQueue(Player player, GameTeam team) public void addPlayerQueue(Player player, GameTeam team)
{ {
ArcadeManager manager = getGame().getArcadeManager();
// Is MPS and No team balancing
if (manager.GetGameHostManager().isPrivateServer() && !manager.IsTeamBalance())
{
getGame().SetPlayerTeam(player, team, true);
return;
}
GameTeam previous = _preferences.put(player, team); GameTeam previous = _preferences.put(player, team);
if (team.equals(previous)) if (team.equals(previous))