All errors have been fixed.
This commit is contained in:
parent
262c6c2fa6
commit
05ede7910e
@ -165,7 +165,7 @@ public abstract class Game implements Listener
|
||||
//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 GameOptionBoolean Damage new GameOptionBoolean(true, "Damage", "Does damage matter in this game mode?");
|
||||
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?");
|
||||
@ -176,7 +176,7 @@ public abstract class Game implements Listener
|
||||
|
||||
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 GameOptionBoolean BlockBreakCreative = new GameOptionBoolean(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");
|
||||
|
||||
@ -232,12 +232,12 @@ public abstract class Game implements Listener
|
||||
|
||||
public GameOptionBoolean PrepareFreeze = new GameOptionBoolean(true, "Prepare Freeze", "Freeze game while preparations are made?");
|
||||
|
||||
private GameOptionDouble _itemMergeRadius = new GameOptionBoolean(0, "Item Merge Radius", "Distance at which items merge");
|
||||
private GameOptionDouble _itemMergeRadius = new GameOptionDouble(0, "Item Merge Radius", "Distance at which items merge");
|
||||
|
||||
//really not sure what the descriptions should be for announcements ~JP
|
||||
public GameOptionBoolean AnnounceStay = new GameOptionBoolean(true, "Announce Stay", "Send message to announce player is staying?");
|
||||
public GameOptionBoolean AnnounceJoinQuit = new GameOptionBoolean(true, "Announce Join Quit", "Send message to announce player has quit?");
|
||||
public GameOptionBoolean AnnounceSilence = new GameOptionBoolean(true, "Announce Silence", "Silence all announcements?";
|
||||
public GameOptionBoolean AnnounceSilence = new GameOptionBoolean(true, "Announce Silence", "Silence all announcements?");
|
||||
|
||||
public GameOptionBoolean DisplayLobbySide = new GameOptionBoolean(true, "Display Lobby Side", "Show which side players are on in lobby?");
|
||||
|
||||
@ -1054,10 +1054,10 @@ public abstract class Game implements Listener
|
||||
|
||||
public DeathMessageType GetDeathMessageType()
|
||||
{
|
||||
if (!DeathMessages)
|
||||
if (!DeathMessages.GetOption())
|
||||
return DeathMessageType.None;
|
||||
|
||||
if (this.DeathOut)
|
||||
if (this.DeathOut.GetOption())
|
||||
return DeathMessageType.Detailed;
|
||||
|
||||
return DeathMessageType.Simple;
|
||||
@ -1127,7 +1127,7 @@ public abstract class Game implements Listener
|
||||
for (Player player : UtilServer.getPlayers())
|
||||
AnnounceGame(player);
|
||||
|
||||
if (AnnounceSilence)
|
||||
if (AnnounceSilence.GetOption())
|
||||
Manager.GetChat().Silence(PrepareTime, false);
|
||||
}
|
||||
|
||||
@ -1212,7 +1212,7 @@ public abstract class Game implements Listener
|
||||
|
||||
UtilTextMiddle.display(winnerText, subColor + "won the game", 20, 120, 20);
|
||||
|
||||
if (AnnounceSilence)
|
||||
if (AnnounceSilence.GetOption())
|
||||
Manager.GetChat().Silence(5000, false);
|
||||
}
|
||||
|
||||
@ -1269,7 +1269,7 @@ public abstract class Game implements Listener
|
||||
|
||||
UtilTextMiddle.display(winnerText, subColor + "won the game", 20, 120, 20);
|
||||
|
||||
if (AnnounceSilence)
|
||||
if (AnnounceSilence.GetOption())
|
||||
Manager.GetChat().Silence(5000, false);
|
||||
}
|
||||
|
||||
@ -1490,7 +1490,7 @@ public abstract class Game implements Listener
|
||||
@EventHandler
|
||||
public void classCombatCreatureAllow(ClassCombatCreatureAllowSpawnEvent event)
|
||||
{
|
||||
CreatureAllowOverride = event.getAllowed();
|
||||
CreatureAllowOverride.SetOption(event.getAllowed());
|
||||
}
|
||||
|
||||
public boolean isInsideMap(Player player)
|
||||
@ -1511,17 +1511,17 @@ public abstract class Game implements Listener
|
||||
|
||||
public void setItemMergeRadius(double mergeRadius)
|
||||
{
|
||||
_itemMergeRadius = mergeRadius;
|
||||
_itemMergeRadius.SetOption(mergeRadius);
|
||||
|
||||
if (WorldData.World != null)
|
||||
{
|
||||
((CraftWorld) WorldData.World).getHandle().spigotConfig.itemMerge = _itemMergeRadius;
|
||||
((CraftWorld) WorldData.World).getHandle().spigotConfig.itemMerge = _itemMergeRadius.GetOption();
|
||||
}
|
||||
}
|
||||
|
||||
public double getItemMergeRadius()
|
||||
{
|
||||
return _itemMergeRadius;
|
||||
return _itemMergeRadius.GetOption();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@ -1530,7 +1530,7 @@ public abstract class Game implements Listener
|
||||
if (event.getWorld().getName().equals(WorldData.GetFolder()))
|
||||
{
|
||||
System.out.println("Setting item merge radius for game to " + _itemMergeRadius);
|
||||
((CraftWorld) event.getWorld()).getHandle().spigotConfig.itemMerge = _itemMergeRadius;
|
||||
((CraftWorld) event.getWorld()).getHandle().spigotConfig.itemMerge = _itemMergeRadius.GetOption();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -132,7 +132,7 @@ public class GameTeam
|
||||
public Location GetSpawn()
|
||||
{
|
||||
//Keep allies together
|
||||
if (!Host.IsLive() && Host.SpawnNearAllies)
|
||||
if (!Host.IsLive() && Host.SpawnNearAllies.GetOption())
|
||||
{
|
||||
//Find Location Nearest Ally
|
||||
Location loc = UtilAlg.getLocationNearPlayers(_spawns, GetPlayers(true), Host.GetPlayers(true));
|
||||
@ -142,7 +142,7 @@ public class GameTeam
|
||||
//No allies existed spawned yet
|
||||
|
||||
//Spawn near enemies (used for SG)
|
||||
if (Host.SpawnNearEnemies)
|
||||
if (Host.SpawnNearEnemies.GetOption())
|
||||
{
|
||||
loc = UtilAlg.getLocationNearPlayers(_spawns, Host.GetPlayers(true), Host.GetPlayers(true));
|
||||
if (loc != null)
|
||||
@ -159,7 +159,7 @@ public class GameTeam
|
||||
else
|
||||
{
|
||||
//Spawn near players
|
||||
if (Host.SpawnNearEnemies)
|
||||
if (Host.SpawnNearEnemies.GetOption())
|
||||
{
|
||||
Location loc = UtilAlg.getLocationNearPlayers(_spawns, Host.GetPlayers(true), Host.GetPlayers(true));
|
||||
if (loc != null)
|
||||
|
@ -76,7 +76,7 @@ public abstract class TeamGame extends Game
|
||||
if (player.getWorld().getName().equalsIgnoreCase("world"))
|
||||
return;
|
||||
|
||||
if (!QuitOut)
|
||||
if (!QuitOut.GetOption())
|
||||
{
|
||||
//Store
|
||||
_rejoinTime.put(player.getName(), System.currentTimeMillis());
|
||||
@ -97,7 +97,7 @@ public abstract class TeamGame extends Game
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void PlayerLoginAllow(PlayerLoginEvent event)
|
||||
{
|
||||
if (!InProgress() || QuitOut)
|
||||
if (!InProgress() || QuitOut.GetOption())
|
||||
return;
|
||||
|
||||
//Rejoined
|
||||
@ -135,7 +135,7 @@ public abstract class TeamGame extends Game
|
||||
@EventHandler
|
||||
public void playerRejoinGame(PlayerJoinEvent event)
|
||||
{
|
||||
if (!InProgress() || QuitOut)
|
||||
if (!InProgress() || QuitOut.GetOption())
|
||||
return;
|
||||
|
||||
Player player = event.getPlayer();
|
||||
@ -150,7 +150,7 @@ public abstract class TeamGame extends Game
|
||||
@EventHandler
|
||||
public void PlayerRejoinExpire(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.SEC || QuitOut)
|
||||
if (event.getType() != UpdateType.SEC || QuitOut.GetOption())
|
||||
return;
|
||||
|
||||
Iterator<String> rejoinIterator = _rejoinTime.keySet().iterator();
|
||||
@ -177,7 +177,7 @@ public abstract class TeamGame extends Game
|
||||
@EventHandler
|
||||
public void RejoinCommand(PlayerCommandPreprocessEvent event)
|
||||
{
|
||||
if (!QuitOut && event.getPlayer().isOp() && event.getMessage().startsWith("/allowrejoin"))
|
||||
if (!QuitOut.GetOption() && event.getPlayer().isOp() && event.getMessage().startsWith("/allowrejoin"))
|
||||
{
|
||||
String[] toks = event.getMessage().split(" ");
|
||||
|
||||
@ -206,7 +206,7 @@ public abstract class TeamGame extends Game
|
||||
if (team.GetPlayers(true).size() > 0)
|
||||
teamsAlive.add(team);
|
||||
|
||||
if (!QuitOut)
|
||||
if (!QuitOut.GetOption())
|
||||
{
|
||||
//Offline Player Team
|
||||
for (GameTeam team : RejoinTeam.values())
|
||||
|
@ -54,13 +54,13 @@ public class KitMamaPig extends Kit
|
||||
disguise.setCustomNameVisible(false);
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
|
||||
Manager.GetGame().CreatureAllowOverride = true;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(true);
|
||||
final Pig pig = player.getWorld().spawn(player.getEyeLocation(), Pig.class);
|
||||
pig.setBaby();
|
||||
pig.setAgeLock(true);
|
||||
pig.setCustomName(C.cYellow + player.getName());
|
||||
pig.setCustomNameVisible(false);
|
||||
Manager.GetGame().CreatureAllowOverride = false;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(false);
|
||||
|
||||
player.setPassenger(pig);
|
||||
|
||||
|
@ -46,7 +46,7 @@ public class Sleigh
|
||||
{
|
||||
Host = host;
|
||||
|
||||
Host.CreatureAllowOverride = true;
|
||||
Host.CreatureAllowOverride.SetOption(true);
|
||||
|
||||
Target = loc.clone();
|
||||
|
||||
|
@ -44,9 +44,9 @@ public class PumpkinKing
|
||||
|
||||
_grid = grid;
|
||||
|
||||
Host.Host.CreatureAllowOverride = true;
|
||||
Host.Host.CreatureAllowOverride.SetOption(true);
|
||||
_ent = loc.getWorld().spawn(loc, Skeleton.class);
|
||||
Host.Host.CreatureAllowOverride = false;
|
||||
Host.Host.CreatureAllowOverride.SetOption(false);
|
||||
UtilEnt.Vegetate(_ent);
|
||||
UtilEnt.ghost(_ent, true, false);
|
||||
|
||||
|
@ -43,7 +43,7 @@ public class SnowmanBoss
|
||||
_minions = new ArrayList<SnowmanMinion>();
|
||||
|
||||
//Spawn
|
||||
Host.CreatureAllowOverride = true;
|
||||
Host.CreatureAllowOverride.SetOption(true);
|
||||
|
||||
for (int i=0 ; i<14 ; i++)
|
||||
_minions.add(new SnowmanMinion(_spawn.getWorld().spawn(_spawn, Snowman.class)));
|
||||
@ -53,7 +53,7 @@ public class SnowmanBoss
|
||||
_heart.setHealth(1400);
|
||||
UtilEnt.Vegetate(_heart);
|
||||
|
||||
Host.CreatureAllowOverride = false;
|
||||
Host.CreatureAllowOverride.SetOption(false);
|
||||
|
||||
//Stack
|
||||
Entity base = null;
|
||||
|
@ -258,9 +258,9 @@ public class SnowmanMaze
|
||||
{
|
||||
Location loc = UtilAlg.Random(_spawns);
|
||||
|
||||
Host.CreatureAllowOverride = true;
|
||||
Host.CreatureAllowOverride.SetOption(true);
|
||||
Snowman ent = loc.getWorld().spawn(loc, Snowman.class);
|
||||
Host.CreatureAllowOverride = false;
|
||||
Host.CreatureAllowOverride.SetOption(false);
|
||||
|
||||
UtilEnt.Vegetate(ent);
|
||||
UtilEnt.ghost(ent, true, false);
|
||||
|
@ -93,9 +93,9 @@ public class SnowmanWaveA
|
||||
continue;
|
||||
|
||||
Location loc = _spawns.get(i);
|
||||
Host.CreatureAllowOverride = true;
|
||||
Host.CreatureAllowOverride.SetOption(true);
|
||||
Snowman ent = loc.getWorld().spawn(loc, Snowman.class);
|
||||
Host.CreatureAllowOverride = false;
|
||||
Host.CreatureAllowOverride.SetOption(false);
|
||||
UtilEnt.Vegetate(ent);
|
||||
UtilEnt.ghost(ent, true, false);
|
||||
_ents.add(ent);
|
||||
|
@ -90,9 +90,9 @@ public class SnowmanWaveB
|
||||
_lastPositions.add(i);
|
||||
|
||||
Location loc = _spawns.get(i);
|
||||
Host.CreatureAllowOverride = true;
|
||||
Host.CreatureAllowOverride.SetOption(true);
|
||||
Snowman ent = loc.getWorld().spawn(loc, Snowman.class);
|
||||
Host.CreatureAllowOverride = false;
|
||||
Host.CreatureAllowOverride.SetOption(false);
|
||||
UtilEnt.Vegetate(ent);
|
||||
UtilEnt.ghost(ent, true, false);
|
||||
_ents.add(ent);
|
||||
|
@ -71,9 +71,9 @@ public abstract class Part implements Listener
|
||||
Location standLoc = loc.clone().add(0, -1.45, 0);
|
||||
standLoc.setYaw(UtilMath.r(100));
|
||||
|
||||
Host.CreatureAllowOverride = true;
|
||||
Host.CreatureAllowOverride.SetOption(true);
|
||||
ArmorStand stand = loc.getWorld().spawn(standLoc, ArmorStand.class);
|
||||
Host.CreatureAllowOverride = false;
|
||||
Host.CreatureAllowOverride.SetOption(false);
|
||||
|
||||
stand.setVisible(false);
|
||||
stand.setGravity(false);
|
||||
|
@ -118,11 +118,11 @@ public class Part1 extends Part
|
||||
//Create
|
||||
Location loc = UtilAlg.Random(_skeletons);
|
||||
|
||||
Host.CreatureAllowOverride = true;
|
||||
Host.CreatureAllowOverride.SetOption(true);
|
||||
Skeleton skel = loc.getWorld().spawn(loc, Skeleton.class);
|
||||
skel.getEquipment().setItemInHand(new ItemStack(Material.WOOD_HOE));
|
||||
skel.setHealth(4);
|
||||
Host.CreatureAllowOverride = false;
|
||||
Host.CreatureAllowOverride.SetOption(false);
|
||||
|
||||
this.AddCreature(skel);
|
||||
}
|
||||
|
@ -127,9 +127,9 @@ public class Part2 extends Part
|
||||
//Create
|
||||
Location loc = UtilAlg.Random(_spiders);
|
||||
|
||||
Host.CreatureAllowOverride = true;
|
||||
Host.CreatureAllowOverride.SetOption(true);
|
||||
Skeleton ent = loc.getWorld().spawn(loc, Skeleton.class);
|
||||
Host.CreatureAllowOverride = false;
|
||||
Host.CreatureAllowOverride.SetOption(false);
|
||||
DisguiseSpider disguise = new DisguiseSpider(ent);
|
||||
Host.Manager.GetDisguise().disguise(disguise);
|
||||
|
||||
|
@ -179,9 +179,9 @@ public class Part4 extends Part
|
||||
//Create
|
||||
Location loc = UtilAlg.Random(_mobSpawns);
|
||||
|
||||
Host.CreatureAllowOverride = true;
|
||||
Host.CreatureAllowOverride.SetOption(true);
|
||||
Zombie ent = loc.getWorld().spawn(loc, Zombie.class);
|
||||
Host.CreatureAllowOverride = false;
|
||||
Host.CreatureAllowOverride.SetOption(false);
|
||||
|
||||
ent.getEquipment().setItemInHand(new ItemStack(Material.WOOD_PICKAXE));
|
||||
ent.getEquipment().setChestplate(new ItemStack(Material.LEATHER_CHESTPLATE));
|
||||
|
@ -74,9 +74,9 @@ public class TeamDeathmatch extends TeamGame
|
||||
|
||||
});
|
||||
|
||||
this.DeathOut = true;
|
||||
this.HungerSet = 20;
|
||||
this.WorldTimeSet = 2000;
|
||||
this.DeathOut.SetOption(true);
|
||||
this.HungerSet.SetOption(20);
|
||||
this.WorldTimeSet.SetOption(2000);
|
||||
this.CompassEnabled = true;
|
||||
|
||||
this.Manager.GetDamage().UseSimpleWeaponDamage = false;
|
||||
|
@ -303,28 +303,28 @@ public class EventModule extends MiniPlugin
|
||||
//XXX Settings
|
||||
else if (event.getMessage().toLowerCase().equals("/e damage all"))
|
||||
{
|
||||
Manager.GetGame().Damage = !Manager.GetGame().Damage;
|
||||
Manager.GetGame().Announce(F.main("Event Settings", F.value("Damage All", F.tf(Manager.GetGame().Damage))));
|
||||
Manager.GetGame().Damage.SetOption(!Manager.GetGame().Damage.GetOption());
|
||||
Manager.GetGame().Announce(F.main("Event Settings", F.value("Damage All", F.tf(Manager.GetGame().Damage.GetOption()))));
|
||||
}
|
||||
else if (event.getMessage().toLowerCase().equals("/e damage pvp"))
|
||||
{
|
||||
Manager.GetGame().DamagePvP = !Manager.GetGame().DamagePvP;
|
||||
Manager.GetGame().Announce(F.main("Event Settings", F.value("Damage PvP", F.tf(Manager.GetGame().DamagePvP))));
|
||||
Manager.GetGame().DamagePvP.SetOption(!Manager.GetGame().DamagePvP.GetOption());
|
||||
Manager.GetGame().Announce(F.main("Event Settings", F.value("Damage PvP", F.tf(Manager.GetGame().DamagePvP.GetOption()))));
|
||||
}
|
||||
else if (event.getMessage().toLowerCase().equals("/e damage pve"))
|
||||
{
|
||||
Manager.GetGame().DamagePvE = !Manager.GetGame().DamagePvE;
|
||||
Manager.GetGame().Announce(F.main("Event Settings", F.value("Damage PvE", F.tf(Manager.GetGame().DamagePvE))));
|
||||
Manager.GetGame().DamagePvE.SetOption(!Manager.GetGame().DamagePvE.GetOption());
|
||||
Manager.GetGame().Announce(F.main("Event Settings", F.value("Damage PvE", F.tf(Manager.GetGame().DamagePvE.GetOption()))));
|
||||
}
|
||||
else if (event.getMessage().toLowerCase().equals("/e damage evp"))
|
||||
{
|
||||
Manager.GetGame().DamageEvP = !Manager.GetGame().DamageEvP;
|
||||
Manager.GetGame().Announce(F.main("Event Settings", F.value("Damage EvP", F.tf(Manager.GetGame().DamageEvP))));
|
||||
Manager.GetGame().DamageEvP.SetOption(!Manager.GetGame().DamageEvP.GetOption());
|
||||
Manager.GetGame().Announce(F.main("Event Settings", F.value("Damage EvP", F.tf(Manager.GetGame().DamageEvP.GetOption()))));
|
||||
}
|
||||
else if (event.getMessage().toLowerCase().equals("/e damage fall"))
|
||||
{
|
||||
Manager.GetGame().DamageFall = !Manager.GetGame().DamageFall;
|
||||
Manager.GetGame().Announce(F.main("Event Settings", F.value("Damage Fall", F.tf(Manager.GetGame().DamageFall))));
|
||||
Manager.GetGame().DamageFall.SetOption(!Manager.GetGame().DamageFall.GetOption());
|
||||
Manager.GetGame().Announce(F.main("Event Settings", F.value("Damage Fall", F.tf(Manager.GetGame().DamageFall.GetOption()))));
|
||||
}
|
||||
else if (args[0].equalsIgnoreCase("health"))
|
||||
{
|
||||
@ -336,18 +336,18 @@ public class EventModule extends MiniPlugin
|
||||
}
|
||||
else if (event.getMessage().toLowerCase().equals("/e item drop"))
|
||||
{
|
||||
Manager.GetGame().ItemDrop = !Manager.GetGame().ItemDrop;
|
||||
Manager.GetGame().Announce(F.main("Event Settings", F.value("Item Drop", F.tf(Manager.GetGame().ItemDrop))));
|
||||
Manager.GetGame().ItemDrop.SetOption(!Manager.GetGame().ItemDrop.GetOption());
|
||||
Manager.GetGame().Announce(F.main("Event Settings", F.value("Item Drop", F.tf(Manager.GetGame().ItemDrop.GetOption()))));
|
||||
}
|
||||
else if (event.getMessage().toLowerCase().equals("/e item pickup"))
|
||||
{
|
||||
Manager.GetGame().ItemPickup = !Manager.GetGame().ItemPickup;
|
||||
Manager.GetGame().Announce(F.main("Event Settings", F.value("Item Pickup", F.tf(Manager.GetGame().ItemPickup))));
|
||||
Manager.GetGame().ItemPickup.SetOption(!Manager.GetGame().ItemPickup.GetOption());
|
||||
Manager.GetGame().Announce(F.main("Event Settings", F.value("Item Pickup", F.tf(Manager.GetGame().ItemPickup.GetOption()))));
|
||||
}
|
||||
else if (event.getMessage().toLowerCase().equals("/e blockplace"))
|
||||
{
|
||||
Manager.GetGame().BlockPlace = !Manager.GetGame().BlockPlace;
|
||||
Manager.GetGame().Announce(F.main("Event Settings", F.value("Block Place", F.tf(Manager.GetGame().BlockPlace))));
|
||||
Manager.GetGame().BlockPlace.SetOption(!Manager.GetGame().BlockPlace.GetOption());
|
||||
Manager.GetGame().Announce(F.main("Event Settings", F.value("Block Place", F.tf(Manager.GetGame().BlockPlace.GetOption()))));
|
||||
}
|
||||
else if (args.length >= 4 && args[0].equalsIgnoreCase("blockplace")
|
||||
&& (args[1].equalsIgnoreCase("whitelist") || args[1].equalsIgnoreCase("blacklist")))
|
||||
@ -356,8 +356,8 @@ public class EventModule extends MiniPlugin
|
||||
}
|
||||
else if (event.getMessage().toLowerCase().equals("/e blockbreak"))
|
||||
{
|
||||
Manager.GetGame().BlockBreak = !Manager.GetGame().BlockBreak;
|
||||
Manager.GetGame().Announce(F.main("Event Settings", F.value("Block Break", F.tf(Manager.GetGame().BlockBreak))));
|
||||
Manager.GetGame().BlockBreak.SetOption(!Manager.GetGame().BlockBreak.GetOption());
|
||||
Manager.GetGame().Announce(F.main("Event Settings", F.value("Block Break", F.tf(Manager.GetGame().BlockBreak.GetOption()))));
|
||||
}
|
||||
else if (args.length >= 4 && args[0].equalsIgnoreCase("blockbreak")
|
||||
&& (args[1].equalsIgnoreCase("whitelist") || args[1].equalsIgnoreCase("blacklist")))
|
||||
@ -463,25 +463,25 @@ public class EventModule extends MiniPlugin
|
||||
UtilPlayer.message(player, F.value("Damage Fall", F.tf(Manager.GetGame().DamageFall.GetOption())));
|
||||
UtilPlayer.message(player, F.value("Health Set", Manager.GetGame().HealthSet+""));
|
||||
UtilPlayer.message(player, F.value("Hunger Set", Manager.GetGame().HungerSet+""));
|
||||
UtilPlayer.message(player, F.value("Item Pickup", F.tf(Manager.GetGame().ItemPickup)));
|
||||
UtilPlayer.message(player, F.value("Item Drop", F.tf(Manager.GetGame().ItemDrop)));
|
||||
UtilPlayer.message(player, F.value("Block Place Creative", F.tf(Manager.GetGame().BlockPlaceCreative)));
|
||||
UtilPlayer.message(player, F.value("Block Break Creative", F.tf(Manager.GetGame().BlockBreakCreative)));
|
||||
UtilPlayer.message(player, F.value("Block Place", F.tf(Manager.GetGame().BlockPlace)));
|
||||
UtilPlayer.message(player, F.value("Item Pickup", F.tf(Manager.GetGame().ItemPickup.GetOption())));
|
||||
UtilPlayer.message(player, F.value("Item Drop", F.tf(Manager.GetGame().ItemDrop.GetOption())));
|
||||
UtilPlayer.message(player, F.value("Block Place Creative", F.tf(Manager.GetGame().BlockPlaceCreative.GetOption())));
|
||||
UtilPlayer.message(player, F.value("Block Break Creative", F.tf(Manager.GetGame().BlockBreakCreative.GetOption())));
|
||||
UtilPlayer.message(player, F.value("Block Place", F.tf(Manager.GetGame().BlockPlace.GetOption())));
|
||||
UtilPlayer.message(player, F.value("Block Place Whitelist", UtilText.listToString(Manager.GetGame().BlockPlaceAllow.GetOption(), true)));
|
||||
UtilPlayer.message(player, F.value("Block Place Blacklist", UtilText.listToString(Manager.GetGame().BlockPlaceDeny.GetOption(), true)));
|
||||
UtilPlayer.message(player, F.value("Block Break", F.tf(Manager.GetGame().BlockPlace.GetOption())));
|
||||
UtilPlayer.message(player, F.value("Block Break Whitelist", UtilText.listToString(Manager.GetGame().BlockBreakAllow.GetOption(), true)));
|
||||
UtilPlayer.message(player, F.value("Block Break Blacklist", UtilText.listToString(Manager.GetGame().BlockBreakDeny.G, true)));
|
||||
UtilPlayer.message(player, F.value("Block Break Blacklist", UtilText.listToString(Manager.GetGame().BlockBreakDeny.GetOption(), true)));
|
||||
UtilPlayer.message(player, F.value("Time Set", Manager.GetGame().WorldTimeSet+""));
|
||||
UtilPlayer.message(player, F.value("Mob griefing", F.tf(_mobGriefing)));
|
||||
}
|
||||
|
||||
public void commandBlockBreakInCreative(Player player, String[] args)
|
||||
{
|
||||
Manager.GetGame().BlockBreakCreative = !Manager.GetGame().BlockBreakCreative;
|
||||
Manager.GetGame().BlockBreakCreative.SetOption(!Manager.GetGame().BlockBreakCreative.GetOption());
|
||||
|
||||
UtilPlayer.message(player, F.main("Settings", "BlockBreakCreative: " + F.tf(Manager.GetGame().BlockBreakCreative)));
|
||||
UtilPlayer.message(player, F.main("Settings", "BlockBreakCreative: " + F.tf(Manager.GetGame().BlockBreakCreative.GetOption())));
|
||||
}
|
||||
|
||||
public void commandStacker(Player player, String[] args)
|
||||
@ -513,9 +513,9 @@ public class EventModule extends MiniPlugin
|
||||
|
||||
public void commandBlockPlaceInCreative(Player player, String[] args)
|
||||
{
|
||||
Manager.GetGame().BlockPlaceCreative = !Manager.GetGame().BlockPlaceCreative;
|
||||
Manager.GetGame().BlockPlaceCreative.SetOption(!Manager.GetGame().BlockPlaceCreative.GetOption());
|
||||
|
||||
UtilPlayer.message(player, F.main("Settings", "BlockPlaceCreative: " + F.tf(Manager.GetGame().BlockPlaceCreative)));
|
||||
UtilPlayer.message(player, F.main("Settings", "BlockPlaceCreative: " + F.tf(Manager.GetGame().BlockPlaceCreative.GetOption())));
|
||||
}
|
||||
|
||||
public void commandMobGriefing(Player player, String[] args)
|
||||
@ -1017,25 +1017,25 @@ public class EventModule extends MiniPlugin
|
||||
//Spec
|
||||
public void commandSpectators(Player player, String[] args)
|
||||
{
|
||||
Manager.GetGame().JoinInProgress = !Manager.GetGame().JoinInProgress;
|
||||
Manager.GetGame().JoinInProgress.SetOption(!Manager.GetGame().JoinInProgress.GetOption());
|
||||
|
||||
UtilPlayer.message(player, F.main("Settings", "Spectator Join: " + F.tf(Manager.GetGame().JoinInProgress)));
|
||||
UtilPlayer.message(player, F.main("Settings", "Spectator Join: " + F.tf(Manager.GetGame().JoinInProgress.GetOption())));
|
||||
}
|
||||
|
||||
//Deathout
|
||||
public void commandDeathout(Player player, String[] args)
|
||||
{
|
||||
Manager.GetGame().DeathOut = !Manager.GetGame().DeathOut;
|
||||
Manager.GetGame().DeathOut.SetOption(!Manager.GetGame().DeathOut.GetOption());
|
||||
|
||||
UtilPlayer.message(player, F.main("Settings", "Deathout: " + F.tf(Manager.GetGame().DeathOut)));
|
||||
UtilPlayer.message(player, F.main("Settings", "Deathout: " + F.tf(Manager.GetGame().DeathOut.GetOption())));
|
||||
}
|
||||
|
||||
//QuitOut
|
||||
public void commandQuitOut(Player player, String[] args)
|
||||
{
|
||||
Manager.GetGame().QuitOut = !Manager.GetGame().QuitOut;
|
||||
Manager.GetGame().QuitOut.SetOption(!Manager.GetGame().QuitOut.GetOption());
|
||||
|
||||
UtilPlayer.message(player, F.main("Settings", "QuitOut: " + F.tf(Manager.GetGame().QuitOut)));
|
||||
UtilPlayer.message(player, F.main("Settings", "QuitOut: " + F.tf(Manager.GetGame().QuitOut.GetOption())));
|
||||
}
|
||||
|
||||
//Double Jump
|
||||
@ -1246,9 +1246,9 @@ public class EventModule extends MiniPlugin
|
||||
HashSet<Entity> entSet = new HashSet<Entity>();
|
||||
for (int i = 0 ; i < count ; i++)
|
||||
{
|
||||
Manager.GetGame().CreatureAllowOverride = true;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(true);
|
||||
entSet.add(Manager.GetCreature().SpawnEntity(caller.getTargetBlock((HashSet<Byte>)null, 150).getLocation().add(0.5, 1, 0.5), type));
|
||||
Manager.GetGame().CreatureAllowOverride = false;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(false);
|
||||
}
|
||||
|
||||
//Search Vars
|
||||
|
@ -130,13 +130,13 @@ public class Evolution extends SoloGame
|
||||
"First to get through " + _mobKits.size() + " evolutions wins!"
|
||||
};
|
||||
|
||||
DamageTeamSelf = true;
|
||||
DamageTeamSelf.SetOption(true);
|
||||
|
||||
HungerSet = 20;
|
||||
HungerSet.SetOption(20);
|
||||
|
||||
DeathOut = false;
|
||||
DeathOut.SetOption(false);
|
||||
|
||||
PrepareFreeze = false;
|
||||
PrepareFreeze.SetOption(false);
|
||||
|
||||
GemKillDeathRespawn = 2;
|
||||
GemAssistDeathRespawn = .5;
|
||||
@ -144,13 +144,13 @@ public class Evolution extends SoloGame
|
||||
CompassEnabled = true;
|
||||
CompassGiveItem = false;
|
||||
|
||||
AutomaticRespawn = false;
|
||||
DeathSpectateSecs = 4.0;
|
||||
AutomaticRespawn.SetOption(false);
|
||||
DeathSpectateSecs.SetOption(4.0);
|
||||
|
||||
CreatureAllow = false;
|
||||
InventoryClick = false;
|
||||
CreatureAllow.SetOption(false);
|
||||
InventoryClick.SetOption(false);
|
||||
|
||||
InventoryOpenBlock = false;
|
||||
InventoryOpenBlock.SetOption(false);
|
||||
|
||||
Manager.GetDamage().GetCombatManager().setUseWeaponName(AttackReason.Attack);
|
||||
|
||||
|
@ -103,18 +103,18 @@ public class Gladiators extends SoloGame
|
||||
"There is only one victor!"
|
||||
});
|
||||
|
||||
Damage = true;
|
||||
DamageFall = false;
|
||||
DamagePvP = true;
|
||||
DamageSelf = true;
|
||||
DamageTeamSelf = true;
|
||||
HungerSet = 20;
|
||||
DontAllowOverfill = true;
|
||||
Damage.SetOption(true);
|
||||
DamageFall.SetOption(false);
|
||||
DamagePvP.SetOption(true);
|
||||
DamageSelf.SetOption(true);
|
||||
DamageTeamSelf.SetOption(true);
|
||||
HungerSet.SetOption(20);
|
||||
DontAllowOverfill.SetOption(true);
|
||||
EnableTutorials = false;
|
||||
|
||||
BlockBreakAllow.add(Material.SUGAR_CANE_BLOCK.getId());
|
||||
BlockBreakAllow.add(Material.DEAD_BUSH.getId());
|
||||
BlockBreakAllow.add(Material.LONG_GRASS.getId());
|
||||
BlockBreakAllow.GetOption().add(Material.SUGAR_CANE_BLOCK.getId());
|
||||
BlockBreakAllow.GetOption().add(Material.DEAD_BUSH.getId());
|
||||
BlockBreakAllow.GetOption().add(Material.LONG_GRASS.getId());
|
||||
|
||||
registerStatTrackers(
|
||||
new BrawlerTracker(this),
|
||||
@ -156,10 +156,10 @@ public class Gladiators extends SoloGame
|
||||
e.getTutorial().getPhase(1).setLocation(white);
|
||||
e.getTutorial().getPhase(1).setTarget(orange);
|
||||
|
||||
CreatureAllowOverride = true;
|
||||
CreatureAllowOverride.SetOption(true);
|
||||
Zombie zombie1 = (Zombie) WorldData.World.spawnEntity(spawn1, EntityType.ZOMBIE);
|
||||
Zombie zombie2 = (Zombie) WorldData.World.spawnEntity(spawn2, EntityType.ZOMBIE);
|
||||
CreatureAllowOverride = false;
|
||||
CreatureAllowOverride.SetOption(false);
|
||||
for (Zombie zombie : Arrays.asList(zombie1, zombie2))
|
||||
{
|
||||
GameProfile tiger = new ProfileLoader(UUIDFetcher.getUUIDOf("WilliamTiger").toString(), "WilliamTiger").loadProfile();
|
||||
|
@ -107,14 +107,14 @@ public class Gravity extends SoloGame
|
||||
"Restore Oxygen at the Emerald Blocks",
|
||||
};
|
||||
|
||||
this.DamagePvP = false;
|
||||
this.HungerSet = 10;
|
||||
this.DamagePvP.SetOption(false);
|
||||
this.HungerSet.SetOption(10);
|
||||
|
||||
this.WorldTimeSet = 18000;
|
||||
this.WorldTimeSet.SetOption(18000);
|
||||
|
||||
this.CompassEnabled = true;
|
||||
|
||||
this.WorldBoundaryKill = false;
|
||||
this.WorldBoundaryKill.SetOption(false);
|
||||
|
||||
registerChatStats(
|
||||
Kills,
|
||||
@ -327,9 +327,9 @@ public class Gravity extends SoloGame
|
||||
//Projectile
|
||||
Vector velocity = player.getLocation().getDirection().multiply(0.4);
|
||||
|
||||
this.CreatureAllowOverride = true;
|
||||
this.CreatureAllowOverride.SetOption(true);
|
||||
Slime slime = player.getWorld().spawn(player.getEyeLocation().add(player.getLocation().getDirection().multiply(2)), Slime.class);
|
||||
this.CreatureAllowOverride = false;
|
||||
this.CreatureAllowOverride.SetOption(false);
|
||||
|
||||
slime.setSize(1);
|
||||
UtilEnt.Vegetate(slime, true);
|
||||
|
@ -47,9 +47,9 @@ public abstract class GravityObject
|
||||
else
|
||||
Vel = new Vector(0,0,0);
|
||||
|
||||
Host.CreatureAllowOverride = true;
|
||||
Host.CreatureAllowOverride.SetOption(true);
|
||||
Base = ent.getWorld().spawn(ent.getLocation().subtract(0, 0, 0), Zombie.class);
|
||||
Host.CreatureAllowOverride = false;
|
||||
Host.CreatureAllowOverride.SetOption(false);
|
||||
|
||||
Base.setMaxHealth(60);
|
||||
Base.setHealth(60);
|
||||
|
@ -123,20 +123,20 @@ public class Halloween extends SoloGame
|
||||
"Kill the Pumpkin King"
|
||||
});
|
||||
|
||||
this.DamagePvP = false;
|
||||
this.DamagePvP.SetOption(false);
|
||||
|
||||
this.WorldTimeSet = 16000;
|
||||
this.WorldTimeSet.SetOption(16000);
|
||||
|
||||
this.ItemDrop = false;
|
||||
this.ItemPickup = false;
|
||||
this.ItemDrop.SetOption(false);
|
||||
this.ItemPickup.SetOption(false);
|
||||
|
||||
this.PrepareFreeze = false;
|
||||
this.PrepareFreeze.SetOption(false);
|
||||
|
||||
//this.HungerSet = 20;
|
||||
|
||||
this.WorldBoundaryKill = false;
|
||||
this.WorldBoundaryKill.SetOption(false);
|
||||
|
||||
this.DontAllowOverfill = true;
|
||||
this.DontAllowOverfill.SetOption(true);
|
||||
|
||||
registerChatStats(
|
||||
DamageDealt,
|
||||
|
@ -377,9 +377,9 @@ public class PumpkinKing extends CreatureBase<Skeleton>
|
||||
|
||||
for (int i=0 ; i<_minionsMax ; i++)
|
||||
{
|
||||
Host.CreatureAllowOverride = true;
|
||||
Host.CreatureAllowOverride.SetOption(true);
|
||||
Skeleton skel = GetEntity().getWorld().spawn(GetEntity().getLocation(), Skeleton.class);
|
||||
Host.CreatureAllowOverride = false;
|
||||
Host.CreatureAllowOverride.SetOption(false);
|
||||
|
||||
Host.Manager.GetCondition().Factory().Invisible("Cloak", skel, skel, 999999, 0, false, false, false);
|
||||
|
||||
@ -642,13 +642,13 @@ public class PumpkinKing extends CreatureBase<Skeleton>
|
||||
for (int i=0 ; i<toSpawn ; i++)
|
||||
{
|
||||
//Spawn
|
||||
Host.CreatureAllowOverride = true;
|
||||
Host.CreatureAllowOverride.SetOption(true);
|
||||
Blaze ent = GetEntity().getWorld().spawn(GetEntity().getLocation().add(0, 6, 0), Blaze.class);
|
||||
ent.getEquipment().setHelmet(new ItemStack(Material.PUMPKIN));
|
||||
_shields.add(ent);
|
||||
UtilEnt.Vegetate(ent);
|
||||
//ent.setSize(1);
|
||||
Host.CreatureAllowOverride = false;
|
||||
Host.CreatureAllowOverride.SetOption(false);
|
||||
|
||||
//Orbit
|
||||
ShieldOrbit(false);
|
||||
|
@ -85,9 +85,9 @@ public abstract class WaveBase
|
||||
SpawnBeacons(_spawns);
|
||||
|
||||
//Spawn
|
||||
Host.CreatureAllowOverride = true;
|
||||
Host.CreatureAllowOverride.SetOption(true);
|
||||
Spawn(_tick++);
|
||||
Host.CreatureAllowOverride = false;
|
||||
Host.CreatureAllowOverride.SetOption(false);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -314,10 +314,10 @@ public class HideSeek extends TeamGame
|
||||
C.cRed + "Seekers" + C.cWhite + " Find and kill the Hiders!",
|
||||
});
|
||||
|
||||
this.DamageSelf = false;
|
||||
this.DeathOut = false;
|
||||
this.HungerSet = 20;
|
||||
this.PrepareFreeze = false;
|
||||
this.DamageSelf.SetOption(false);
|
||||
this.DeathOut.SetOption(false);
|
||||
this.HungerSet.SetOption(20);
|
||||
this.PrepareFreeze.SetOption(false);
|
||||
|
||||
_allowedBlocks = new ArrayList<Material>();
|
||||
_allowedBlocks.add(Material.TNT);
|
||||
@ -456,9 +456,9 @@ public class HideSeek extends TeamGame
|
||||
if (GetKits().length <= 5 + i)
|
||||
continue;
|
||||
|
||||
this.CreatureAllowOverride = true;
|
||||
this.CreatureAllowOverride.SetOption(true);
|
||||
Entity ent = GetKits()[5 + i].SpawnEntity(WorldData.GetDataLocs("RED").get(i));
|
||||
this.CreatureAllowOverride = false;
|
||||
this.CreatureAllowOverride.SetOption(false);
|
||||
|
||||
Manager.GetLobby().AddKitLocation(ent, GetKits()[5 + i], WorldData.GetDataLocs("RED").get(i));
|
||||
}
|
||||
@ -761,7 +761,7 @@ public class HideSeek extends TeamGame
|
||||
if (event.GetState() != GameState.Prepare)
|
||||
return;
|
||||
|
||||
this.CreatureAllowOverride = true;
|
||||
this.CreatureAllowOverride.SetOption(true);
|
||||
|
||||
for (Location loc : WorldData.GetDataLocs("WHITE"))
|
||||
_mobs.put(loc.getWorld().spawn(loc, Sheep.class), loc);
|
||||
@ -775,7 +775,7 @@ public class HideSeek extends TeamGame
|
||||
for (Location loc : WorldData.GetDataLocs("BROWN"))
|
||||
_mobs.put(loc.getWorld().spawn(loc, Cow.class), loc);
|
||||
|
||||
this.CreatureAllowOverride = false;
|
||||
this.CreatureAllowOverride.SetOption(false);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOW)
|
||||
|
@ -50,13 +50,13 @@ public class HoleInTheWall extends SoloGame
|
||||
"Hole in wall"
|
||||
});
|
||||
|
||||
DamagePvP = false;
|
||||
DamagePvE = false;
|
||||
DamageEvP = false;
|
||||
DamageSelf = false;
|
||||
DamageFall = false;
|
||||
HungerSet = 20;
|
||||
WorldTimeSet = 8000;
|
||||
DamagePvP.SetOption(false);
|
||||
DamagePvE.SetOption(false);
|
||||
DamageEvP.SetOption(false);
|
||||
DamageSelf.SetOption(false);
|
||||
DamageFall.SetOption(false);
|
||||
HungerSet.SetOption(20);
|
||||
WorldTimeSet.SetOption(8000);
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
@ -46,18 +46,18 @@ public class Micro extends TeamGame
|
||||
"Small game, big strategy!",
|
||||
});
|
||||
|
||||
this.StrictAntiHack = true;
|
||||
this.StrictAntiHack.SetOption(true);
|
||||
|
||||
this.TeamArmor = true;
|
||||
this.TeamArmorHotbar = true;
|
||||
|
||||
this.InventoryClick = true;
|
||||
this.InventoryClick.SetOption(true);
|
||||
|
||||
this.ItemDrop = true;
|
||||
this.ItemPickup = true;
|
||||
this.ItemDrop.SetOption(true);
|
||||
this.ItemPickup.SetOption(true);
|
||||
|
||||
this.BlockBreak = true;
|
||||
this.BlockPlace = true;
|
||||
this.BlockBreak.SetOption(true);
|
||||
this.BlockPlace.SetOption(true);
|
||||
|
||||
registerStatTrackers(
|
||||
new KillsWithinGameStatTracker(this, 8, "Annihilation")
|
||||
|
@ -93,7 +93,7 @@ public class MilkCow extends SoloGame
|
||||
});
|
||||
|
||||
this.CompassEnabled = true;
|
||||
this.DeathOut = false;
|
||||
this.DeathOut.SetOption(false);
|
||||
|
||||
_scoreObj = Scoreboard.GetScoreboard().registerNewObjective("Milk", "dummy");
|
||||
_scoreObj.setDisplaySlot(DisplaySlot.BELOW_NAME);
|
||||
@ -163,7 +163,7 @@ public class MilkCow extends SoloGame
|
||||
|
||||
for (Location loc : _chickens)
|
||||
{
|
||||
this.CreatureAllowOverride = true;
|
||||
this.CreatureAllowOverride.SetOption(true);
|
||||
Chicken ent = loc.getWorld().spawn(loc, Chicken.class);
|
||||
if (Math.random() > 0.75)
|
||||
{
|
||||
@ -171,12 +171,12 @@ public class MilkCow extends SoloGame
|
||||
ent.setAgeLock(true);
|
||||
}
|
||||
|
||||
this.CreatureAllowOverride = false;
|
||||
this.CreatureAllowOverride.SetOption(false);
|
||||
}
|
||||
|
||||
for (Location loc : _pigs)
|
||||
{
|
||||
this.CreatureAllowOverride = true;
|
||||
this.CreatureAllowOverride.SetOption(true);
|
||||
Pig ent = loc.getWorld().spawn(loc, Pig.class);
|
||||
if (Math.random() > 0.75)
|
||||
{
|
||||
@ -184,12 +184,12 @@ public class MilkCow extends SoloGame
|
||||
ent.setAgeLock(true);
|
||||
}
|
||||
|
||||
this.CreatureAllowOverride = false;
|
||||
this.CreatureAllowOverride.SetOption(false);
|
||||
}
|
||||
|
||||
for (Location loc : _villager)
|
||||
{
|
||||
this.CreatureAllowOverride = true;
|
||||
this.CreatureAllowOverride.SetOption(true);
|
||||
Villager ent = loc.getWorld().spawn(loc, Villager.class);
|
||||
if (Math.random() > 0.75)
|
||||
{
|
||||
@ -197,7 +197,7 @@ public class MilkCow extends SoloGame
|
||||
ent.setCustomNameVisible(true);
|
||||
}
|
||||
|
||||
this.CreatureAllowOverride = false;
|
||||
this.CreatureAllowOverride.SetOption(false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -249,7 +249,7 @@ public class MilkCow extends SoloGame
|
||||
|
||||
while (_herd.size() < 5)
|
||||
{
|
||||
this.CreatureAllowOverride = true;
|
||||
this.CreatureAllowOverride.SetOption(true);
|
||||
Cow cow = host.getWorld().spawn(host.getLocation(), Cow.class);
|
||||
if (Math.random() > 0.5)
|
||||
{
|
||||
@ -258,7 +258,7 @@ public class MilkCow extends SoloGame
|
||||
}
|
||||
|
||||
_herd.add(cow);
|
||||
this.CreatureAllowOverride = false;
|
||||
this.CreatureAllowOverride.SetOption(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -260,21 +260,21 @@ public class MineStrike extends TeamGame
|
||||
|
||||
_shopManager = new ShopManager(this);
|
||||
|
||||
this.StrictAntiHack = true;
|
||||
this.StrictAntiHack.SetOption(true);
|
||||
|
||||
AnnounceStay = false;
|
||||
AnnounceStay.SetOption(false);
|
||||
|
||||
this.HungerSet = 20;
|
||||
this.HungerSet.SetOption(20);
|
||||
|
||||
this.ItemDrop = true;
|
||||
this.ItemDrop.SetOption(true);
|
||||
|
||||
this.DeathTeleport = false;
|
||||
this.DeathTeleport.SetOption(false);
|
||||
|
||||
this.InventoryClick = true;
|
||||
this.InventoryClick.SetOption(true);
|
||||
|
||||
this.JoinInProgress = true;
|
||||
this.JoinInProgress.SetOption(true);
|
||||
|
||||
this.DontAllowOverfill = true;
|
||||
this.DontAllowOverfill.SetOption(true);
|
||||
|
||||
_scoreObj = Scoreboard.GetScoreboard().registerNewObjective("HP", "dummy");
|
||||
_scoreObj.setDisplaySlot(DisplaySlot.BELOW_NAME);
|
||||
|
@ -70,16 +70,16 @@ public class MineWare extends SoloGame
|
||||
"Other players lose one life.", "Last player with lives wins!"
|
||||
});
|
||||
|
||||
DamageTeamSelf = true;
|
||||
DamagePvP = false;
|
||||
DamagePvE = false;
|
||||
DamageEvP = false;
|
||||
DamageFall = false;
|
||||
InventoryClick = true;
|
||||
DamageSelf = false;
|
||||
DeathOut = false;
|
||||
AutomaticRespawn = false;
|
||||
DeathMessages = false;
|
||||
DamageTeamSelf.SetOption(true);
|
||||
DamagePvP.SetOption(false);
|
||||
DamagePvE.SetOption(false);
|
||||
DamageEvP.SetOption(false);
|
||||
DamageFall.SetOption(false);
|
||||
InventoryClick.SetOption(true);
|
||||
DamageSelf.SetOption(false);
|
||||
DeathOut.SetOption(false);
|
||||
AutomaticRespawn.SetOption(false);
|
||||
DeathMessages.SetOption(false);
|
||||
|
||||
Manager.GetCreature().SetDisableCustomDrops(true);
|
||||
|
||||
@ -298,7 +298,7 @@ public class MineWare extends SoloGame
|
||||
@EventHandler
|
||||
public void PlayerMoveCancel(PlayerMoveEvent event)
|
||||
{
|
||||
if (!PrepareFreeze)
|
||||
if (!PrepareFreeze.GetOption())
|
||||
return;
|
||||
|
||||
if (!_orderWaiting)
|
||||
|
@ -27,10 +27,10 @@ public class Moba extends TeamGame
|
||||
"..."
|
||||
});
|
||||
|
||||
this.DeathOut = false;
|
||||
this.DeathSpectateSecs = 8;
|
||||
this.DeathOut.SetOption(false);
|
||||
this.DeathSpectateSecs.SetOption(8);
|
||||
|
||||
this.HungerSet = 20;
|
||||
this.HungerSet.SetOption(20);
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
@ -54,12 +54,12 @@ public class MonsterLeague extends TeamGame
|
||||
"CHEESE IZ DELISH"
|
||||
});
|
||||
|
||||
this.PrepareFreeze = false;
|
||||
this.DamagePvP = false;
|
||||
this.HungerSet = 20;
|
||||
this.HealthSet = 20;
|
||||
this.PrepareFreeze.SetOption(false);
|
||||
this.DamagePvP.SetOption(false);
|
||||
this.HungerSet.SetOption(20);
|
||||
this.HealthSet.SetOption(20);
|
||||
|
||||
this.DeathOut = false;
|
||||
this.DeathOut.SetOption(false);
|
||||
|
||||
this.TeamArmor = true;
|
||||
this.TeamArmorHotbar = true;
|
||||
|
@ -513,7 +513,7 @@ public class Maze implements Listener
|
||||
}
|
||||
Location loc = UtilAlg.Random(validSpawns);
|
||||
|
||||
_host.CreatureAllowOverride = true;
|
||||
_host.CreatureAllowOverride.SetOption(true);
|
||||
Snowman ent = loc.getWorld().spawn(loc, Snowman.class);
|
||||
|
||||
DisguiseBase disguise = DisguiseFactory.createDisguise(ent, _host.getMonsterType());
|
||||
@ -528,7 +528,7 @@ public class Maze implements Listener
|
||||
((DisguiseMagmaCube) disguise).SetSize(3);
|
||||
}
|
||||
|
||||
_host.CreatureAllowOverride = false;
|
||||
_host.CreatureAllowOverride.SetOption(false);
|
||||
|
||||
UtilEnt.Vegetate(ent, true);
|
||||
UtilEnt.ghost(ent, true, false);
|
||||
@ -551,7 +551,7 @@ public class Maze implements Listener
|
||||
|
||||
while (spawned <= numToSpawn)
|
||||
{
|
||||
_host.CreatureAllowOverride = true;
|
||||
_host.CreatureAllowOverride.SetOption(true);
|
||||
Snowman ent = loc.getWorld().spawn(loc, Snowman.class);
|
||||
|
||||
DisguiseBase disguise = DisguiseFactory.createDisguise(ent, _host.getMonsterType());
|
||||
@ -566,7 +566,7 @@ public class Maze implements Listener
|
||||
((DisguiseMagmaCube) disguise).SetSize(3);
|
||||
}
|
||||
|
||||
_host.CreatureAllowOverride = false;
|
||||
_host.CreatureAllowOverride.SetOption(false);
|
||||
|
||||
UtilEnt.Vegetate(ent, true);
|
||||
UtilEnt.ghost(ent, true, false);
|
||||
|
@ -81,16 +81,16 @@ public class MonsterMaze extends SoloGame
|
||||
"Make it to a Safe Pad or be killed!"
|
||||
});
|
||||
|
||||
DamagePvP = false;
|
||||
DamagePvE = false;
|
||||
DamagePvP.SetOption(false);
|
||||
DamagePvE.SetOption(false);
|
||||
|
||||
DamageFall = false;
|
||||
DamageFall.SetOption(false);
|
||||
|
||||
HungerSet = 20;
|
||||
HungerSet.SetOption(20);
|
||||
|
||||
PrepareFreeze = false;
|
||||
PrepareFreeze.SetOption(false);
|
||||
|
||||
HungerSet = 20;
|
||||
HungerSet.SetOption(20);
|
||||
|
||||
CompassEnabled = false;
|
||||
|
||||
|
@ -73,19 +73,19 @@ public class OldMineWare extends SoloGame
|
||||
"Last player with lives wins!"
|
||||
});
|
||||
|
||||
this.PrepareFreeze = false;
|
||||
this.PrepareFreeze.SetOption(false);
|
||||
|
||||
this.DamagePvP = false;
|
||||
this.DamagePvP.SetOption(false);
|
||||
|
||||
this.BlockPlace = true;
|
||||
this.BlockBreak = true;
|
||||
this.BlockPlace.SetOption(true);
|
||||
this.BlockBreak.SetOption(true);
|
||||
|
||||
this.ItemDrop = true;
|
||||
this.ItemPickup = true;
|
||||
this.ItemDrop.SetOption(true);
|
||||
this.ItemPickup.SetOption(true);
|
||||
|
||||
InventoryOpenBlock = true;
|
||||
InventoryOpenChest = true;
|
||||
InventoryClick = true;
|
||||
InventoryOpenBlock.SetOption(true);
|
||||
InventoryOpenChest.SetOption(true);
|
||||
InventoryClick.SetOption(true);
|
||||
|
||||
PopulateOrders();
|
||||
|
||||
@ -299,14 +299,14 @@ public class OldMineWare extends SoloGame
|
||||
Location loc = _mobLocs.get(UtilMath.r(_mobLocs.size())).clone().add(new Vector(0.5,1,0.5));
|
||||
double r = Math.random();
|
||||
|
||||
this.CreatureAllowOverride = true;
|
||||
this.CreatureAllowOverride.SetOption(true);
|
||||
|
||||
if (r > 0.75) _mobs.add(loc.getWorld().spawn(loc, Pig.class));
|
||||
else if (r > 0.5) _mobs.add(loc.getWorld().spawn(loc, Cow.class));
|
||||
else if (r > 0.25) _mobs.add(loc.getWorld().spawn(loc, Chicken.class));
|
||||
else _mobs.add(loc.getWorld().spawn(loc, Sheep.class));
|
||||
|
||||
this.CreatureAllowOverride = false;
|
||||
this.CreatureAllowOverride.SetOption(false);
|
||||
}
|
||||
|
||||
if (_ghast == null || !_ghast.isValid())
|
||||
@ -314,9 +314,9 @@ public class OldMineWare extends SoloGame
|
||||
if (_ghast != null)
|
||||
_ghast.remove();
|
||||
|
||||
this.CreatureAllowOverride = true;
|
||||
this.CreatureAllowOverride.SetOption(true);
|
||||
_ghast = _ghastLoc.getWorld().spawn(_ghastLoc, Ghast.class);
|
||||
this.CreatureAllowOverride = false;
|
||||
this.CreatureAllowOverride.SetOption(false);
|
||||
|
||||
_ghast.setMaxHealth(10000);
|
||||
_ghast.setHealth(_ghast.getMaxHealth());
|
||||
|
@ -48,10 +48,10 @@ public abstract class Order implements Listener
|
||||
|
||||
public void EndOrder()
|
||||
{
|
||||
Host.BlockBreakAllow.clear();
|
||||
Host.BlockPlaceAllow.clear();
|
||||
Host.ItemDropAllow.clear();
|
||||
Host.ItemPickupAllow.clear();
|
||||
Host.BlockBreakAllow.GetOption().clear();
|
||||
Host.BlockPlaceAllow.GetOption().clear();
|
||||
Host.ItemDropAllow.GetOption().clear();
|
||||
Host.ItemPickupAllow.GetOption().clear();
|
||||
Uninitialize();
|
||||
}
|
||||
|
||||
|
@ -32,8 +32,8 @@ public abstract class OrderGather extends Order
|
||||
public void SubInitialize()
|
||||
{
|
||||
_counter.clear();
|
||||
Host.BlockBreakAllow.add(_id);
|
||||
Host.ItemPickupAllow.add(_id);
|
||||
Host.BlockBreakAllow.GetOption().add(_id);
|
||||
Host.ItemPickupAllow.GetOption().add(_id);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -30,7 +30,7 @@ public abstract class OrderPlace extends Order
|
||||
public void SubInitialize()
|
||||
{
|
||||
_counter.clear();
|
||||
Host.BlockPlaceAllow.add(_id);
|
||||
Host.BlockPlaceAllow.GetOption().add(_id);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -100,11 +100,11 @@ public class Paintball extends TeamGame
|
||||
"Last team alive wins!"
|
||||
});
|
||||
|
||||
StrictAntiHack = true;
|
||||
StrictAntiHack.SetOption(true);
|
||||
|
||||
HungerSet = 20;
|
||||
HungerSet.SetOption(20);
|
||||
|
||||
InventoryClick = false;
|
||||
InventoryClick.SetOption(false);
|
||||
|
||||
TeamArmorHotbar = true;
|
||||
|
||||
|
@ -39,9 +39,9 @@ public class PlayerCopyPaintball
|
||||
Location entLoc = owner.getLocation();
|
||||
entLoc.setPitch(0F);
|
||||
|
||||
Host.CreatureAllowOverride = true;
|
||||
Host.CreatureAllowOverride.SetOption(true);
|
||||
_ent = owner.getWorld().spawn(owner.getLocation(), ArmorStand.class);
|
||||
Host.CreatureAllowOverride = false;
|
||||
Host.CreatureAllowOverride.SetOption(false);
|
||||
|
||||
UtilEnt.ghost(_ent, true, false);
|
||||
|
||||
|
@ -72,17 +72,17 @@ public class Quiver extends SoloGame
|
||||
"First player to 20 kills wins."
|
||||
});
|
||||
|
||||
this.HungerSet = 20;
|
||||
this.DeathOut = false;
|
||||
this.DamageSelf = false;
|
||||
this.DamageTeamSelf = true;
|
||||
this.PrepareFreeze = false;
|
||||
this.BlockBreakAllow.add(102);
|
||||
this.BlockBreakAllow.add(20);
|
||||
this.BlockBreakAllow.add(Material.STAINED_GLASS_PANE.getId());
|
||||
this.BlockBreakAllow.add(Material.STAINED_GLASS.getId());
|
||||
this.HungerSet.SetOption(20);
|
||||
this.DeathOut.SetOption(false);
|
||||
this.DamageSelf.SetOption(false);
|
||||
this.DamageTeamSelf.SetOption(true);
|
||||
this.PrepareFreeze.SetOption(false);
|
||||
this.BlockBreakAllow.GetOption().add(102);
|
||||
this.BlockBreakAllow.GetOption().add(20);
|
||||
this.BlockBreakAllow.GetOption().add(Material.STAINED_GLASS_PANE.getId());
|
||||
this.BlockBreakAllow.GetOption().add(Material.STAINED_GLASS.getId());
|
||||
|
||||
this.DeathSpectateSecs = 1;
|
||||
this.DeathSpectateSecs.SetOption(1);
|
||||
|
||||
_scoreObj = Scoreboard.GetScoreboard().registerNewObjective("Kills", "dummy");
|
||||
_scoreObj.setDisplaySlot(DisplaySlot.BELOW_NAME);
|
||||
|
@ -54,14 +54,14 @@ public class QuiverTeams extends TeamGame
|
||||
"First team to 60 kills wins."
|
||||
});
|
||||
|
||||
this.HungerSet = 20;
|
||||
this.DeathOut = false;
|
||||
this.DamageSelf = false;
|
||||
this.DamageTeamSelf = false;
|
||||
this.PrepareFreeze = false;
|
||||
this.BlockBreakAllow.add(102);
|
||||
this.BlockBreakAllow.add(20);
|
||||
this.BlockBreakAllow.add(18);
|
||||
this.HungerSet.SetOption(20);
|
||||
this.DeathOut.SetOption(false);
|
||||
this.DamageSelf.SetOption(false);
|
||||
this.DamageTeamSelf.SetOption(false);
|
||||
this.PrepareFreeze.SetOption(false);
|
||||
this.BlockBreakAllow.GetOption().add(102);
|
||||
this.BlockBreakAllow.GetOption().add(20);
|
||||
this.BlockBreakAllow.GetOption().add(18);
|
||||
|
||||
this.TeamArmor = true;
|
||||
this.TeamArmorHotbar = true;
|
||||
|
@ -60,11 +60,11 @@ public class Runner extends SoloGame implements IThrown
|
||||
"Last player alive wins!"
|
||||
});
|
||||
|
||||
this.DamagePvP = false;
|
||||
this.HungerSet = 20;
|
||||
this.WorldWaterDamage = 4;
|
||||
this.DamagePvP.SetOption(false);
|
||||
this.HungerSet.SetOption(20);
|
||||
this.WorldWaterDamage.SetOption(4);
|
||||
|
||||
this.PrepareFreeze = false;
|
||||
this.PrepareFreeze.SetOption(false);
|
||||
|
||||
registerStatTrackers(new DistanceTraveledStatTracker(this, "MarathonRunner"));
|
||||
|
||||
|
@ -62,14 +62,14 @@ public class SearchAndDestroy extends TeamGame
|
||||
setKits(_kitManager.get_kits());
|
||||
|
||||
_evolve = new KitEvolve(manager.getPlugin(), this, _kitManager.getUpgradeKits());
|
||||
InventoryClick = true;
|
||||
WorldTimeSet = -1;
|
||||
WorldBoundaryKill = false;
|
||||
HungerSet = 20;
|
||||
AnnounceJoinQuit = false;
|
||||
DisableKillCommand = false;
|
||||
InventoryClick.SetOption(true);
|
||||
WorldTimeSet.SetOption(-1);
|
||||
WorldBoundaryKill.SetOption(false);
|
||||
HungerSet.SetOption(20);
|
||||
AnnounceJoinQuit.SetOption(false);
|
||||
DisableKillCommand.SetOption(false);
|
||||
AllowParticles = false;
|
||||
DamageSelf = false;
|
||||
DamageSelf.SetOption(false);
|
||||
|
||||
Manager.GetDamage().GetCombatManager().setUseWeaponName(AttackReason.DefaultWeaponName);
|
||||
|
||||
@ -194,7 +194,7 @@ public class SearchAndDestroy extends TeamGame
|
||||
bomb.getBlockLocation().getWorld().playSound(bomb.getBlockLocation(), Sound.EXPLODE, 1000, 0);
|
||||
bomb.getBlockLocation().getWorld().playEffect(bomb.getBomb().getLocation(), Effect.EXPLOSION_HUGE, 0);
|
||||
bomb.removeBomb();
|
||||
DeathMessages = false;
|
||||
DeathMessages.SetOption(false);
|
||||
for (Player player : this.GetPlayers(true))
|
||||
{
|
||||
GameTeam pTeam = GetTeam(player);
|
||||
@ -208,7 +208,7 @@ public class SearchAndDestroy extends TeamGame
|
||||
}
|
||||
}
|
||||
}
|
||||
DeathMessages = true;
|
||||
DeathMessages.SetOption(true);
|
||||
|
||||
// TODO The code below could be used when a team is defeated.
|
||||
/* if (getBombs().size() == 1)
|
||||
|
@ -107,9 +107,9 @@ class TeamBomb implements Comparable<TeamBomb>
|
||||
_bombEntity.remove();
|
||||
loc = _bombEntity.getLocation();
|
||||
}
|
||||
_game.CreatureAllowOverride = true;
|
||||
_game.CreatureAllowOverride.SetOption(true);
|
||||
EntityTNTPrimed entity = new EntityTNTPrimed(((CraftWorld) getBlockLocation().getWorld()).getHandle());
|
||||
_game.CreatureAllowOverride = false;
|
||||
_game.CreatureAllowOverride.SetOption(false);
|
||||
double x = loc.getX();
|
||||
double y = loc.getY() + 0.2;
|
||||
double z = loc.getZ();
|
||||
|
@ -141,12 +141,12 @@ public class SheepGame extends TeamGame
|
||||
"Most sheep at 5 minutes wins!"
|
||||
});
|
||||
|
||||
this.DeathOut = false;
|
||||
this.DeathSpectateSecs = 6;
|
||||
this.DeathOut.SetOption(false);
|
||||
this.DeathSpectateSecs.SetOption(6);
|
||||
|
||||
this.HungerSet = 20;
|
||||
this.HungerSet.SetOption(20);
|
||||
|
||||
this.WorldTimeSet = 2000;
|
||||
this.WorldTimeSet.SetOption(2000);
|
||||
|
||||
this.TeamArmor = true;
|
||||
this.TeamArmorHotbar = true;
|
||||
@ -225,12 +225,12 @@ public class SheepGame extends TeamGame
|
||||
public void SheepSpawn()
|
||||
{
|
||||
//Spawn Sheep
|
||||
this.CreatureAllowOverride = true;
|
||||
this.CreatureAllowOverride.SetOption(true);
|
||||
Sheep sheep = _sheepSpawns.get(0).getWorld().spawn(UtilAlg.Random(_sheepSpawns), Sheep.class);
|
||||
sheep.setAdult();
|
||||
sheep.setMaxHealth(2048);
|
||||
sheep.setHealth(2048);
|
||||
this.CreatureAllowOverride = false;
|
||||
this.CreatureAllowOverride.SetOption(false);
|
||||
|
||||
_sheep.put(sheep, new SheepData(this, sheep));
|
||||
|
||||
|
@ -145,46 +145,46 @@ public abstract class Skywars extends Game
|
||||
|
||||
}, description);
|
||||
|
||||
PrepareFreeze = true;
|
||||
PrepareFreeze.SetOption(true);
|
||||
|
||||
AnnounceStay = false;
|
||||
AnnounceStay.SetOption(false);
|
||||
|
||||
HideTeamSheep = true;
|
||||
|
||||
CompassEnabled = true;
|
||||
|
||||
StrictAntiHack = true;
|
||||
StrictAntiHack.SetOption(true);
|
||||
|
||||
GameTimeout.SetOption(1500000L);
|
||||
|
||||
DeathDropItems = true;
|
||||
DeathDropItems.SetOption(true);
|
||||
|
||||
QuitDropItems = true;
|
||||
QuitDropItems.SetOption(true);
|
||||
|
||||
WorldTimeSet = 0;
|
||||
WorldBoundaryKill = false;
|
||||
WorldTimeSet.SetOption(0);
|
||||
WorldBoundaryKill.SetOption(false);
|
||||
|
||||
DamageSelf = true;
|
||||
DamageTeamSelf = true;
|
||||
DamageEvP = true;
|
||||
Damage = true;
|
||||
DamageSelf.SetOption(true);
|
||||
DamageTeamSelf.SetOption(true);
|
||||
DamageEvP.SetOption(true);
|
||||
Damage.SetOption(true);
|
||||
|
||||
DeathDropItems = true;
|
||||
DeathDropItems.SetOption(true);
|
||||
|
||||
ItemDrop = true;
|
||||
ItemPickup = true;
|
||||
ItemDrop.SetOption(true);
|
||||
ItemPickup.SetOption(true);
|
||||
|
||||
BlockBreak = true;
|
||||
BlockPlace = true;
|
||||
BlockBreak.SetOption(true);
|
||||
BlockPlace.SetOption(true);
|
||||
|
||||
InventoryClick = true;
|
||||
InventoryOpenBlock = true;
|
||||
InventoryOpenChest = true;
|
||||
InventoryClick.SetOption(true);
|
||||
InventoryOpenBlock.SetOption(true);
|
||||
InventoryOpenChest.SetOption(true);
|
||||
|
||||
PlaySoundGameStart = true;
|
||||
PrepareTime = 10000L;
|
||||
|
||||
DontAllowOverfill = true;
|
||||
DontAllowOverfill.SetOption(true);
|
||||
|
||||
_oreHider = new OreHider();
|
||||
|
||||
@ -265,14 +265,14 @@ public abstract class Skywars extends Game
|
||||
for (Location loc : WorldData.GetDataLocs("RED"))
|
||||
{
|
||||
//Spawn
|
||||
CreatureAllowOverride = true;
|
||||
CreatureAllowOverride.SetOption(true);
|
||||
Zombie zombie = (Zombie) loc.getWorld().spawn(loc, Zombie.class);
|
||||
zombie.setRemoveWhenFarAway(false);
|
||||
zombie.setCustomName(C.cDRed + "Zombie Guardian");
|
||||
zombie.setCustomNameVisible(true);
|
||||
zombie.setMaxHealth(15);
|
||||
zombie.setHealth(15);
|
||||
CreatureAllowOverride = false;
|
||||
CreatureAllowOverride.SetOption(false);
|
||||
|
||||
// Armor - Make sure the player can't get it!
|
||||
zombie.getEquipment().setHelmet(
|
||||
@ -474,7 +474,7 @@ public abstract class Skywars extends Game
|
||||
if (!UtilTime.elapsed(this.GetStateTime(), 5000))
|
||||
return;
|
||||
|
||||
CreatureAllowOverride = true;
|
||||
CreatureAllowOverride.SetOption(true);
|
||||
for (Location loc : GetTeamList().get(0).GetSpawns())
|
||||
{
|
||||
Chicken chicken = loc.getWorld().spawn(loc.clone().add(0, 1, 0), Chicken.class);
|
||||
@ -485,7 +485,7 @@ public abstract class Skywars extends Game
|
||||
chicken.setMaxHealth(4);
|
||||
chicken.setHealth(4);
|
||||
}
|
||||
CreatureAllowOverride = false;
|
||||
CreatureAllowOverride.SetOption(false);
|
||||
|
||||
_lastChicken = System.currentTimeMillis();
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ public class SoloSkywars extends Skywars
|
||||
"Last player alive wins!"
|
||||
});
|
||||
|
||||
this.DamageTeamSelf = true;
|
||||
this.DamageTeamSelf.SetOption(true);
|
||||
|
||||
}
|
||||
|
||||
|
@ -46,13 +46,13 @@ public class TeamSkywars extends Skywars
|
||||
"Last team alive wins!"
|
||||
});
|
||||
|
||||
this.FillTeamsInOrderToCount = 2;
|
||||
this.FillTeamsInOrderToCount.SetOption(2);
|
||||
|
||||
this.SpawnNearAllies = true;
|
||||
this.SpawnNearAllies.SetOption(true);
|
||||
|
||||
this.DamageTeamSelf = false;
|
||||
this.DamageTeamSelf.SetOption(false);
|
||||
|
||||
this.DontAllowOverfill = true;
|
||||
this.DontAllowOverfill.SetOption(true);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -32,7 +32,7 @@ public class SoloSuperSmash extends SuperSmash
|
||||
"Last player alive wins!"
|
||||
});
|
||||
|
||||
this.DamageTeamSelf = true;
|
||||
this.DamageTeamSelf.SetOption(true);
|
||||
|
||||
registerChatStats(
|
||||
Kills,
|
||||
|
@ -116,13 +116,13 @@ public abstract class SuperSmash extends Game
|
||||
|
||||
},description);
|
||||
|
||||
this.DeathOut = false;
|
||||
this.DeathOut.SetOption(false);
|
||||
|
||||
this.CompassEnabled = true;
|
||||
|
||||
this.DeathSpectateSecs = 4;
|
||||
this.DeathSpectateSecs.SetOption(4);
|
||||
|
||||
this.WorldWaterDamage = 1000;
|
||||
this.WorldWaterDamage.SetOption(1000);
|
||||
|
||||
this.HideTeamSheep = true;
|
||||
|
||||
@ -241,9 +241,9 @@ public abstract class SuperSmash extends Game
|
||||
}
|
||||
else
|
||||
{
|
||||
CreatureAllowOverride = true;
|
||||
CreatureAllowOverride.SetOption(true);
|
||||
_powerup = _powerupTarget.getWorld().spawn(_powerupTarget, EnderCrystal.class);
|
||||
CreatureAllowOverride = false;
|
||||
CreatureAllowOverride.SetOption(false);
|
||||
|
||||
_powerupTarget.getBlock().getRelative(BlockFace.DOWN).setType(Material.GLASS);
|
||||
|
||||
|
@ -46,14 +46,14 @@ public class TeamSuperSmash extends SuperSmash
|
||||
});
|
||||
|
||||
this.PlayersPerTeam = 2;
|
||||
this.FillTeamsInOrderToCount = 2;
|
||||
this.FillTeamsInOrderToCount.SetOption(2);
|
||||
|
||||
this.SpawnNearAllies = true;
|
||||
this.DamageTeamSelf = false;
|
||||
this.SpawnNearAllies.SetOption(true);
|
||||
this.DamageTeamSelf.SetOption(false);
|
||||
|
||||
this.TeamArmorHotbar = true;
|
||||
|
||||
this.DontAllowOverfill = true;
|
||||
this.DontAllowOverfill.SetOption(true);
|
||||
|
||||
registerChatStats(
|
||||
Kills,
|
||||
|
@ -116,9 +116,9 @@ public class KitKnight extends SmashKit
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
|
||||
//Horse
|
||||
Manager.GetGame().CreatureAllowOverride = true;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(true);
|
||||
final Horse horse = player.getWorld().spawn(player.getLocation(), Horse.class);
|
||||
Manager.GetGame().CreatureAllowOverride = false;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(false);
|
||||
|
||||
//Owner
|
||||
horse.setTamed(true);
|
||||
|
@ -132,7 +132,7 @@ public class KitSkySquid extends SmashKit
|
||||
@Override
|
||||
public void activateSuperCustom(Player player)
|
||||
{
|
||||
Manager.GetGame().WorldWeatherEnabled = true;
|
||||
Manager.GetGame().WorldWeatherEnabled.SetOption(true);
|
||||
Manager.GetGame().WorldData.World.setStorm(true);
|
||||
Manager.GetGame().WorldData.World.setThundering(true);
|
||||
Manager.GetGame().WorldData.World.setThunderDuration(9999);
|
||||
@ -141,6 +141,6 @@ public class KitSkySquid extends SmashKit
|
||||
@Override
|
||||
public void deactivateSuperCustom(Player player)
|
||||
{
|
||||
Manager.GetGame().WorldWeatherEnabled = false;
|
||||
Manager.GetGame().WorldWeatherEnabled.SetOption(false);
|
||||
}
|
||||
}
|
||||
|
@ -86,10 +86,10 @@ public class PerkCowAngryHerd extends SmashPerk
|
||||
loc.add(dir);
|
||||
loc.add(UtilAlg.getLeft(dir).multiply(i*1.5));
|
||||
|
||||
Manager.GetGame().CreatureAllowOverride = true;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(true);
|
||||
Class<? extends Cow> clazz = isSuperActive(player) ? MushroomCow.class : Cow.class;
|
||||
Cow cow = player.getWorld().spawn(loc, clazz);
|
||||
Manager.GetGame().CreatureAllowOverride = false;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(false);
|
||||
|
||||
_active.add(new DataCowCharge(player, cow));
|
||||
}
|
||||
|
@ -147,9 +147,9 @@ public class Snake extends SoloGame
|
||||
"Last one alive wins!"
|
||||
});
|
||||
|
||||
this.DamageTeamSelf = true;
|
||||
this.DamageTeamSelf.SetOption(true);
|
||||
|
||||
this.HungerSet = 2;
|
||||
this.HungerSet.SetOption(2);
|
||||
|
||||
this.GemMultiplier = 0.5;
|
||||
|
||||
@ -177,9 +177,9 @@ public class Snake extends SoloGame
|
||||
Player player = GetPlayers(true).get(i);
|
||||
_color.put(player, DyeColor.getByDyeData((byte) (i % 16)));
|
||||
|
||||
this.CreatureAllowOverride = true;
|
||||
this.CreatureAllowOverride.SetOption(true);
|
||||
Sheep sheep = player.getWorld().spawn(player.getLocation(), Sheep.class);
|
||||
this.CreatureAllowOverride = false;
|
||||
this.CreatureAllowOverride.SetOption(false);
|
||||
|
||||
sheep.setColor(DyeColor.getByDyeData((byte) (i % 16)));
|
||||
sheep.setPassenger(player);
|
||||
@ -427,9 +427,9 @@ public class Snake extends SoloGame
|
||||
return;
|
||||
|
||||
//Spawn
|
||||
this.CreatureAllowOverride = true;
|
||||
this.CreatureAllowOverride.SetOption(true);
|
||||
Slime pig = loc.getWorld().spawn(loc, Slime.class);
|
||||
this.CreatureAllowOverride = false;
|
||||
this.CreatureAllowOverride.SetOption(false);
|
||||
pig.setSize(2);
|
||||
UtilEnt.Vegetate(pig);
|
||||
|
||||
@ -491,9 +491,9 @@ public class Snake extends SoloGame
|
||||
loc.subtract(player.getLocation().getDirection().setY(0));
|
||||
|
||||
//Spawn
|
||||
this.CreatureAllowOverride = true;
|
||||
this.CreatureAllowOverride.SetOption(true);
|
||||
Sheep tail = loc.getWorld().spawn(loc, Sheep.class);
|
||||
this.CreatureAllowOverride = false;
|
||||
this.CreatureAllowOverride.SetOption(false);
|
||||
|
||||
tail.setRemoveWhenFarAway(false);
|
||||
tail.setColor(_color.get(player));
|
||||
|
@ -72,12 +72,12 @@ public class SneakyAssassins extends SoloGame
|
||||
|
||||
this._npcManager = new NpcManager(this, UtilMath.random);
|
||||
|
||||
this.StrictAntiHack = true;
|
||||
this.StrictAntiHack.SetOption(true);
|
||||
|
||||
this.DamageTeamSelf = true;
|
||||
this.PrepareFreeze = false;
|
||||
this.DamageTeamSelf.SetOption(true);
|
||||
this.PrepareFreeze.SetOption(false);
|
||||
|
||||
this.HungerSet = 20;
|
||||
this.HungerSet.SetOption(20);
|
||||
|
||||
this.CompassEnabled = true;
|
||||
this.CompassGiveItem = false;
|
||||
|
@ -48,12 +48,12 @@ public class NpcManager implements Listener
|
||||
{
|
||||
Location spawn = getNpcSpawn();
|
||||
|
||||
getGame().CreatureAllowOverride = true;
|
||||
getGame().CreatureAllowOverride.SetOption(true);
|
||||
LivingEntity npc = (LivingEntity) spawn.getWorld().spawn(spawn, getDisguiseType().getEntityClass());
|
||||
npc.setCanPickupItems(false);
|
||||
npc.setRemoveWhenFarAway(false);
|
||||
UtilEnt.Vegetate(npc);
|
||||
getGame().CreatureAllowOverride = false;
|
||||
getGame().CreatureAllowOverride.SetOption(false);
|
||||
|
||||
return npc;
|
||||
}
|
||||
|
@ -103,9 +103,9 @@ public class PowerUpItem
|
||||
|
||||
UtilFirework.playFirework(itemLocation, effect);
|
||||
|
||||
_powerUpManager.getGame().CreatureAllowOverride = true;
|
||||
_powerUpManager.getGame().CreatureAllowOverride.SetOption(true);
|
||||
_npc = itemLocation.getWorld().spawn(itemLocation, Skeleton.class);
|
||||
_powerUpManager.getGame().CreatureAllowOverride = false;
|
||||
_powerUpManager.getGame().CreatureAllowOverride.SetOption(false);
|
||||
UtilEnt.Vegetate(_npc);
|
||||
UtilEnt.ghost(_npc, true, false);
|
||||
|
||||
|
@ -95,9 +95,9 @@ public class SnowFight extends TeamGame
|
||||
"Last team alive wins!"
|
||||
});
|
||||
|
||||
this.PrepareFreeze = false;
|
||||
this.PrepareFreeze.SetOption(false);
|
||||
|
||||
this.HungerSet = 20;
|
||||
this.HungerSet.SetOption(20);
|
||||
|
||||
this.CompassEnabled = true;
|
||||
this.CompassGiveItem = false;
|
||||
|
@ -166,20 +166,20 @@ public class SpeedBuilders extends SoloGame
|
||||
"Last person left wins!"
|
||||
});
|
||||
|
||||
Damage = false;
|
||||
Damage.SetOption(false);
|
||||
|
||||
HungerSet = 20;
|
||||
HealthSet = 20;
|
||||
HungerSet.SetOption(20);
|
||||
HealthSet.SetOption(20);
|
||||
|
||||
DontAllowOverfill = true;
|
||||
DontAllowOverfill.SetOption(true);
|
||||
|
||||
DeathMessages = false;
|
||||
DeathMessages.SetOption(false);
|
||||
|
||||
FixSpawnFacing = false;
|
||||
|
||||
AllowParticles = false;
|
||||
|
||||
InventoryClick = true;
|
||||
InventoryClick.SetOption(true);
|
||||
|
||||
registerStatTrackers(
|
||||
new DependableTracker(this),
|
||||
@ -323,7 +323,7 @@ public class SpeedBuilders extends SoloGame
|
||||
}
|
||||
}
|
||||
|
||||
CreatureAllowOverride = true;
|
||||
CreatureAllowOverride.SetOption(true);
|
||||
|
||||
for (MobData mobData : buildData.Mobs)
|
||||
{
|
||||
@ -337,16 +337,16 @@ public class SpeedBuilders extends SoloGame
|
||||
_middleMobs.add(entity);
|
||||
}
|
||||
|
||||
CreatureAllowOverride = false;
|
||||
CreatureAllowOverride.SetOption(false);
|
||||
}
|
||||
|
||||
public void spawnJudge()
|
||||
{
|
||||
CreatureAllowOverride = true;
|
||||
CreatureAllowOverride.SetOption(true);
|
||||
|
||||
_judgeEntity = _judgeSpawn.getWorld().spawn(_judgeSpawn, ArmorStand.class);
|
||||
|
||||
CreatureAllowOverride = false;
|
||||
CreatureAllowOverride.SetOption(false);
|
||||
|
||||
_judgeEntity.setVisible(false);
|
||||
_judgeEntity.setGravity(false);
|
||||
@ -391,11 +391,11 @@ public class SpeedBuilders extends SoloGame
|
||||
if (_judgeLaserTarget != null)
|
||||
judgeTargetLocation(null);
|
||||
|
||||
CreatureAllowOverride = true;
|
||||
CreatureAllowOverride.SetOption(true);
|
||||
|
||||
_judgeLaserTarget = _judgeEntity.getWorld().spawn(loc, ArmorStand.class);
|
||||
|
||||
CreatureAllowOverride = false;
|
||||
CreatureAllowOverride.SetOption(false);
|
||||
|
||||
_judgeLaserTarget.setVisible(false);
|
||||
_judgeLaserTarget.setGravity(false);
|
||||
@ -787,8 +787,8 @@ public class SpeedBuilders extends SoloGame
|
||||
recreation.breakAndDropItems();
|
||||
}
|
||||
|
||||
ItemPickup = true;
|
||||
BlockPlace = true;
|
||||
ItemPickup.SetOption(true);
|
||||
BlockPlace.SetOption(true);
|
||||
|
||||
_buildCountStage = 0;
|
||||
|
||||
@ -855,8 +855,8 @@ public class SpeedBuilders extends SoloGame
|
||||
|
||||
_perfectBuild.clear();
|
||||
|
||||
ItemPickup = false;
|
||||
BlockPlace = false;
|
||||
ItemPickup.SetOption(false);
|
||||
BlockPlace.SetOption(false);
|
||||
|
||||
RecreationData lowest = null;
|
||||
int lowestScore = -1;
|
||||
@ -1589,14 +1589,14 @@ public class SpeedBuilders extends SoloGame
|
||||
if (!_buildRecreations.get(event.getPlayer()).inBuildArea(block))
|
||||
return;
|
||||
|
||||
CreatureAllowOverride = true;
|
||||
CreatureAllowOverride.SetOption(true);
|
||||
|
||||
Entity entity = block.getWorld().spawnEntity(block.getLocation().add(0.5, 0, 0.5), type);
|
||||
|
||||
UtilEnt.Vegetate(entity, true);
|
||||
UtilEnt.ghost(entity, true, false);
|
||||
|
||||
CreatureAllowOverride = false;
|
||||
CreatureAllowOverride.SetOption(false);
|
||||
|
||||
_buildRecreations.get(event.getPlayer()).Mobs.add(entity);
|
||||
|
||||
|
@ -183,7 +183,7 @@ public class RecreationData
|
||||
}
|
||||
}
|
||||
|
||||
Game.CreatureAllowOverride = true;
|
||||
Game.CreatureAllowOverride.SetOption(true);
|
||||
|
||||
for (MobData mobData : buildData.Mobs)
|
||||
{
|
||||
@ -197,7 +197,7 @@ public class RecreationData
|
||||
Mobs.add(entity);
|
||||
}
|
||||
|
||||
Game.CreatureAllowOverride = false;
|
||||
Game.CreatureAllowOverride.SetOption(false);
|
||||
}
|
||||
|
||||
public void breakAndDropItems()
|
||||
|
@ -57,10 +57,10 @@ public class Spleef extends SoloGame
|
||||
"Last player alive wins!"
|
||||
});
|
||||
|
||||
this.DamagePvP = false;
|
||||
this.WorldWaterDamage = 4;
|
||||
this.DamagePvP.SetOption(false);
|
||||
this.WorldWaterDamage.SetOption(4);
|
||||
|
||||
this.PrepareFreeze = false;
|
||||
this.PrepareFreeze.SetOption(false);
|
||||
|
||||
registerStatTrackers(new SpleefBlockDestroyStatTracker(this));
|
||||
|
||||
|
@ -53,10 +53,10 @@ public class SpleefTeams extends TeamGame
|
||||
"Last team alive wins!"
|
||||
});
|
||||
|
||||
this.DamagePvP = false;
|
||||
this.WorldWaterDamage = 4;
|
||||
this.DamagePvP.SetOption(false);
|
||||
this.WorldWaterDamage.SetOption(4);
|
||||
|
||||
this.PrepareFreeze = false;
|
||||
this.PrepareFreeze.SetOption(false);
|
||||
|
||||
this.TeamArmor = true;
|
||||
this.TeamArmorHotbar = true;
|
||||
|
@ -44,12 +44,12 @@ public class SquidShooter extends SoloGame
|
||||
"First player to 20 kills wins."
|
||||
});
|
||||
|
||||
this.DeathOut = false;
|
||||
this.DamageSelf = false;
|
||||
this.DamageTeamSelf = true;
|
||||
this.PrepareFreeze = false;
|
||||
this.DeathOut.SetOption(false);
|
||||
this.DamageSelf.SetOption(false);
|
||||
this.DamageTeamSelf.SetOption(true);
|
||||
this.PrepareFreeze.SetOption(false);
|
||||
this.CompassEnabled = true;
|
||||
this.KitRegisterState = GameState.Prepare;
|
||||
this.KitRegisterState.SetOption(GameState.Prepare);
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
|
@ -70,9 +70,9 @@ public class Stacker extends SoloGame implements IThrown
|
||||
Location loc = GetTeamList().get(0).GetSpawns().get(UtilMath.r(GetTeamList().get(0).GetSpawns().size()));
|
||||
|
||||
//Spawn
|
||||
this.CreatureAllowOverride = true;
|
||||
this.CreatureAllowOverride.SetOption(true);
|
||||
Pig pig = loc.getWorld().spawn(loc, Pig.class);
|
||||
this.CreatureAllowOverride = false;
|
||||
this.CreatureAllowOverride.SetOption(false);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -39,7 +39,7 @@ public class SoloSurvivalGames extends SurvivalGames
|
||||
"Last tribute alive wins!"
|
||||
});
|
||||
|
||||
this.DamageTeamSelf = true;
|
||||
this.DamageTeamSelf.SetOption(true);
|
||||
|
||||
}
|
||||
|
||||
|
@ -184,60 +184,60 @@ public abstract class SurvivalGames extends Game
|
||||
|
||||
// Manager.GetAntiStack().SetEnabled(false);
|
||||
|
||||
StrictAntiHack = true;
|
||||
StrictAntiHack.SetOption(true);
|
||||
|
||||
AnnounceStay = false;
|
||||
AnnounceStay.SetOption(false);
|
||||
|
||||
HideTeamSheep = true;
|
||||
|
||||
this.ReplaceTeamsWithKits = true;
|
||||
|
||||
GameTimeout.setOption(1500000);
|
||||
GameTimeout.SetOption(1500000);
|
||||
|
||||
QuitDropItems = true;
|
||||
QuitDropItems.SetOption(true);
|
||||
|
||||
WorldTimeSet = 0;
|
||||
WorldBoundaryKill = false;
|
||||
WorldTimeSet.SetOption(0);
|
||||
WorldBoundaryKill.SetOption(false);
|
||||
|
||||
DamageSelf = true;
|
||||
DamageTeamSelf = true;
|
||||
DamageSelf.SetOption(true);
|
||||
DamageTeamSelf.SetOption(true);
|
||||
|
||||
DeathDropItems = true;
|
||||
DeathDropItems.SetOption(true);
|
||||
|
||||
ItemDrop = true;
|
||||
ItemPickup = true;
|
||||
ItemDrop.SetOption(true);
|
||||
ItemPickup.SetOption(true);
|
||||
|
||||
InventoryClick = true;
|
||||
InventoryOpenBlock = true;
|
||||
InventoryOpenChest = true;
|
||||
InventoryClick.SetOption(true);
|
||||
InventoryOpenBlock.SetOption(true);
|
||||
InventoryOpenChest.SetOption(true);
|
||||
|
||||
PlaySoundGameStart = false;
|
||||
PrepareTime = 15000;
|
||||
|
||||
DeadBodies = true;
|
||||
|
||||
BlockBreakAllow.add(Material.WEB.getId()); // Web
|
||||
BlockPlaceAllow.add(Material.WEB.getId());
|
||||
BlockBreakAllow.GetOption().add(Material.WEB.getId()); // Web
|
||||
BlockPlaceAllow.GetOption().add(Material.WEB.getId());
|
||||
|
||||
BlockBreakAllow.add(Material.LEAVES.getId()); // Leaves
|
||||
BlockBreakAllow.add(Material.LEAVES_2.getId()); // Leaves
|
||||
BlockBreakAllow.GetOption().add(Material.LEAVES.getId()); // Leaves
|
||||
BlockBreakAllow.GetOption().add(Material.LEAVES_2.getId()); // Leaves
|
||||
|
||||
BlockPlaceAllow.add(Material.CAKE_BLOCK.getId());
|
||||
BlockBreakAllow.add(Material.CAKE_BLOCK.getId());
|
||||
BlockPlaceAllow.GetOption().add(Material.CAKE_BLOCK.getId());
|
||||
BlockBreakAllow.GetOption().add(Material.CAKE_BLOCK.getId());
|
||||
|
||||
BlockBreakAllow.add(Material.LONG_GRASS.getId());
|
||||
BlockBreakAllow.add(Material.RED_ROSE.getId());
|
||||
BlockBreakAllow.add(Material.YELLOW_FLOWER.getId());
|
||||
BlockBreakAllow.add(Material.BROWN_MUSHROOM.getId());
|
||||
BlockBreakAllow.add(Material.RED_MUSHROOM.getId());
|
||||
BlockBreakAllow.add(Material.DEAD_BUSH.getId());
|
||||
BlockBreakAllow.add(Material.CARROT.getId());
|
||||
BlockBreakAllow.add(Material.POTATO.getId());
|
||||
BlockBreakAllow.add(Material.DOUBLE_PLANT.getId());
|
||||
BlockBreakAllow.add(Material.CROPS.getId());
|
||||
BlockBreakAllow.add(Material.SAPLING.getId());
|
||||
BlockBreakAllow.add(Material.VINE.getId());
|
||||
BlockBreakAllow.add(Material.WATER_LILY.getId());
|
||||
BlockBreakAllow.GetOption().add(Material.LONG_GRASS.getId());
|
||||
BlockBreakAllow.GetOption().add(Material.RED_ROSE.getId());
|
||||
BlockBreakAllow.GetOption().add(Material.YELLOW_FLOWER.getId());
|
||||
BlockBreakAllow.GetOption().add(Material.BROWN_MUSHROOM.getId());
|
||||
BlockBreakAllow.GetOption().add(Material.RED_MUSHROOM.getId());
|
||||
BlockBreakAllow.GetOption().add(Material.DEAD_BUSH.getId());
|
||||
BlockBreakAllow.GetOption().add(Material.CARROT.getId());
|
||||
BlockBreakAllow.GetOption().add(Material.POTATO.getId());
|
||||
BlockBreakAllow.GetOption().add(Material.DOUBLE_PLANT.getId());
|
||||
BlockBreakAllow.GetOption().add(Material.CROPS.getId());
|
||||
BlockBreakAllow.GetOption().add(Material.SAPLING.getId());
|
||||
BlockBreakAllow.GetOption().add(Material.VINE.getId());
|
||||
BlockBreakAllow.GetOption().add(Material.WATER_LILY.getId());
|
||||
|
||||
// Manager.GetStatsManager().addTable(GetName(), "kills", "deaths",
|
||||
// "chestsOpened");
|
||||
@ -452,14 +452,14 @@ public abstract class SurvivalGames extends Game
|
||||
|
||||
if (time > 22000 || time < 14000)
|
||||
{
|
||||
WorldTimeSet = (WorldTimeSet + 4) % 24000;
|
||||
WorldTimeSet.SetOption((WorldTimeSet.GetOption() + 4) % 24000);
|
||||
}
|
||||
else
|
||||
{
|
||||
WorldTimeSet = (WorldTimeSet + 16) % 24000;
|
||||
WorldTimeSet.SetOption((WorldTimeSet.GetOption() + 16) % 24000);
|
||||
}
|
||||
|
||||
WorldData.World.setTime(WorldTimeSet);
|
||||
WorldData.World.setTime(WorldTimeSet.GetOption());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@ -635,7 +635,7 @@ public abstract class SurvivalGames extends Game
|
||||
{
|
||||
_deathMatchTeleported = true;
|
||||
|
||||
WorldTimeSet = 0;
|
||||
WorldTimeSet.SetOption(0);
|
||||
WorldData.World.setTime(15000);
|
||||
|
||||
for (GameTeam team : GetTeamList())
|
||||
|
@ -172,51 +172,51 @@ public class SurvivalGamesTeams extends TeamGame
|
||||
setItemMerge(true);
|
||||
// Manager.GetAntiStack().SetEnabled(false);
|
||||
|
||||
this.GameTimeout.setOption(9600000);
|
||||
this.GameTimeout.SetOption(9600000);
|
||||
|
||||
this.WorldTimeSet = 0;
|
||||
this.WorldBoundaryKill = false;
|
||||
this.WorldTimeSet.SetOption(0);
|
||||
this.WorldBoundaryKill.SetOption(false);
|
||||
|
||||
SpawnNearAllies = true;
|
||||
SpawnNearEnemies = true; //This is to ensure theres no 'gaps' of 1 between teams, hence forcing a team to get split.
|
||||
SpawnNearAllies.SetOption(true);
|
||||
SpawnNearEnemies.SetOption(true); //This is to ensure theres no 'gaps' of 1 between teams, hence forcing a team to get split.
|
||||
|
||||
this.DamageSelf = true;
|
||||
this.DamageTeamSelf = false;
|
||||
this.DamageSelf.SetOption(true);
|
||||
this.DamageTeamSelf.SetOption(false);
|
||||
|
||||
this.DeathDropItems = true;
|
||||
this.DeathDropItems.SetOption(true);
|
||||
|
||||
this.ItemDrop = true;
|
||||
this.ItemPickup = true;
|
||||
this.ItemDrop.SetOption(true);
|
||||
this.ItemPickup.SetOption(true);
|
||||
|
||||
this.CompassEnabled = false; //XXX
|
||||
|
||||
this.InventoryClick = true;
|
||||
this.InventoryOpenBlock = true;
|
||||
this.InventoryOpenChest = true;
|
||||
this.InventoryClick.SetOption(true);
|
||||
this.InventoryOpenBlock.SetOption(true);
|
||||
this.InventoryOpenChest.SetOption(true);
|
||||
|
||||
//Blocks
|
||||
this.BlockBreakAllow.add(46); //TNT
|
||||
this.BlockPlaceAllow.add(46);
|
||||
this.BlockBreakAllow.GetOption().add(46); //TNT
|
||||
this.BlockPlaceAllow.GetOption().add(46);
|
||||
|
||||
this.BlockBreakAllow.add(30); //Web
|
||||
this.BlockPlaceAllow.add(30);
|
||||
this.BlockBreakAllow.GetOption().add(30); //Web
|
||||
this.BlockPlaceAllow.GetOption().add(30);
|
||||
|
||||
this.BlockBreakAllow.add(132); //Tripwire
|
||||
this.BlockPlaceAllow.add(132);
|
||||
this.BlockBreakAllow.GetOption().add(132); //Tripwire
|
||||
this.BlockPlaceAllow.GetOption().add(132);
|
||||
|
||||
this.BlockBreakAllow.add(131); //Wire Hook
|
||||
this.BlockPlaceAllow.add(131);
|
||||
this.BlockBreakAllow.GetOption().add(131); //Wire Hook
|
||||
this.BlockPlaceAllow.GetOption().add(131);
|
||||
|
||||
this.BlockBreakAllow.add(55); //Redstone Dust
|
||||
this.BlockPlaceAllow.add(55);
|
||||
this.BlockBreakAllow.GetOption().add(55); //Redstone Dust
|
||||
this.BlockPlaceAllow.GetOption().add(55);
|
||||
|
||||
this.BlockBreakAllow.add(72); //Wood Pressure Plate
|
||||
this.BlockPlaceAllow.add(72);
|
||||
this.BlockBreakAllow.GetOption().add(72); //Wood Pressure Plate
|
||||
this.BlockPlaceAllow.GetOption().add(72);
|
||||
|
||||
this.BlockBreakAllow.add(69); //Lever
|
||||
this.BlockPlaceAllow.add(69);
|
||||
this.BlockBreakAllow.GetOption().add(69); //Lever
|
||||
this.BlockPlaceAllow.GetOption().add(69);
|
||||
|
||||
this.BlockBreakAllow.add(18); //Leaves
|
||||
this.BlockBreakAllow.GetOption().add(18); //Leaves
|
||||
|
||||
//SPREAD
|
||||
_spreadType = 1;//UtilMath.r(3);
|
||||
@ -255,7 +255,7 @@ public class SurvivalGamesTeams extends TeamGame
|
||||
|
||||
//Tournament
|
||||
if (Manager.IsTournamentServer())
|
||||
QuitOut = false;
|
||||
QuitOut.SetOption(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -1093,14 +1093,14 @@ public class SurvivalGamesTeams extends TeamGame
|
||||
|
||||
if (time > 22000 || time < 14000)
|
||||
{
|
||||
WorldTimeSet = (WorldTimeSet + 4)%24000;
|
||||
WorldTimeSet.SetOption((WorldTimeSet.GetOption() + 4)%24000);
|
||||
}
|
||||
else
|
||||
{
|
||||
WorldTimeSet = (WorldTimeSet + 16)%24000;
|
||||
WorldTimeSet.SetOption((WorldTimeSet.GetOption() + 16)%24000);
|
||||
}
|
||||
|
||||
WorldData.World.setTime(WorldTimeSet);
|
||||
WorldData.World.setTime(WorldTimeSet.GetOption());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -52,14 +52,14 @@ public class TeamSurvivalGames extends SurvivalGames
|
||||
});
|
||||
|
||||
this.PlayersPerTeam = 2;
|
||||
this.FillTeamsInOrderToCount = 2;
|
||||
this.FillTeamsInOrderToCount.SetOption(2);
|
||||
|
||||
this.SpawnNearAllies = true;
|
||||
this.SpawnNearEnemies = true;
|
||||
this.SpawnNearAllies.SetOption(true);
|
||||
this.SpawnNearEnemies.SetOption(true);
|
||||
|
||||
this.DamageTeamSelf = false;
|
||||
this.DamageTeamSelf.SetOption(false);
|
||||
|
||||
this.DontAllowOverfill = true;
|
||||
this.DontAllowOverfill.SetOption(true);
|
||||
|
||||
}
|
||||
|
||||
|
@ -71,10 +71,10 @@ public class Tug extends TeamGame
|
||||
|
||||
});
|
||||
|
||||
this.HungerSet = 20;
|
||||
this.DeathOut = false;
|
||||
this.HungerSet.SetOption(20);
|
||||
this.DeathOut.SetOption(false);
|
||||
|
||||
this.DeathSpectateSecs = 20;
|
||||
this.DeathSpectateSecs.SetOption(20);
|
||||
|
||||
registerChatStats();
|
||||
}
|
||||
@ -146,24 +146,24 @@ public class Tug extends TeamGame
|
||||
{
|
||||
if (_redCreatures.size() < 30)
|
||||
{
|
||||
this.CreatureAllowOverride = true;
|
||||
this.CreatureAllowOverride.SetOption(true);
|
||||
Location loc = UtilAlg.Random(_redMobs);
|
||||
Creature ent = loc.getWorld().spawn(loc, Pig.class);
|
||||
ent.setMaxHealth(10);
|
||||
ent.setHealth(10);
|
||||
this.CreatureAllowOverride = false;
|
||||
this.CreatureAllowOverride.SetOption(false);
|
||||
|
||||
_redCreatures.add(new TugCreature(this, ent, _blueLives));
|
||||
}
|
||||
|
||||
if (_blueCreatures.size() < 30)
|
||||
{
|
||||
this.CreatureAllowOverride = true;
|
||||
this.CreatureAllowOverride.SetOption(true);
|
||||
Location loc = UtilAlg.Random(_blueMobs);
|
||||
Creature ent = loc.getWorld().spawn(loc, Sheep.class);
|
||||
ent.setMaxHealth(10);
|
||||
ent.setHealth(10);
|
||||
this.CreatureAllowOverride = false;
|
||||
this.CreatureAllowOverride.SetOption(false);
|
||||
|
||||
_blueCreatures.add(new TugCreature(this, ent, _redLives));
|
||||
}
|
||||
|
@ -141,15 +141,15 @@ public class TurfForts extends TeamGame
|
||||
"Take over all the turf to win!"
|
||||
});
|
||||
|
||||
this.StrictAntiHack = true;
|
||||
this.HungerSet = 20;
|
||||
this.DeathOut = false;
|
||||
this.BlockPlaceAllow.add(35);
|
||||
this.BlockBreakAllow.add(35);
|
||||
this.ItemDrop = false;
|
||||
this.ItemPickup = false;
|
||||
this.DamageSelf = false;
|
||||
this.DeathSpectateSecs = 4;
|
||||
this.StrictAntiHack.SetOption(true);
|
||||
this.HungerSet.SetOption(20);
|
||||
this.DeathOut.SetOption(false);
|
||||
this.BlockPlaceAllow.GetOption().add(35);
|
||||
this.BlockBreakAllow.GetOption().add(35);
|
||||
this.ItemDrop.SetOption(false);
|
||||
this.ItemPickup.SetOption(false);
|
||||
this.DamageSelf.SetOption(false);
|
||||
this.DeathSpectateSecs.SetOption(4);
|
||||
|
||||
_breakStatTracker = new BlockBreakStatTracker(this, false);
|
||||
|
||||
|
@ -116,28 +116,28 @@ public class TypeWars extends TeamGame
|
||||
|
||||
new StaffKillMonitorManager(this);
|
||||
|
||||
this.DeathOut = false;
|
||||
this.DamageTeamSelf = false;
|
||||
this.DamageSelf = false;
|
||||
this.DamageTeamOther = false;
|
||||
this.DeathSpectateSecs = 0;
|
||||
this.HungerSet = 20;
|
||||
this.WorldBoundaryKill = true;
|
||||
this.DeathOut.SetOption(false);
|
||||
this.DamageTeamSelf.SetOption(false);
|
||||
this.DamageSelf.SetOption(false);
|
||||
this.DamageTeamOther.SetOption(false);
|
||||
this.DeathSpectateSecs.SetOption(0);
|
||||
this.HungerSet.SetOption(20);
|
||||
this.WorldBoundaryKill.SetOption(true);
|
||||
this.CompassEnabled = false;
|
||||
this.TeamArmor = true;
|
||||
this.TeamArmorHotbar = false;
|
||||
this.WorldTimeSet = 6000;
|
||||
this.DamageEvP = false;
|
||||
this.DamagePvE = false;
|
||||
this.DamagePvP = false;
|
||||
this.WorldTimeSet.SetOption(6000);
|
||||
this.DamageEvP.SetOption(false);
|
||||
this.DamagePvE.SetOption(false);
|
||||
this.DamagePvP.SetOption(false);
|
||||
this.TeamArmorHotbar = true;
|
||||
this.Damage = false;
|
||||
this.CreatureAllow = false;
|
||||
this.Damage.SetOption(false);
|
||||
this.CreatureAllow.SetOption(false);
|
||||
this.PrepareTime = 50000;
|
||||
this.PrepareFreeze = false;
|
||||
this.PrepareFreeze.SetOption(false);
|
||||
this.PlaySoundGameStart = false;
|
||||
this.EnableTutorials = true;
|
||||
this.PrepareFreeze = true;
|
||||
this.PrepareFreeze.SetOption(true);
|
||||
this.AllowParticles = false;
|
||||
|
||||
_activeMinions = new ArrayList<>();
|
||||
@ -231,10 +231,10 @@ public class TypeWars extends TeamGame
|
||||
if(i == 1)
|
||||
loc = blue;
|
||||
|
||||
this.CreatureAllowOverride = true;
|
||||
this.CreatureAllowOverride.SetOption(true);
|
||||
Giant giant = loc.getWorld().spawn(loc, Giant.class);
|
||||
_giantLocs.put(giant, loc.clone());
|
||||
this.CreatureAllowOverride = false;
|
||||
this.CreatureAllowOverride.SetOption(false);
|
||||
giant.setRemoveWhenFarAway(false);
|
||||
UtilEnt.Vegetate(giant, true);
|
||||
UtilEnt.ghost(giant, true, false);
|
||||
@ -492,10 +492,10 @@ public class TypeWars extends TeamGame
|
||||
continue;
|
||||
|
||||
int rdm = UtilMath.r(_minionSpawns.get(teams).size());
|
||||
this.CreatureAllowOverride = true;
|
||||
this.CreatureAllowOverride.SetOption(true);
|
||||
Minion minion = new Minion(Manager, _minionSpawns.get(teams).get(rdm), _minionSpawns.get(team).get(rdm), teams, event.getPlayer(), true, MinionSize.BOSS.getRandomType(), rdm);
|
||||
_activeMinions.add(minion);
|
||||
this.CreatureAllowOverride = false;
|
||||
this.CreatureAllowOverride.SetOption(false);
|
||||
UtilPlayer.message(event.getPlayer(), F.main("Boss", "You have spawned a Boss"));
|
||||
}
|
||||
}
|
||||
@ -531,14 +531,14 @@ public class TypeWars extends TeamGame
|
||||
return;
|
||||
}
|
||||
|
||||
this.CreatureAllowOverride = true;
|
||||
this.CreatureAllowOverride.SetOption(true);
|
||||
_moneyMap.put(event.getPlayer(), _moneyMap.get(event.getPlayer()) - type.getCost());
|
||||
UtilTextMiddle.display("", ChatColor.GRAY + "You bought a Minion.", event.getPlayer());
|
||||
int rdm = UtilMath.r(_minionSpawns.get(teams).size());
|
||||
Minion minion = new Minion(Manager, _minionSpawns.get(teams).get(rdm), _minionSpawns.get(team).get(rdm), teams, event.getPlayer(), true, type.getRandomType(), rdm);
|
||||
Bukkit.getPluginManager().callEvent(new SummonMinionEvent(event.getPlayer(), minion));
|
||||
_activeMinions.add(minion);
|
||||
this.CreatureAllowOverride = false;
|
||||
this.CreatureAllowOverride.SetOption(false);
|
||||
}
|
||||
}
|
||||
return;
|
||||
@ -576,7 +576,7 @@ public class TypeWars extends TeamGame
|
||||
{
|
||||
_lastSpawnedRed = System.currentTimeMillis();
|
||||
|
||||
this.CreatureAllowOverride = true;
|
||||
this.CreatureAllowOverride.SetOption(true);
|
||||
int rdm = UtilMath.r(_minionSpawns.get(GetTeamList().get(0)).size());
|
||||
Minion minion = null;
|
||||
|
||||
@ -592,7 +592,7 @@ public class TypeWars extends TeamGame
|
||||
}
|
||||
_activeMinions.add(minion);
|
||||
|
||||
this.CreatureAllowOverride = false;
|
||||
this.CreatureAllowOverride.SetOption(false);
|
||||
|
||||
if(_timeToSpawnRed > 5000 / (GetTeamList().get(1).GetPlayers(true).size() > 0 ? GetTeamList().get(1).GetPlayers(true).size() : 1))
|
||||
_timeToSpawnRed = _timeToSpawnRed - 75;
|
||||
@ -605,7 +605,7 @@ public class TypeWars extends TeamGame
|
||||
{
|
||||
_lastSpawnedBlue = System.currentTimeMillis();
|
||||
|
||||
this.CreatureAllowOverride = true;
|
||||
this.CreatureAllowOverride.SetOption(true);
|
||||
int rdm = UtilMath.r(_minionSpawns.get(GetTeamList().get(1)).size());
|
||||
Minion minion = null;
|
||||
if(_minionsSpawned.get(GetTeamList().get(1)) >= 100)
|
||||
@ -619,7 +619,7 @@ public class TypeWars extends TeamGame
|
||||
minion = new Minion(Manager, _minionSpawns.get(GetTeamList().get(1)).get(rdm), _minionSpawns.get(GetTeamList().get(0)).get(rdm), GetTeamList().get(1), rdm);
|
||||
}
|
||||
_activeMinions.add(minion);
|
||||
this.CreatureAllowOverride = false;
|
||||
this.CreatureAllowOverride.SetOption(false);
|
||||
|
||||
if(_timeToSpawnBlue > 5000 / (GetTeamList().get(0).GetPlayers(true).size() > 0 ? GetTeamList().get(0).GetPlayers(true).size() : 1))
|
||||
_timeToSpawnBlue = _timeToSpawnRed - 75;
|
||||
|
@ -36,11 +36,11 @@ public class TutorialTypeWars extends GameTutorial
|
||||
{
|
||||
ArrayList<Location> locations = UtilShapes.getLinesDistancedPoints(_typeWars.getMinionSpawns().get(getTeam()).get(4), _typeWars.getMinionSpawns().get(team).get(4), 1);
|
||||
_manager.GetCreature().SetForce(true);
|
||||
_manager.GetGame().CreatureAllowOverride = true;
|
||||
_manager.GetGame().CreatureAllowOverride.SetOption(true);
|
||||
Minion minion = new Minion(_manager, locations.get(locations.size() - 35), _typeWars.getMinionSpawns().get(team).get(4), getTeam(), 4);
|
||||
minion.changeName("Fishing");
|
||||
((TypeWars) _manager.GetGame()).getActiveMinions().add(minion);
|
||||
_manager.GetGame().CreatureAllowOverride = false;
|
||||
_manager.GetGame().CreatureAllowOverride.SetOption(false);
|
||||
_manager.GetCreature().SetForce(false);
|
||||
}
|
||||
}
|
||||
|
@ -139,57 +139,57 @@ public class UHC extends TeamGame
|
||||
|
||||
this.HideTeamSheep = true;
|
||||
|
||||
this.StrictAntiHack = true;
|
||||
this.StrictAntiHack.SetOption(true);
|
||||
|
||||
AnnounceStay = false;
|
||||
AnnounceStay.SetOption(false);
|
||||
|
||||
this.GameTimeout = 10800000;
|
||||
this.GameTimeout.SetOption(10800000);
|
||||
|
||||
this.DamagePvP = false;
|
||||
this.DamagePvP.SetOption(false);
|
||||
|
||||
this.DeathDropItems = true;
|
||||
this.DeathDropItems.SetOption(true);
|
||||
|
||||
this.ItemDrop = true;
|
||||
this.ItemPickup = true;
|
||||
this.ItemDrop.SetOption(true);
|
||||
this.ItemPickup.SetOption(true);
|
||||
|
||||
this.BlockBreak = true;
|
||||
this.BlockPlace = true;
|
||||
this.BlockBreak.SetOption(true);
|
||||
this.BlockPlace.SetOption(true);
|
||||
|
||||
this.InventoryOpenBlock = true;
|
||||
this.InventoryOpenChest = true;
|
||||
this.InventoryClick = true;
|
||||
this.InventoryOpenBlock.SetOption(true);
|
||||
this.InventoryOpenChest.SetOption(true);
|
||||
this.InventoryClick.SetOption(true);
|
||||
|
||||
this.DeathOut = true;
|
||||
this.QuitOut = false;
|
||||
this.DeathOut.SetOption(true);
|
||||
this.QuitOut.SetOption(false);
|
||||
|
||||
this.CreatureAllow = true;
|
||||
this.CreatureAllow.SetOption(true);
|
||||
|
||||
this.AnnounceStay = false;
|
||||
this.AnnounceStay.SetOption(false);
|
||||
|
||||
this.DisplayLobbySide = true;
|
||||
this.DisplayLobbySide.SetOption(true);
|
||||
|
||||
this.DeathMessages = false;
|
||||
this.DeathMessages.SetOption(false);
|
||||
|
||||
this.SoupEnabled = false;
|
||||
|
||||
this.CompassEnabled = true;
|
||||
this.CompassGiveItem = false;
|
||||
|
||||
this.WorldBoundaryKill = false;
|
||||
this.WorldBoundaryKill.SetOption(false);
|
||||
|
||||
this.TickPerTeleport = 3;
|
||||
this.TickPerTeleport.SetOption(3);
|
||||
|
||||
this.GemBoosterEnabled = false;
|
||||
this.GemDoubleEnabled = false;
|
||||
this.GemHunterEnabled = false;
|
||||
|
||||
this.WorldBoneMeal = true;
|
||||
this.WorldBoneMeal.SetOption(true);
|
||||
|
||||
this.DontAllowOverfill = true;
|
||||
this.DontAllowOverfill.SetOption(true);
|
||||
|
||||
this.GadgetsDisabled = true;
|
||||
this.GadgetsDisabled.SetOption(true);
|
||||
|
||||
WorldTimeSet = -1;
|
||||
WorldTimeSet.SetOption(-1);
|
||||
|
||||
CraftRecipes();
|
||||
|
||||
@ -564,9 +564,9 @@ public class UHC extends TeamGame
|
||||
for (Player player : UtilServer.getPlayers())
|
||||
player.playSound(player.getLocation(), Sound.ENDERDRAGON_GROWL, 1f, 1f);
|
||||
|
||||
this.DamagePvP = true;
|
||||
this.DamagePvP.SetOption(true);
|
||||
this.CompassGiveItem = true;
|
||||
this.QuitOut = true;
|
||||
this.QuitOut.SetOption(true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -579,7 +579,7 @@ public class UHC extends TeamGame
|
||||
if (event.getType() != UpdateType.FAST)
|
||||
return;
|
||||
|
||||
if (DamagePvP)
|
||||
if (DamagePvP.GetOption())
|
||||
return;
|
||||
|
||||
WorldData.World.setTime(2000);
|
||||
@ -748,7 +748,7 @@ public class UHC extends TeamGame
|
||||
if (!IsAlive(player))
|
||||
return;
|
||||
|
||||
if (!QuitOut)
|
||||
if (!QuitOut.GetOption())
|
||||
return;
|
||||
|
||||
// Drop Items
|
||||
@ -1216,7 +1216,7 @@ public class UHC extends TeamGame
|
||||
teamsAlive.add(team);
|
||||
|
||||
// Offline Player Team
|
||||
if (!QuitOut)
|
||||
if (!QuitOut.GetOption())
|
||||
for (GameTeam team : RejoinTeam.values())
|
||||
teamsAlive.add(team);
|
||||
|
||||
@ -1411,7 +1411,7 @@ public class UHC extends TeamGame
|
||||
if (damagerEnt instanceof Player)
|
||||
{
|
||||
// PvP
|
||||
if (!DamagePvP && damagee != null)
|
||||
if (!DamagePvP.GetOption() && damagee != null)
|
||||
event.setCancelled(true);
|
||||
|
||||
Player damager = (Player) damagerEnt;
|
||||
|
@ -122,9 +122,9 @@ public class Valentines extends SoloGame
|
||||
"Slowest players are eliminated!"
|
||||
});
|
||||
|
||||
this.DamageTeamSelf = true;
|
||||
this.HungerSet = 20;
|
||||
this.HealthSet = 20;
|
||||
this.DamageTeamSelf.SetOption(true);
|
||||
this.HungerSet.SetOption(20);
|
||||
this.HealthSet.SetOption(20);
|
||||
|
||||
EnableTutorials = true;
|
||||
|
||||
@ -170,14 +170,14 @@ public class Valentines extends SoloGame
|
||||
{
|
||||
_playersOutPerRound = Math.max(1, (int)(GetPlayers(true).size()/8d));
|
||||
|
||||
CreatureAllowOverride = true;
|
||||
CreatureAllowOverride.SetOption(true);
|
||||
_cow = GetSpectatorLocation().getWorld().spawn(GetSpectatorLocation(), Cow.class);
|
||||
_cow.setCustomName(C.cGreen + C.Bold + _cowName);
|
||||
_cow.setCustomNameVisible(true);
|
||||
|
||||
UtilEnt.Vegetate(_cow);
|
||||
UtilEnt.ghost(_cow, true, false);
|
||||
CreatureAllowOverride = false;
|
||||
CreatureAllowOverride.SetOption(false);
|
||||
}
|
||||
if (event.GetState() == GameState.End || event.GetState() == GameState.Dead)
|
||||
_music.cancel();
|
||||
@ -404,7 +404,7 @@ public class Valentines extends SoloGame
|
||||
|
||||
public void pigSpawn()
|
||||
{
|
||||
CreatureAllowOverride = true;
|
||||
CreatureAllowOverride.SetOption(true);
|
||||
|
||||
int toSpawn = Math.max(1, GetPlayers(true).size()-_playersOutPerRound);
|
||||
|
||||
@ -432,7 +432,7 @@ public class Valentines extends SoloGame
|
||||
}
|
||||
}
|
||||
|
||||
CreatureAllowOverride = false;
|
||||
CreatureAllowOverride.SetOption(false);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -106,7 +106,7 @@ public class TutorialValentines extends GameTutorial
|
||||
//Spawn
|
||||
if (_pigs.size() < 5 && tick % 15 == 0)
|
||||
{
|
||||
Host.CreatureAllowOverride = true;
|
||||
Host.CreatureAllowOverride.SetOption(true);
|
||||
|
||||
//Spawn
|
||||
Pig pig = _pigSpawn.getWorld().spawn(_pigSpawn, Pig.class);
|
||||
@ -119,7 +119,7 @@ public class TutorialValentines extends GameTutorial
|
||||
|
||||
_pigs.put(pig, 0);;
|
||||
|
||||
Host.CreatureAllowOverride = false;
|
||||
Host.CreatureAllowOverride.SetOption(false);
|
||||
}
|
||||
|
||||
//Move
|
||||
@ -178,7 +178,7 @@ public class TutorialValentines extends GameTutorial
|
||||
}
|
||||
|
||||
//Spawn Cows
|
||||
Host.CreatureAllowOverride = true;
|
||||
Host.CreatureAllowOverride.SetOption(true);
|
||||
|
||||
_cowBoy = _pigSpawn.getWorld().spawn(Host.WorldData.GetDataLocs("BROWN").get(0), Cow.class);
|
||||
_cowBoy.setCustomName(C.cGreenB + "Calvin");
|
||||
@ -190,7 +190,7 @@ public class TutorialValentines extends GameTutorial
|
||||
_cowGirl.setCustomNameVisible(true);
|
||||
UtilEnt.Vegetate(_cowGirl);
|
||||
|
||||
Host.CreatureAllowOverride = false;
|
||||
Host.CreatureAllowOverride.SetOption(false);
|
||||
|
||||
|
||||
//Player Data
|
||||
|
@ -22,9 +22,9 @@ public class PlayerCopyWither
|
||||
|
||||
_owner = owner;
|
||||
|
||||
Host.CreatureAllowOverride = true;
|
||||
Host.CreatureAllowOverride.SetOption(true);
|
||||
_ent = owner.getWorld().spawn(owner.getLocation(), Skeleton.class);
|
||||
Host.CreatureAllowOverride = false;
|
||||
Host.CreatureAllowOverride.SetOption(false);
|
||||
|
||||
UtilEnt.ghost(_ent, true, false);
|
||||
|
||||
|
@ -116,26 +116,26 @@ public class WitherGame extends TeamGame implements IBlockRestorer
|
||||
C.cRed + "Withers" + C.cWhite + " Kill all the Humans within 5 Minutes",
|
||||
});
|
||||
|
||||
this.DeathOut = true;
|
||||
this.DamageTeamSelf = false;
|
||||
this.DamageSelf = false;
|
||||
this.DeathSpectateSecs = 4;
|
||||
this.HungerSet = 20;
|
||||
this.WorldBoundaryKill = false;
|
||||
this.DeathOut.SetOption(true);
|
||||
this.DamageTeamSelf.SetOption(false);
|
||||
this.DamageSelf.SetOption(false);
|
||||
this.DeathSpectateSecs.SetOption(4);
|
||||
this.HungerSet.SetOption(20);
|
||||
this.WorldBoundaryKill.SetOption(false);
|
||||
this.CompassEnabled = false;
|
||||
|
||||
//Customizing for the Editor kit
|
||||
this.BlockBreak = true;
|
||||
this.BlockPlace = true;
|
||||
this.ItemPickup = true;
|
||||
this.BlockBreak.SetOption(true);
|
||||
this.BlockPlace.SetOption(true);
|
||||
this.ItemPickup.SetOption(true);
|
||||
|
||||
this.KitRegisterState = GameState.Prepare;
|
||||
this.KitRegisterState.SetOption(GameState.Prepare);
|
||||
|
||||
this.TeamArmor = true;
|
||||
this.TeamArmorHotbar = false;
|
||||
|
||||
this.InventoryClick = false;
|
||||
this.InventoryOpenBlock = false;
|
||||
this.InventoryClick.SetOption(false);
|
||||
this.InventoryOpenBlock.SetOption(false);
|
||||
|
||||
_help = new String[]
|
||||
{
|
||||
|
@ -155,17 +155,17 @@ public class Wizards extends SoloGame
|
||||
|
||||
_wizard = new WizardSpellMenu("Wizard Spell Menu", getArcadeManager().getPlugin(), this);
|
||||
|
||||
AnnounceStay = false;
|
||||
BlockBreak = true;
|
||||
BlockPlace = true;
|
||||
ItemPickup = true;
|
||||
ItemDrop = true;
|
||||
InventoryOpenBlock = true;
|
||||
InventoryOpenChest = true;
|
||||
InventoryClick = true;
|
||||
DisableKillCommand = false;
|
||||
AnnounceStay.SetOption(false);
|
||||
BlockBreak.SetOption(true);
|
||||
BlockPlace.SetOption(true);
|
||||
ItemPickup.SetOption(true);
|
||||
ItemDrop.SetOption(true);
|
||||
InventoryOpenBlock.SetOption(true);
|
||||
InventoryOpenChest.SetOption(true);
|
||||
InventoryClick.SetOption(true);
|
||||
DisableKillCommand.SetOption(false);
|
||||
SoupEnabled = false;
|
||||
DamageTeamSelf = true;
|
||||
DamageTeamSelf.SetOption(true);
|
||||
|
||||
registerChatStats(
|
||||
Kills,
|
||||
@ -1716,7 +1716,7 @@ public class Wizards extends SoloGame
|
||||
|
||||
if (_endgameMessageCounter == 6)
|
||||
{
|
||||
WorldTimeSet = 0;
|
||||
WorldTimeSet.SetOption(0);
|
||||
WorldData.World.setTime(15000);
|
||||
}
|
||||
|
||||
|
@ -48,12 +48,12 @@ public class SpellSummonWolves extends Spell implements SpellClick, SpellClickBl
|
||||
|
||||
for (int i = 0; i < getSpellLevel(player); i++)
|
||||
{
|
||||
Wizards.CreatureAllowOverride = true;
|
||||
Wizards.CreatureAllowOverride.SetOption(true);
|
||||
|
||||
Wolf wolf = (Wolf) player.getWorld().spawnEntity(
|
||||
loc.clone().add(new Random().nextFloat() - 0.5F, 0, new Random().nextFloat() - 0.5F), EntityType.WOLF);
|
||||
|
||||
Wizards.CreatureAllowOverride = false;
|
||||
Wizards.CreatureAllowOverride.SetOption(false);
|
||||
|
||||
wolf.setCollarColor(DyeColor.YELLOW);
|
||||
wolf.setTamed(true);
|
||||
|
@ -67,8 +67,8 @@ public class ZombieSurvival extends SoloGame
|
||||
"The last Survivor alive wins!"
|
||||
});
|
||||
|
||||
this.DeathOut = false;
|
||||
this.HungerSet = 20;
|
||||
this.DeathOut.SetOption(false);
|
||||
this.HungerSet.SetOption(20);
|
||||
|
||||
this.CompassEnabled = true;
|
||||
|
||||
@ -230,10 +230,10 @@ public class ZombieSurvival extends SoloGame
|
||||
|
||||
if (_mobs.size() < 50)
|
||||
{
|
||||
this.CreatureAllowOverride = true;
|
||||
this.CreatureAllowOverride.SetOption(true);
|
||||
Zombie zombie = _undead.GetSpawn().getWorld().spawn(_undead.GetSpawn(), Zombie.class);
|
||||
_mobs.put(zombie, new ZombieData(GetTargetLocation()));
|
||||
this.CreatureAllowOverride = false;
|
||||
this.CreatureAllowOverride.SetOption(false);
|
||||
}
|
||||
|
||||
mobIterator = _mobs.keySet().iterator();
|
||||
|
@ -127,10 +127,10 @@ public class PerkBatWave extends SmashPerk
|
||||
|
||||
for (int i=0 ; i<32 ; i++)
|
||||
{
|
||||
Manager.GetGame().CreatureAllowOverride = true;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(true);
|
||||
Bat bat = player.getWorld().spawn(player.getEyeLocation(), Bat.class);
|
||||
_bats.get(player).add(bat);
|
||||
Manager.GetGame().CreatureAllowOverride = false;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(false);
|
||||
}
|
||||
|
||||
//Inform
|
||||
|
@ -52,7 +52,7 @@ public class PerkChicken extends Perk
|
||||
return;
|
||||
}
|
||||
|
||||
Manager.GetGame().CreatureAllowOverride = true;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(true);
|
||||
|
||||
Location loc = player.getLocation();
|
||||
Chicken c = loc.getWorld().spawn(loc.add(0, 1, 0), Chicken.class);
|
||||
@ -67,7 +67,7 @@ public class PerkChicken extends Perk
|
||||
_activeKitHolders.put(player.getName(), c);
|
||||
_failedAttempts.put(player.getName(), 0);
|
||||
|
||||
Manager.GetGame().CreatureAllowOverride = false;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(false);
|
||||
|
||||
}
|
||||
|
||||
|
@ -80,14 +80,14 @@ public class PerkChickenRocket extends SmashPerk
|
||||
if (!Recharge.Instance.use(player, GetName(), 7000, true, true))
|
||||
return;
|
||||
|
||||
Manager.GetGame().CreatureAllowOverride = true;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(true);
|
||||
Chicken ent = player.getWorld().spawn(player.getEyeLocation().add(player.getLocation().getDirection()), Chicken.class);
|
||||
ent.getLocation().setPitch(0);
|
||||
ent.getLocation().setYaw(player.getLocation().getYaw());
|
||||
ent.setBaby();
|
||||
ent.setAgeLock(true);
|
||||
UtilEnt.Vegetate(ent);
|
||||
Manager.GetGame().CreatureAllowOverride = false;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(false);
|
||||
|
||||
_data.add(new ChickenMissileData(player, ent));
|
||||
|
||||
|
@ -65,9 +65,9 @@ public class PerkCowBomb extends Perk implements IThrown
|
||||
|
||||
UtilInv.Update(player);
|
||||
|
||||
Manager.GetGame().CreatureAllowOverride = true;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(true);
|
||||
Cow ent = player.getWorld().spawn(player.getEyeLocation().add(player.getLocation().getDirection()), Cow.class);
|
||||
Manager.GetGame().CreatureAllowOverride = false;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(false);
|
||||
ent.setBaby();
|
||||
ent.setAgeLock(true);
|
||||
ent.setMaxHealth(100);
|
||||
|
@ -41,10 +41,10 @@ public class PerkEndermanDragon extends SmashPerk
|
||||
@Override
|
||||
public void addSuperCustom(Player player)
|
||||
{
|
||||
Manager.GetGame().CreatureAllowOverride = true;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(true);
|
||||
EnderDragon dragon = player.getWorld().spawn(player.getLocation().add(0, 5, 0), EnderDragon.class);
|
||||
UtilEnt.Vegetate(dragon);
|
||||
Manager.GetGame().CreatureAllowOverride = false;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(false);
|
||||
|
||||
dragon.setCustomName(C.cYellow + player.getName() + "'s Dragon");
|
||||
|
||||
|
@ -55,9 +55,9 @@ public class PerkHorsePet extends Perk
|
||||
if (!Manager.GetGame().IsAlive(player))
|
||||
return;
|
||||
|
||||
Manager.GetGame().CreatureAllowOverride = true;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(true);
|
||||
Horse horse = player.getWorld().spawn(player.getLocation(), Horse.class);
|
||||
Manager.GetGame().CreatureAllowOverride = false;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(false);
|
||||
|
||||
horse.setAdult();
|
||||
horse.setAgeLock(true);
|
||||
|
@ -221,7 +221,7 @@ public class PerkMadScientist extends Perk implements IThrown
|
||||
|
||||
data.GetThrown().remove();
|
||||
|
||||
Manager.GetGame().CreatureAllowOverride = true;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(true);
|
||||
|
||||
Zombie zombie = (Zombie) data.GetThrown().getWorld()
|
||||
.spawn(data.GetThrown().getLocation(), Zombie.class);
|
||||
@ -275,7 +275,7 @@ public class PerkMadScientist extends Perk implements IThrown
|
||||
//
|
||||
// Manager.GetDisguise().disguise(disguise);
|
||||
|
||||
Manager.GetGame().CreatureAllowOverride = false;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(false);
|
||||
|
||||
}
|
||||
|
||||
|
@ -101,9 +101,9 @@ public class PerkNightLivingDead extends SmashPerk
|
||||
loc.subtract(0, 1, 0);
|
||||
|
||||
//Spawn
|
||||
Manager.GetGame().CreatureAllowOverride = true;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(true);
|
||||
Zombie zombie = loc.getWorld().spawn(loc, Zombie.class);
|
||||
Manager.GetGame().CreatureAllowOverride = false;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(false);
|
||||
|
||||
data.Zombies.add(zombie);
|
||||
|
||||
|
@ -96,11 +96,11 @@ public class PerkPigBaconBomb extends SmashPerk
|
||||
player.getWorld().playSound(player.getLocation(), Sound.PIG_IDLE, 2f, 0.75f);
|
||||
|
||||
//Pig
|
||||
Manager.GetGame().CreatureAllowOverride = true;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(true);
|
||||
Pig pig = player.getWorld().spawn(player.getLocation(), Pig.class);
|
||||
pig.setHealth(5);
|
||||
pig.setVelocity(new Vector(0, -0.4, 0));
|
||||
Manager.GetGame().CreatureAllowOverride = false;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(false);
|
||||
|
||||
pig.setBaby();
|
||||
UtilEnt.Vegetate(pig);
|
||||
|
@ -42,9 +42,9 @@ public class PerkSheepHoming extends SmashPerk
|
||||
if (target.equals(player))
|
||||
continue;
|
||||
|
||||
Manager.GetGame().CreatureAllowOverride = true;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(true);
|
||||
Sheep sheep = player.getWorld().spawn(player.getEyeLocation(), Sheep.class);
|
||||
Manager.GetGame().CreatureAllowOverride = false;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(false);
|
||||
|
||||
sheep.setBaby();
|
||||
|
||||
|
@ -85,9 +85,9 @@ public class PerkSkeletons extends Perk
|
||||
|
||||
Player killed = (Player) event.GetEvent().getEntity();
|
||||
|
||||
Manager.GetGame().CreatureAllowOverride = true;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(true);
|
||||
Skeleton skel = killer.getWorld().spawn(killed.getLocation(), Skeleton.class);
|
||||
Manager.GetGame().CreatureAllowOverride = false;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(false);
|
||||
|
||||
UtilEnt.removeGoalSelectors(skel);
|
||||
|
||||
|
@ -174,10 +174,10 @@ public class PerkSlimeRocket extends SmashPerk implements IThrown
|
||||
double charge = Math.min(3, (double)(System.currentTimeMillis() - _charge.get(player))/1000d);
|
||||
|
||||
//Spawn Slime
|
||||
Manager.GetGame().CreatureAllowOverride = true;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(true);
|
||||
Slime slime = player.getWorld().spawn(player.getEyeLocation(), Slime.class);
|
||||
slime.setSize(1);
|
||||
Manager.GetGame().CreatureAllowOverride = false;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(false);
|
||||
|
||||
//Size
|
||||
slime.setSize(Math.max(1, (int)charge));
|
||||
|
@ -50,9 +50,9 @@ public class PerkSnowTurret extends SmashPerk
|
||||
@Override
|
||||
public void addSuperCustom(Player player)
|
||||
{
|
||||
Manager.GetGame().CreatureAllowOverride = true;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(true);
|
||||
Snowman ent = player.getWorld().spawn(player.getEyeLocation(), Snowman.class);
|
||||
Manager.GetGame().CreatureAllowOverride = false;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(false);
|
||||
|
||||
UtilEnt.Vegetate(ent);
|
||||
UtilEnt.ghost(ent, true, false);
|
||||
|
@ -73,9 +73,9 @@ public class PerkWitherImage extends SmashPerk
|
||||
return;
|
||||
|
||||
//Spawn
|
||||
Manager.GetGame().CreatureAllowOverride = true;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(true);
|
||||
Skeleton skel = player.getWorld().spawn(player.getEyeLocation().add(player.getLocation().getDirection()), Skeleton.class);
|
||||
Manager.GetGame().CreatureAllowOverride = false;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(false);
|
||||
|
||||
skel.setSkeletonType(SkeletonType.WITHER);
|
||||
|
||||
|
@ -74,7 +74,7 @@ public class PerkWitherMinion extends Perk
|
||||
|
||||
event.setCancelled(true);
|
||||
|
||||
Manager.GetGame().CreatureAllowOverride = true;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(true);
|
||||
|
||||
for (int i=0 ; i<2 ; i++)
|
||||
{
|
||||
@ -99,7 +99,7 @@ public class PerkWitherMinion extends Perk
|
||||
UtilAction.velocity(skel, player.getLocation().getDirection().add(random), 1 + Math.random() * 0.4, false, 0, 0.2, 10, false);
|
||||
}
|
||||
|
||||
Manager.GetGame().CreatureAllowOverride = false;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(false);
|
||||
|
||||
//Inform
|
||||
UtilPlayer.message(player, F.main("Game", "You used " + F.skill(GetName()) + "."));
|
||||
|
@ -87,9 +87,9 @@ public class PerkWolf extends SmashPerk
|
||||
return;
|
||||
|
||||
//Get Nearest Wolf
|
||||
Manager.GetGame().CreatureAllowOverride = true;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(true);
|
||||
Wolf wolf = player.getWorld().spawn(player.getEyeLocation().add(player.getLocation().getDirection()), Wolf.class);
|
||||
Manager.GetGame().CreatureAllowOverride = false;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(false);
|
||||
|
||||
wolf.setBaby();
|
||||
|
||||
|
@ -197,9 +197,9 @@ public class PerkWolfPack extends Perk
|
||||
|
||||
public void MinionSpawn(Player cur)
|
||||
{
|
||||
Manager.GetGame().CreatureAllowOverride = true;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(true);
|
||||
Wolf wolf = cur.getWorld().spawn(cur.getLocation(), Wolf.class);
|
||||
Manager.GetGame().CreatureAllowOverride = false;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(false);
|
||||
|
||||
//wolf.setOwner(cur);
|
||||
//wolf.setCollarColor(DyeColor.GREEN);
|
||||
|
@ -95,9 +95,9 @@ public class PerkWolfPet extends Perk
|
||||
if (_wolfMap.get(cur).size() >= _max)
|
||||
continue;
|
||||
|
||||
Manager.GetGame().CreatureAllowOverride = true;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(true);
|
||||
Wolf wolf = cur.getWorld().spawn(cur.getLocation(), Wolf.class);
|
||||
Manager.GetGame().CreatureAllowOverride = false;
|
||||
Manager.GetGame().CreatureAllowOverride.SetOption(false);
|
||||
|
||||
wolf.setOwner(cur);
|
||||
wolf.setCollarColor(DyeColor.GREEN);
|
||||
|
@ -123,7 +123,7 @@ public class GameFlagManager implements Listener
|
||||
return;
|
||||
}
|
||||
|
||||
if (!game.Damage)
|
||||
if (!game.Damage.GetOption())
|
||||
{
|
||||
event.SetCancelled("Damage Disabled");
|
||||
return;
|
||||
@ -147,7 +147,7 @@ public class GameFlagManager implements Listener
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.GetCause() == DamageCause.FALL && !game.DamageFall)
|
||||
if (event.GetCause() == DamageCause.FALL && !game.DamageFall.GetOption())
|
||||
{
|
||||
event.SetCancelled("Fall Damage Disabled");
|
||||
return;
|
||||
@ -168,7 +168,7 @@ public class GameFlagManager implements Listener
|
||||
//PvE
|
||||
else if (damager instanceof Player)
|
||||
{
|
||||
if (!game.DamagePvE)
|
||||
if (!game.DamagePvE.GetOption())
|
||||
{
|
||||
event.SetCancelled("PvE Disabled");
|
||||
return;
|
||||
@ -177,7 +177,7 @@ public class GameFlagManager implements Listener
|
||||
//EvP
|
||||
else if (damagee instanceof Player)
|
||||
{
|
||||
if (!game.DamageEvP)
|
||||
if (!game.DamageEvP.GetOption())
|
||||
{
|
||||
event.SetCancelled("EvP Disabled");
|
||||
return;
|
||||
@ -223,16 +223,16 @@ public class GameFlagManager implements Listener
|
||||
}
|
||||
|
||||
|
||||
if (game.ItemPickup)
|
||||
if (game.ItemPickup.GetOption())
|
||||
{
|
||||
if (game.ItemPickupDeny.contains(event.getItem().getItemStack().getTypeId()))
|
||||
if (game.ItemPickupDeny.GetOption().contains(event.getItem().getItemStack().getTypeId()))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!game.ItemPickupAllow.contains(event.getItem().getItemStack().getTypeId()))
|
||||
if (!game.ItemPickupAllow.GetOption().contains(event.getItem().getItemStack().getTypeId()))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
}
|
||||
@ -257,16 +257,16 @@ public class GameFlagManager implements Listener
|
||||
return;
|
||||
}
|
||||
|
||||
if (game.ItemDrop)
|
||||
if (game.ItemDrop.GetOption())
|
||||
{
|
||||
if (game.ItemDropDeny.contains(event.getItemDrop().getItemStack().getTypeId()))
|
||||
if (game.ItemDropDeny.GetOption().contains(event.getItemDrop().getItemStack().getTypeId()))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!game.ItemDropAllow.contains(event.getItemDrop().getItemStack().getTypeId()))
|
||||
if (!game.ItemDropAllow.GetOption().contains(event.getItemDrop().getItemStack().getTypeId()))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
}
|
||||
@ -284,7 +284,7 @@ public class GameFlagManager implements Listener
|
||||
return;
|
||||
|
||||
//normal inventories
|
||||
if (!game.InventoryOpenBlock)
|
||||
if (!game.InventoryOpenBlock.GetOption())
|
||||
{
|
||||
if (event.getInventory().getType() == InventoryType.ANVIL ||
|
||||
event.getInventory().getType() == InventoryType.BEACON ||
|
||||
@ -316,7 +316,7 @@ public class GameFlagManager implements Listener
|
||||
}
|
||||
|
||||
//deal with chests
|
||||
if (!game.InventoryOpenChest)
|
||||
if (!game.InventoryOpenChest.GetOption())
|
||||
{
|
||||
if (event.getInventory().getType() == InventoryType.CHEST)
|
||||
{
|
||||
@ -339,7 +339,7 @@ public class GameFlagManager implements Listener
|
||||
if (!game.InProgress())
|
||||
return;
|
||||
|
||||
if (game.InventoryClick)
|
||||
if (game.InventoryClick.GetOption())
|
||||
return;
|
||||
|
||||
Player player = UtilPlayer.searchExact(event.getWhoClicked().getName());
|
||||
@ -377,22 +377,22 @@ public class GameFlagManager implements Listener
|
||||
event.setCancelled(true);
|
||||
}
|
||||
// Event Server Allowance
|
||||
else if (game.BlockPlaceCreative && player.getGameMode() == GameMode.CREATIVE)
|
||||
else if (game.BlockPlaceCreative.GetOption() && player.getGameMode() == GameMode.CREATIVE)
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (game.BlockPlace)
|
||||
if (game.BlockPlace.GetOption())
|
||||
{
|
||||
if (game.BlockPlaceDeny.contains(event.getBlock().getTypeId()))
|
||||
if (game.BlockPlaceDeny.GetOption().contains(event.getBlock().getTypeId()))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!game.BlockPlaceAllow.contains(event.getBlock().getTypeId()))
|
||||
if (!game.BlockPlaceAllow.GetOption().contains(event.getBlock().getTypeId()))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
}
|
||||
@ -420,15 +420,15 @@ public class GameFlagManager implements Listener
|
||||
event.setCancelled(true);
|
||||
}
|
||||
// Event Server Allowance
|
||||
else if (game.BlockBreakCreative && player.getGameMode() == GameMode.CREATIVE)
|
||||
else if (game.BlockBreakCreative.GetOption() && player.getGameMode() == GameMode.CREATIVE)
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (game.BlockBreak)
|
||||
if (game.BlockBreak.GetOption())
|
||||
{
|
||||
if (game.BlockBreakDeny.contains(event.getBlock().getTypeId()))
|
||||
if (game.BlockBreakDeny.GetOption().contains(event.getBlock().getTypeId()))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
}
|
||||
@ -436,7 +436,7 @@ public class GameFlagManager implements Listener
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!game.BlockBreakAllow.contains(event.getBlock().getTypeId()))
|
||||
if (!game.BlockBreakAllow.GetOption().contains(event.getBlock().getTypeId()))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
}
|
||||
@ -453,7 +453,7 @@ public class GameFlagManager implements Listener
|
||||
Game game = Manager.GetGame();
|
||||
if (game == null) return;
|
||||
|
||||
if (!game.PrivateBlocks)
|
||||
if (!game.PrivateBlocks.GetOption())
|
||||
return;
|
||||
|
||||
if (event.isCancelled())
|
||||
@ -492,7 +492,7 @@ public class GameFlagManager implements Listener
|
||||
Game game = Manager.GetGame();
|
||||
if (game == null) return;
|
||||
|
||||
if (!game.PrivateBlocks)
|
||||
if (!game.PrivateBlocks.GetOption())
|
||||
return;
|
||||
|
||||
if (event.isCancelled())
|
||||
@ -546,7 +546,7 @@ public class GameFlagManager implements Listener
|
||||
Game game = Manager.GetGame();
|
||||
if (game == null) return;
|
||||
|
||||
if (!game.PrivateBlocks)
|
||||
if (!game.PrivateBlocks.GetOption())
|
||||
return;
|
||||
|
||||
if (event.isCancelled())
|
||||
@ -587,7 +587,7 @@ public class GameFlagManager implements Listener
|
||||
Game game = Manager.GetGame();
|
||||
if (game == null) return;
|
||||
|
||||
if (!game.PrivateBlocks)
|
||||
if (!game.PrivateBlocks.GetOption())
|
||||
return;
|
||||
|
||||
if (event.getAction() != Action.RIGHT_CLICK_BLOCK)
|
||||
@ -639,7 +639,7 @@ public class GameFlagManager implements Listener
|
||||
Game game = Manager.GetGame();
|
||||
if (game == null) return;
|
||||
|
||||
if (!game.PrivateBlocks)
|
||||
if (!game.PrivateBlocks.GetOption())
|
||||
return;
|
||||
|
||||
if (event.isCancelled())
|
||||
@ -689,13 +689,13 @@ public class GameFlagManager implements Listener
|
||||
player.setFallDistance(0);
|
||||
|
||||
//Drop Items
|
||||
if (game.DeathDropItems)
|
||||
if (game.DeathDropItems.GetOption())
|
||||
for (ItemStack stack : event.getDrops())
|
||||
player.getWorld().dropItem(player.getLocation(), stack);
|
||||
event.getDrops().clear();
|
||||
|
||||
//DEATH OUT
|
||||
if (game.GetState() == GameState.Live && game.DeathOut)
|
||||
if (game.GetState() == GameState.Live && game.DeathOut.GetOption())
|
||||
{
|
||||
//Event
|
||||
PlayerDeathOutEvent outEvent = new PlayerDeathOutEvent(game, player);
|
||||
@ -708,16 +708,16 @@ public class GameFlagManager implements Listener
|
||||
}
|
||||
|
||||
//RESPAWN
|
||||
if (game.DeathSpectateSecs <= 0 && (game.GetTeam(player) == null || game.GetTeam(player).GetRespawnTime() <= 0))
|
||||
if (game.DeathSpectateSecs.GetOption() <= 0 && (game.GetTeam(player) == null || game.GetTeam(player).GetRespawnTime() <= 0))
|
||||
{
|
||||
//Teleport
|
||||
if (game.AutomaticRespawn && game.IsAlive(player))
|
||||
if (game.AutomaticRespawn.GetOption() && game.IsAlive(player))
|
||||
{
|
||||
game.RespawnPlayer(player);
|
||||
}
|
||||
else
|
||||
{
|
||||
Manager.addSpectator(player, game.DeathTeleport);
|
||||
Manager.addSpectator(player, game.DeathTeleport.GetOption());
|
||||
}
|
||||
|
||||
Manager.getPlugin().getServer().getScheduler().scheduleSyncDelayedTask(Manager.getPlugin(), new Runnable()
|
||||
@ -732,7 +732,7 @@ public class GameFlagManager implements Listener
|
||||
//TIMER
|
||||
else
|
||||
{
|
||||
double time = game.DeathSpectateSecs;
|
||||
double time = game.DeathSpectateSecs.GetOption();
|
||||
if (game.GetTeam(player) != null)
|
||||
if (game.GetTeam(player).GetRespawnTime() > time)
|
||||
time = game.GetTeam(player).GetRespawnTime();
|
||||
@ -752,7 +752,7 @@ public class GameFlagManager implements Listener
|
||||
|
||||
if (!game.IsAlive(player))
|
||||
{
|
||||
Manager.addSpectator(player, game.DeathTeleport);
|
||||
Manager.addSpectator(player, game.DeathTeleport.GetOption());
|
||||
return;
|
||||
}
|
||||
|
||||
@ -773,7 +773,7 @@ public class GameFlagManager implements Listener
|
||||
}
|
||||
else
|
||||
{
|
||||
Manager.addSpectator(player, game.DeathTeleport);
|
||||
Manager.addSpectator(player, game.DeathTeleport.GetOption());
|
||||
}
|
||||
|
||||
player.setFireTicks(0);
|
||||
@ -790,7 +790,7 @@ public class GameFlagManager implements Listener
|
||||
if (game == null) return;
|
||||
|
||||
//Drop Items
|
||||
if (game.QuitDropItems)
|
||||
if (game.QuitDropItems.GetOption())
|
||||
if (game.IsLive())
|
||||
if (game.IsAlive(event.getPlayer()))
|
||||
UtilInv.drop(event.getPlayer(), true);
|
||||
@ -800,7 +800,7 @@ public class GameFlagManager implements Listener
|
||||
game.GetPlayerKits().remove(event.getPlayer());
|
||||
game.GetPlayerGems().remove(event.getPlayer());
|
||||
|
||||
if (!game.QuitOut)
|
||||
if (!game.QuitOut.GetOption())
|
||||
return;
|
||||
|
||||
GameTeam team = game.GetTeam(event.getPlayer());
|
||||
@ -821,7 +821,7 @@ public class GameFlagManager implements Listener
|
||||
if (game == null || game.GetState() != GameState.Prepare)
|
||||
return;
|
||||
|
||||
if (!game.PrepareFreeze)
|
||||
if (!game.PrepareFreeze.GetOption())
|
||||
return;
|
||||
|
||||
if (!game.IsAlive(event.getPlayer()))
|
||||
@ -897,7 +897,7 @@ public class GameFlagManager implements Listener
|
||||
((CraftPlayer)player).getHandle().spectating = false;
|
||||
}
|
||||
|
||||
if (!game.WorldBoundaryKill)
|
||||
if (!game.WorldBoundaryKill.GetOption())
|
||||
{
|
||||
UtilPlayer.message(player, C.cRed + C.Bold + "WARNING: " + C.cWhite + C.Bold + "RETURN TO PLAYABLE AREA!");
|
||||
|
||||
@ -937,7 +937,7 @@ public class GameFlagManager implements Listener
|
||||
Game game = Manager.GetGame();
|
||||
if (game == null) return;
|
||||
|
||||
if (!game.CreatureAllow && !game.CreatureAllowOverride)
|
||||
if (!game.CreatureAllow.GetOption() && !game.CreatureAllowOverride.GetOption())
|
||||
{
|
||||
if (game.WorldData != null)
|
||||
{
|
||||
@ -967,7 +967,7 @@ public class GameFlagManager implements Listener
|
||||
if (!(game.IsLive() || game.GetState() == GameState.Prepare))
|
||||
return;
|
||||
|
||||
if (!game.TeleportsDisqualify)
|
||||
if (!game.TeleportsDisqualify.GetOption())
|
||||
return;
|
||||
|
||||
if (!game.IsAlive(event.getPlayer()))
|
||||
@ -1021,7 +1021,7 @@ public class GameFlagManager implements Listener
|
||||
Game game = Manager.GetGame();
|
||||
if (game == null) return;
|
||||
|
||||
if (!game.WorldWeatherEnabled)
|
||||
if (!game.WorldWeatherEnabled.GetOption())
|
||||
{
|
||||
if (game.WorldData != null)
|
||||
{
|
||||
@ -1046,11 +1046,11 @@ public class GameFlagManager implements Listener
|
||||
if (!game.IsLive())
|
||||
return;
|
||||
|
||||
if (game.WorldWaterDamage <= 0)
|
||||
if (game.WorldWaterDamage.GetOption() <= 0)
|
||||
{
|
||||
if (!game.WorldData.GetCustomLocs("WATER_DAMAGE").isEmpty())
|
||||
{
|
||||
game.WorldWaterDamage = 4;
|
||||
game.WorldWaterDamage.SetOption(4);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1065,7 +1065,7 @@ public class GameFlagManager implements Listener
|
||||
{
|
||||
//Damage Event
|
||||
Manager.GetDamage().NewDamageEvent(player, null, null,
|
||||
DamageCause.DROWNING, game.WorldWaterDamage, true, false, false,
|
||||
DamageCause.DROWNING, game.WorldWaterDamage.GetOption(), true, false, false,
|
||||
"Water", "Water Damage");
|
||||
|
||||
player.getWorld().playSound(player.getLocation(),
|
||||
@ -1083,7 +1083,7 @@ public class GameFlagManager implements Listener
|
||||
Game game = Manager.GetGame();
|
||||
if (game == null) return;
|
||||
|
||||
if (game.WorldSoilTrample)
|
||||
if (game.WorldSoilTrample.GetOption())
|
||||
return;
|
||||
|
||||
if (event.getPlayer().getLocation().getBlock().getRelative(BlockFace.DOWN).getType() != Material.SOIL)
|
||||
@ -1098,7 +1098,7 @@ public class GameFlagManager implements Listener
|
||||
Game game = Manager.GetGame();
|
||||
if (game == null) return;
|
||||
|
||||
if (game.WorldBlockBurn)
|
||||
if (game.WorldBlockBurn.GetOption())
|
||||
return;
|
||||
|
||||
event.setCancelled(true);
|
||||
@ -1110,7 +1110,7 @@ public class GameFlagManager implements Listener
|
||||
Game game = Manager.GetGame();
|
||||
if (game == null) return;
|
||||
|
||||
if (game.WorldBlockGrow)
|
||||
if (game.WorldBlockGrow.GetOption())
|
||||
return;
|
||||
|
||||
event.setCancelled(true);
|
||||
@ -1122,7 +1122,7 @@ public class GameFlagManager implements Listener
|
||||
Game game = Manager.GetGame();
|
||||
if (game == null) return;
|
||||
|
||||
if (game.WorldFireSpread)
|
||||
if (game.WorldFireSpread.GetOption())
|
||||
return;
|
||||
|
||||
event.setCancelled(true);
|
||||
@ -1134,7 +1134,7 @@ public class GameFlagManager implements Listener
|
||||
Game game = Manager.GetGame();
|
||||
if (game == null) return;
|
||||
|
||||
if (game.WorldLeavesDecay)
|
||||
if (game.WorldLeavesDecay.GetOption())
|
||||
return;
|
||||
|
||||
event.setCancelled(true);
|
||||
@ -1149,7 +1149,7 @@ public class GameFlagManager implements Listener
|
||||
if (Manager.GetGame() == null)
|
||||
return;
|
||||
|
||||
if (!Manager.GetGame().AnnounceStay)
|
||||
if (!Manager.GetGame().AnnounceStay.GetOption())
|
||||
return;
|
||||
|
||||
if (!Manager.GetGame().IsLive())
|
||||
@ -1176,7 +1176,7 @@ public class GameFlagManager implements Listener
|
||||
public void AntiHackStrict(GameStateChangeEvent event)
|
||||
{
|
||||
if (event.GetState() == GameState.Prepare || event.GetState() == GameState.Live)
|
||||
AntiHack.Instance.setStrict(event.GetGame().StrictAntiHack);
|
||||
AntiHack.Instance.setStrict(event.GetGame().StrictAntiHack.GetOption());
|
||||
|
||||
else
|
||||
AntiHack.Instance.setStrict(true);
|
||||
@ -1188,7 +1188,7 @@ public class GameFlagManager implements Listener
|
||||
if (Manager.GetGame() == null)
|
||||
return;
|
||||
|
||||
if (!Manager.GetGame().DisableKillCommand)
|
||||
if (!Manager.GetGame().DisableKillCommand.GetOption())
|
||||
return;
|
||||
|
||||
if (event.getMessage().toLowerCase().startsWith("/kill"))
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user