More flags have been changed to use the new Game Options. WHY IS NOTHING BREAKING!? Not that I'm complaining. Just really confused...
This commit is contained in:
parent
b5d3a6b8c3
commit
0246ec275e
@ -161,27 +161,29 @@ public abstract class Game implements Listener
|
||||
protected String[] _help;
|
||||
|
||||
// Gameplay Flags
|
||||
public long GameTimeout = 1200000;
|
||||
//public GameOptionLong GameTimeout = new GameOptionLong(1200000, "Game Timeout", "Allotted time for game mode");
|
||||
|
||||
//Note: If any descriptions are inaccurate, feel free to let me know and/or fix them. Thanks. ~Joe Prezioso
|
||||
public GameOptionLong GameTimeout = new GameOptionLong(1200000, "Game Timeout", "Allotted time for game mode");
|
||||
|
||||
public boolean Damage = true;
|
||||
public boolean DamagePvP = true;
|
||||
public boolean DamagePvE = true;
|
||||
public boolean DamageEvP = true;
|
||||
public boolean DamageSelf = true;
|
||||
public boolean DamageFall = true;
|
||||
public boolean DamageTeamSelf = false;
|
||||
public boolean DamageTeamOther = true;
|
||||
public GameOptionBoolean Damage new GameOptionBoolean(true, "Damage", "Does damage matter in this game mode?");
|
||||
public GameOptionBoolean DamagePvP = new GameOptionBoolean(true, "Damage PVP", "Players allowed to damage other players?");
|
||||
public GameOptionBoolean DamagePvE = new GameOptionBoolean(true, "Damage PVE", "Players allowed to damage monsters?");
|
||||
public GameOptionBoolean DamageEvP = new GameOptionBoolean(true, "Damage EVP", "Monsters allowed to damage players?");
|
||||
public GameOptionBoolean DamageSelf = new GameOptionBoolean(true, "Damage Self", "Players allowed to harm themselves?");
|
||||
public GameOptionBoolean DamageFall = new GameOptionBoolean(true, "Damage Fall", "Can players be harmed by falling?");
|
||||
public GameOptionBoolean DamageTeamSelf = new GameOptionBoolean(false, "Damage Team, Self", "Can players damage teammates?");
|
||||
public GameOptionBoolean DamageTeamOther = new GameOptionBoolean(true, "Damage Team, Other", "Can players damage opposing team's players?");
|
||||
|
||||
public boolean BlockBreak = false;
|
||||
public boolean BlockBreakCreative = false;
|
||||
public HashSet<Integer> BlockBreakAllow = new HashSet<Integer>();
|
||||
public HashSet<Integer> BlockBreakDeny = new HashSet<Integer>();
|
||||
public GameOptionBoolean BlockBreak = new GameOptionBoolean(false, "Block Break", "Can players break blocks?");
|
||||
//Really not sure about the description for this one...
|
||||
public GameOptionBoolean BlockBreakCreative = newGameOptionBoolean(false, "Block Break, Creative", "Can players break blocks in creative mode?");
|
||||
public GameOptionHashInt BlockBreakAllow = new GameOptionHashInt(new HashSet<Integer>(), "Block Break Allow", "Set of blocks players can break");
|
||||
public GameOptionHashInt BlockBreakDeny = new GameOptionHashInt(new HashSet<Integer>(), "Block Break Deny", "Set of blocks players can't break");
|
||||
|
||||
public boolean BlockPlace = false;
|
||||
public boolean BlockPlaceCreative = false;
|
||||
public HashSet<Integer> BlockPlaceAllow = new HashSet<Integer>();
|
||||
public HashSet<Integer> BlockPlaceDeny = new HashSet<Integer>();
|
||||
public GameOptionBoolean BlockPlace = new GameOptionBoolean(false, "Block Place", "Can players place blocks?");
|
||||
public GameOptionBoolean BlockPlaceCreative = new GameOptionBoolean(false, "Block Place, Creative", "Can players place blocks in creative mode?");
|
||||
public GameOptionHashInt BlockPlaceAllow = new GameOptionHashInt(new HashSet<Integer>(), "Block Place Allow", "Set of blocks players can place");
|
||||
public GameOptionHashInt BlockPlaceDeny = new GameOptionHashInt(new HashSet<Integer>(), "Block Place Deny", "Set of blocks players cannot place");
|
||||
|
||||
public boolean ItemPickup = false;
|
||||
public HashSet<Integer> ItemPickupAllow = new HashSet<Integer>();
|
||||
|
@ -12,12 +12,12 @@ public class GameOptionDouble extends GameOption
|
||||
_optionDouble = optDouble;
|
||||
}
|
||||
|
||||
public double GetOptionSetting()
|
||||
public double GetOption()
|
||||
{
|
||||
return _optionDouble;
|
||||
}
|
||||
|
||||
public void SetOptionSetting(double newOptionSetting)
|
||||
public void SetOption(double newOptionSetting)
|
||||
{
|
||||
_optionDouble = newOptionSetting;
|
||||
}
|
||||
|
@ -14,12 +14,12 @@ public class GameOptionHashInt extends GameOption
|
||||
_optionHash = optHash;
|
||||
}
|
||||
|
||||
public HashSet<Integer> GetOptionSetting()
|
||||
public HashSet<Integer> GetOption()
|
||||
{
|
||||
return _optionHash;
|
||||
}
|
||||
|
||||
public void SetOptionSetting(HashSet<Integer> optHash)
|
||||
public void SetOption(HashSet<Integer> optHash)
|
||||
{
|
||||
_optionHash = optHash;
|
||||
}
|
||||
|
@ -12,12 +12,12 @@ public class GameOptionInteger extends GameOption
|
||||
_optionInt = optInt;
|
||||
}
|
||||
|
||||
public int GetOptionSetting()
|
||||
public int GetOption()
|
||||
{
|
||||
return _optionInt;
|
||||
}
|
||||
|
||||
public void SetOptionSetting(int newOptionSetting)
|
||||
public void SetOption(int newOptionSetting)
|
||||
{
|
||||
_optionInt = newOptionSetting;
|
||||
}
|
||||
|
@ -12,12 +12,12 @@ public class GameOptionLong extends GameOption
|
||||
_optionLong = optLong;
|
||||
}
|
||||
|
||||
public long GetOptionSetting()
|
||||
public long GetOption()
|
||||
{
|
||||
return _optionLong;
|
||||
}
|
||||
|
||||
public void SetOptionSetting(long newOptionSetting)
|
||||
public void SetOption(long newOptionSetting)
|
||||
{
|
||||
_optionLong = newOptionSetting;
|
||||
}
|
||||
|
@ -175,7 +175,7 @@ public class Bridge extends TeamGame implements OreObsfucation
|
||||
_ore = new OreHider();
|
||||
|
||||
// Flags
|
||||
GameTimeout = Manager.IsTournamentServer() ? 5400000 : 3600000;
|
||||
GameTimeout.setOption(Manager.IsTournamentServer() ? 5400000 : 3600000);
|
||||
|
||||
Manager.GetExplosion().SetLiquidDamage(false);
|
||||
|
||||
|
@ -155,7 +155,7 @@ public abstract class Skywars extends Game
|
||||
|
||||
StrictAntiHack = true;
|
||||
|
||||
GameTimeout = 1500000L;
|
||||
GameTimeout.SetOption(1500000L);
|
||||
|
||||
DeathDropItems = true;
|
||||
|
||||
|
@ -192,7 +192,7 @@ public abstract class SurvivalGames extends Game
|
||||
|
||||
this.ReplaceTeamsWithKits = true;
|
||||
|
||||
GameTimeout = 1500000;
|
||||
GameTimeout.setOption(1500000);
|
||||
|
||||
QuitDropItems = true;
|
||||
|
||||
|
@ -172,7 +172,7 @@ public class SurvivalGamesTeams extends TeamGame
|
||||
setItemMerge(true);
|
||||
// Manager.GetAntiStack().SetEnabled(false);
|
||||
|
||||
this.GameTimeout = 9600000;
|
||||
this.GameTimeout.setOption(9600000);
|
||||
|
||||
this.WorldTimeSet = 0;
|
||||
this.WorldBoundaryKill = false;
|
||||
|
@ -388,7 +388,7 @@ public class GameManager implements Listener
|
||||
}
|
||||
else if (game.GetState() == GameState.Live)
|
||||
{
|
||||
if (game.GameTimeout != -1 && UtilTime.elapsed(game.GetStateTime(), game.GameTimeout) && Manager.IsGameTimeout())
|
||||
if (game.GameTimeout.GetOption() != -1 && UtilTime.elapsed(game.GetStateTime(), game.GameTimeout.GetOption()) && Manager.IsGameTimeout())
|
||||
{
|
||||
game.HandleTimeout();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user