Made tournament changes:

Staff can't see team chat
Bridge tournament time is 90 min
Kits are not all free
Removed twitch charity text/motd
If team not picked, you go to spec.
This commit is contained in:
Jonathan Williams 2014-07-25 23:38:21 -07:00
parent d6e06f4556
commit 12b42cad29
6 changed files with 27 additions and 39 deletions

View File

@ -132,6 +132,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
if (serverConfig.Tournament)
{
AntiHack.Instance.SetEnabled(false);
Bukkit.getServer().setWhitelist(true);
}
//Modules
@ -420,12 +421,6 @@ public class ArcadeManager extends MiniPlugin implements IRelation
@EventHandler
public void MessageMOTD(ServerListPingEvent event)
{
if (this.IsTournamentServer())
{
event.setMotd(ChatColor.RED + "Twitch.tv "+ ChatColor.YELLOW + "Charity Event");
return;
}
String extrainformation = "|" + _serverConfig.ServerType + "|" + (_game == null ? "Unknown" : _game.GetName()) + "|" + ((_game == null || _game.WorldData == null) ? "Unknown" : _game.WorldData.MapName);
if (_game == null || _game.GetState() == GameState.Recruit)
@ -496,6 +491,26 @@ public class ArcadeManager extends MiniPlugin implements IRelation
@EventHandler
public void Login(PlayerLoginEvent event)
{
if (Bukkit.getServer().hasWhitelist())
{
if (_clientManager.Get(event.getPlayer().getName()).GetRank().Has(event.getPlayer(), Rank.MODERATOR, false))
{
event.allow();
event.setResult(PlayerLoginEvent.Result.ALLOWED);
if (_serverConfig.Tournament)
{
event.getPlayer().setOp(true);
}
}
else
{
event.disallow(PlayerLoginEvent.Result.KICK_OTHER, "Server Whitelisted!");
}
return;
}
// Reserved Slot Check
if (Bukkit.getOnlinePlayers().length >= Bukkit.getServer().getMaxPlayers())
{
@ -512,6 +527,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
{
event.allow();
event.setResult(PlayerLoginEvent.Result.ALLOWED);
return;
}

View File

@ -130,7 +130,7 @@ public class Bridge extends TeamGame implements OreObsfucation
_ore = new OreHider();
// Flags
GameTimeout = 96000000;
GameTimeout = Manager.IsTournamentServer() ? 5400000 : 1800000;
DamageSelf = true;

View File

@ -50,12 +50,6 @@ public abstract class Kit implements Listener
_kitAvailability = kitAvailability;
//Change to Free
if (Manager.IsTournamentServer() && (kitAvailability == KitAvailability.Green || kitAvailability == KitAvailability.Blue))
{
_kitAvailability = KitAvailability.Free;
}
_entityType = entityType;
_itemInHand = itemInHand;

View File

@ -104,7 +104,7 @@ public class GameChatManager implements Listener
{
Player receiver = recipientIterator.next();
if (Manager.GetClients().Get(receiver).GetRank().Has(Rank.MODERATOR))
if (!Manager.GetServerConfig().Tournament && Manager.GetClients().Get(receiver).GetRank().Has(Rank.MODERATOR))
continue;
GameTeam recTeam = Manager.GetGame().GetTeam(receiver);

View File

@ -708,28 +708,6 @@ public class GameLobbyManager implements IPacketRunnable, Listener
return;
}
if (Manager.IsTournamentServer())
{
if (_advertiseStage == 0)
{
WriteAdvertiseLine("TWITCH.TV", 0, 159, (byte)4);
WriteAdvertiseLine("CHARITY EVENT", 1, 159, (byte)15);
WriteAdvertiseLine(" ", 2, 159, (byte)15);
WriteAdvertiseLine("PROUDLY SPONSORED BY", 3, 159, (byte)15);
WriteAdvertiseLine("www.mineplex.com", 4, 159, (byte)4);
}
else if (_advertiseStage == 1)
{
WriteAdvertiseLine("Supporting", 0, 159, (byte)15);
WriteAdvertiseLine("ChildsPlay", 1, 159, (byte)4);
WriteAdvertiseLine("AbleGamers", 2, 159, (byte)4);
WriteAdvertiseLine("Extra Life", 3, 159, (byte)4);
WriteAdvertiseLine("Stand for the Silent", 4, 159, (byte)4);
}
return;
}
if (_advertiseStage == 0)
{
WriteAdvertiseLine("MINEPLEX ULTRA RANK", 0, 159, (byte)4);

View File

@ -147,7 +147,7 @@ public class GameManager implements Listener
}
}
}
else if (game.GetState() == GameState.Live && !Manager.IsTournamentServer())
else if (game.GetState() == GameState.Live)
{
if (UtilTime.elapsed(game.GetStateTime(), game.GameTimeout))
{
@ -399,7 +399,7 @@ public class GameManager implements Listener
{
}
else if (!game.IsPlaying(player))
else if (!game.IsPlaying(player) && !Manager.IsTournamentServer())
{
PlayerAdd(game, player, null);
}