Quick Lunch-time bug-squashing update. Still have tons of errors to go through, but I want to make sure everything is backed up, should the weather turn foul(er) and a power outage should occur
This commit is contained in:
parent
c1ef185e82
commit
262c6c2fa6
@ -207,7 +207,7 @@ public abstract class Game implements Listener
|
||||
public GameOptionDouble DeathSpectateSecs = new GameOptionDouble(0, "Death Spectate Secs", "How many seconds players may spectate match while dead");
|
||||
public GameOptionBoolean DeathTeleport = new GameOptionBoolean(true, "Death Teleport", "Do players teleport upon death?");
|
||||
|
||||
public GameOptionBoolean QuitOut = new GameOptionBoolean(true, "Quit Out", "Are players considered out if they quit?");
|
||||
public GameOptionBoolean QuitOut = new GameOptionBoolean(true, "Quit Out", "Are players allowed to quit?");
|
||||
public GameOptionBoolean QuitDropItems = new GameOptionBoolean(false, "Quit Drop Items", "Do players drop items if they quit?");
|
||||
|
||||
public GameOptionBoolean IdleKickz = new GameOptionBoolean(true, "Idle Kickz", "Are idle players kicked?");
|
||||
|
@ -39,27 +39,27 @@ public class Barbarians extends SoloGame
|
||||
"Last player alive wins!"
|
||||
});
|
||||
|
||||
this.DamageTeamSelf = true;
|
||||
this.DamageTeamSelf.SetOption(true);
|
||||
this.CompassEnabled = true;
|
||||
|
||||
this.BlockBreakAllow.add(5);
|
||||
this.BlockBreakAllow.add(17);
|
||||
this.BlockBreakAllow.add(18);
|
||||
this.BlockBreakAllow.add(20);
|
||||
this.BlockBreakAllow.add(30);
|
||||
this.BlockBreakAllow.add(47);
|
||||
this.BlockBreakAllow.add(53);
|
||||
this.BlockBreakAllow.add(54);
|
||||
this.BlockBreakAllow.add(58);
|
||||
this.BlockBreakAllow.add(64);
|
||||
this.BlockBreakAllow.add(83);
|
||||
this.BlockBreakAllow.add(85);
|
||||
this.BlockBreakAllow.add(96);
|
||||
this.BlockBreakAllow.add(125);
|
||||
this.BlockBreakAllow.add(126);
|
||||
this.BlockBreakAllow.add(134);
|
||||
this.BlockBreakAllow.add(135);
|
||||
this.BlockBreakAllow.add(136);
|
||||
this.BlockBreakAllow.GetOption().add(5);
|
||||
this.BlockBreakAllow.GetOption().add(17);
|
||||
this.BlockBreakAllow.GetOption().add(18);
|
||||
this.BlockBreakAllow.GetOption().add(20);
|
||||
this.BlockBreakAllow.GetOption().add(30);
|
||||
this.BlockBreakAllow.GetOption().add(47);
|
||||
this.BlockBreakAllow.GetOption().add(53);
|
||||
this.BlockBreakAllow.GetOption().add(54);
|
||||
this.BlockBreakAllow.GetOption().add(58);
|
||||
this.BlockBreakAllow.GetOption().add(64);
|
||||
this.BlockBreakAllow.GetOption().add(83);
|
||||
this.BlockBreakAllow.GetOption().add(85);
|
||||
this.BlockBreakAllow.GetOption().add(96);
|
||||
this.BlockBreakAllow.GetOption().add(125);
|
||||
this.BlockBreakAllow.GetOption().add(126);
|
||||
this.BlockBreakAllow.GetOption().add(134);
|
||||
this.BlockBreakAllow.GetOption().add(135);
|
||||
this.BlockBreakAllow.GetOption().add(136);
|
||||
|
||||
registerStatTrackers(
|
||||
new BlockBreakStatTracker(this, true)
|
||||
|
@ -55,9 +55,9 @@ public class BossBattles extends TeamGame
|
||||
"Fight some bosses"
|
||||
});
|
||||
|
||||
HungerSet = 20;
|
||||
CreatureAllowOverride = true;
|
||||
PrepareFreeze = false;
|
||||
HungerSet.SetOption(20);
|
||||
CreatureAllowOverride.SetOption(true);
|
||||
PrepareFreeze.SetOption(false);
|
||||
|
||||
// registerChatStats(Kills);
|
||||
// Game giving constant errors when loading.
|
||||
|
@ -35,7 +35,7 @@ public class BouncyBalls extends SoloGame
|
||||
"BOUNCE"
|
||||
});
|
||||
|
||||
this.HungerSet = 20;
|
||||
this.HungerSet.SetOption(20);
|
||||
|
||||
// registerChatStats();
|
||||
}
|
||||
|
@ -175,45 +175,45 @@ public class Bridge extends TeamGame implements OreObsfucation
|
||||
_ore = new OreHider();
|
||||
|
||||
// Flags
|
||||
GameTimeout.setOption(Manager.IsTournamentServer() ? 5400000 : 3600000);
|
||||
GameTimeout.SetOption(Manager.IsTournamentServer() ? 5400000 : 3600000);
|
||||
|
||||
Manager.GetExplosion().SetLiquidDamage(false);
|
||||
|
||||
this.StrictAntiHack = true;
|
||||
this.StrictAntiHack.SetOption(true);
|
||||
|
||||
DamageSelf = true;
|
||||
DamageSelf.SetOption(true);
|
||||
|
||||
ItemDrop = true;
|
||||
ItemPickup = true;
|
||||
ItemDrop.SetOption(true);
|
||||
ItemPickup.SetOption(true);
|
||||
|
||||
InventoryClick = true;
|
||||
InventoryClick.SetOption(true);
|
||||
|
||||
AnnounceStay = false;
|
||||
AnnounceStay.SetOption(false);
|
||||
|
||||
PrivateBlocks = true;
|
||||
BlockBreak = true;
|
||||
BlockPlace = true;
|
||||
PrivateBlocks.SetOption(true);
|
||||
BlockBreak.SetOption(true);
|
||||
BlockPlace.SetOption(true);
|
||||
|
||||
InventoryOpenBlock = true;
|
||||
InventoryOpenChest = true;
|
||||
InventoryOpenBlock.SetOption(true);
|
||||
InventoryOpenChest.SetOption(true);
|
||||
|
||||
WorldTimeSet = 2000;
|
||||
WorldTimeSet.SetOption(2000);
|
||||
|
||||
WorldWaterDamage = 0;
|
||||
WorldBoundaryKill = false;
|
||||
WorldWaterDamage.SetOption(0);
|
||||
WorldBoundaryKill.SetOption(false);
|
||||
|
||||
CompassEnabled = true;
|
||||
|
||||
DeathDropItems = true;
|
||||
DeathDropItems.SetOption(true);
|
||||
|
||||
GemMultiplier = 2.5;
|
||||
|
||||
PrepareFreeze = false;
|
||||
PrepareFreeze.SetOption(false);
|
||||
|
||||
//Tournament
|
||||
if (Manager.IsTournamentServer())
|
||||
{
|
||||
QuitOut = false;
|
||||
QuitOut.SetOption(false);
|
||||
|
||||
_gameDesc = new String[]
|
||||
{
|
||||
@ -273,10 +273,10 @@ public class Bridge extends TeamGame implements OreObsfucation
|
||||
|
||||
if (!WorldData.GetCustomLocs("WATER_DAMAGE").isEmpty())
|
||||
{
|
||||
WorldWaterDamage = 4;
|
||||
WorldWaterDamage.SetOption(4);
|
||||
}
|
||||
|
||||
if (WorldWaterDamage > 0)
|
||||
if (WorldWaterDamage.GetOption() > 0)
|
||||
{
|
||||
if (WorldData.MapName.equals("Volcanic Islands"))
|
||||
UtilTextMiddle.display(C.cRed + "Warning", "Water is Boiling Hot", 10, 60, 20);
|
||||
@ -1084,14 +1084,14 @@ public class Bridge extends TeamGame implements OreObsfucation
|
||||
|
||||
Entity ent;
|
||||
|
||||
CreatureAllowOverride = true;
|
||||
CreatureAllowOverride.SetOption(true);
|
||||
if (rand > 0.66)
|
||||
ent = team.GetSpawn().getWorld().spawn(team.GetSpawn(), Cow.class);
|
||||
else if (rand > 0.33)
|
||||
ent = team.GetSpawn().getWorld().spawn(team.GetSpawn(), Pig.class);
|
||||
else
|
||||
ent = team.GetSpawn().getWorld().spawn(team.GetSpawn(), Chicken.class);
|
||||
CreatureAllowOverride = false;
|
||||
CreatureAllowOverride.SetOption(false);
|
||||
|
||||
_animalSet.get(team).add(ent);
|
||||
}
|
||||
@ -1395,7 +1395,7 @@ public class Bridge extends TeamGame implements OreObsfucation
|
||||
if (event.getBucket() != Material.WATER_BUCKET)
|
||||
return;
|
||||
|
||||
if (WorldWaterDamage > 0)
|
||||
if (WorldWaterDamage.GetOption() > 0)
|
||||
{
|
||||
UtilPlayer.message(
|
||||
event.getPlayer(),
|
||||
@ -1597,7 +1597,7 @@ public class Bridge extends TeamGame implements OreObsfucation
|
||||
if (team.GetPlayers(true).size() > 0)
|
||||
teamsAlive.add(team);
|
||||
|
||||
if (!QuitOut)
|
||||
if (!QuitOut.GetOption())
|
||||
{
|
||||
//Offline Player Team
|
||||
for (GameTeam team : RejoinTeam.values())
|
||||
|
@ -165,29 +165,29 @@ public class Build extends SoloGame
|
||||
"based on the build theme!"
|
||||
});
|
||||
|
||||
this.StrictAntiHack = true;
|
||||
this.Damage = false;
|
||||
this.HungerSet = 20;
|
||||
this.HealthSet = 20;
|
||||
this.StrictAntiHack.SetOption(true);
|
||||
this.Damage.SetOption(false);
|
||||
this.HungerSet.SetOption(20);
|
||||
this.HealthSet.SetOption(20);
|
||||
|
||||
this.BlockBreak = true;
|
||||
this.BlockPlace = true;
|
||||
this.BlockBreak.SetOption(true);
|
||||
this.BlockPlace.SetOption(true);
|
||||
|
||||
this.ItemDrop = true;
|
||||
this.ItemPickup = true;
|
||||
this.ItemDrop.SetOption(true);
|
||||
this.ItemPickup.SetOption(true);
|
||||
|
||||
this.InventoryClick = true;
|
||||
this.InventoryClick.SetOption(true);
|
||||
|
||||
this.WorldTimeSet = 6000;
|
||||
this.WorldTimeSet.SetOption(6000);
|
||||
|
||||
this.PrepareFreeze = false;
|
||||
this.PrepareFreeze.SetOption(false);
|
||||
|
||||
this.CreatureAllow = true;
|
||||
this.CreatureAllow.SetOption(true);
|
||||
|
||||
this.WorldFireSpread = true;
|
||||
this.WorldBoneMeal = true;
|
||||
this.WorldFireSpread.SetOption(true);
|
||||
this.WorldBoneMeal.SetOption(true);
|
||||
|
||||
this.DontAllowOverfill = true;
|
||||
this.DontAllowOverfill.SetOption(true);
|
||||
|
||||
UtilServer.getServer().spigot().getConfig().set("view-distance", 4);
|
||||
|
||||
@ -275,7 +275,7 @@ public class Build extends SoloGame
|
||||
|
||||
UtilTextMiddle.display(null, C.cYellow + "Build " + C.cWhite + _word, 0, 80, 5);
|
||||
|
||||
this.WorldTimeSet = -1;
|
||||
this.WorldTimeSet.SetOption(-1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -353,13 +353,13 @@ public class Build extends SoloGame
|
||||
_buildStateTime = System.currentTimeMillis();
|
||||
|
||||
//Flags
|
||||
this.BlockBreak = false;
|
||||
this.BlockPlace = false;
|
||||
this.BlockBreak.SetOption(false);
|
||||
this.BlockPlace.SetOption(false);
|
||||
|
||||
this.ItemDrop = false;
|
||||
this.ItemPickup = false;
|
||||
this.ItemDrop.SetOption(false);
|
||||
this.ItemPickup.SetOption(false);
|
||||
|
||||
this.InventoryClick = false;
|
||||
this.InventoryClick.SetOption(false);
|
||||
|
||||
UtilTextMiddle.display(null, C.cYellow + "TIME IS UP!", 0, 60, 5);
|
||||
|
||||
|
@ -60,14 +60,14 @@ public class Cards extends SoloGame
|
||||
"based on the build theme!"
|
||||
});
|
||||
|
||||
this.StrictAntiHack = true;
|
||||
this.Damage = false;
|
||||
this.HungerSet = 20;
|
||||
this.HealthSet = 20;
|
||||
this.StrictAntiHack.SetOption(true);
|
||||
this.Damage.SetOption(false);
|
||||
this.HungerSet.SetOption(20);
|
||||
this.HealthSet.SetOption(20);
|
||||
|
||||
this.WorldTimeSet = 6000;
|
||||
this.WorldTimeSet.SetOption(6000);
|
||||
|
||||
this.PrepareFreeze = false;
|
||||
this.PrepareFreeze.SetOption(false);
|
||||
|
||||
_cardFactory = new CardFactory();
|
||||
|
||||
|
@ -192,12 +192,12 @@ public class CastleSiege extends TeamGame
|
||||
|
||||
};
|
||||
|
||||
this.StrictAntiHack = true;
|
||||
this.StrictAntiHack.SetOption(true);
|
||||
|
||||
this.HungerSet = 20;
|
||||
this.DeathOut = false;
|
||||
this.WorldTimeSet = 14000; //14000
|
||||
this.BlockPlaceAllow.add(85);
|
||||
this.HungerSet.SetOption(20);
|
||||
this.DeathOut.SetOption(false);
|
||||
this.WorldTimeSet.SetOption(14000); //14000
|
||||
this.BlockPlaceAllow.GetOption().add(85);
|
||||
|
||||
_kingName = C.cYellow + C.Bold + "King Sparklez";
|
||||
|
||||
@ -307,9 +307,9 @@ public class CastleSiege extends TeamGame
|
||||
if (GetKits().length <= 5 + i)
|
||||
continue;
|
||||
|
||||
this.CreatureAllowOverride = true;
|
||||
this.CreatureAllowOverride.SetOption(true);
|
||||
Entity ent = GetKits()[5 + i].SpawnEntity(WorldData.GetDataLocs("PINK").get(i));
|
||||
this.CreatureAllowOverride = false;
|
||||
this.CreatureAllowOverride.SetOption(false);
|
||||
|
||||
Manager.GetLobby().AddKitLocation(ent, GetKits()[5 + i], WorldData.GetDataLocs("PINK").get(i));
|
||||
}
|
||||
@ -323,9 +323,9 @@ public class CastleSiege extends TeamGame
|
||||
|
||||
for (Location loc : _horseSpawns)
|
||||
{
|
||||
this.CreatureAllowOverride = true;
|
||||
this.CreatureAllowOverride.SetOption(true);
|
||||
Horse horse = loc.getWorld().spawn(loc, Horse.class);
|
||||
this.CreatureAllowOverride = false;
|
||||
this.CreatureAllowOverride.SetOption(false);
|
||||
|
||||
horse.setAdult();
|
||||
horse.setAgeLock(true);
|
||||
@ -387,7 +387,7 @@ public class CastleSiege extends TeamGame
|
||||
return;
|
||||
|
||||
//Spawn King
|
||||
this.CreatureAllowOverride = true;
|
||||
this.CreatureAllowOverride.SetOption(true);
|
||||
|
||||
_kingLoc = _kingLocs.get(UtilMath.r(_kingLocs.size()));
|
||||
|
||||
@ -404,7 +404,7 @@ public class CastleSiege extends TeamGame
|
||||
|
||||
_king.setRemoveWhenFarAway(false);
|
||||
|
||||
this.CreatureAllowOverride = false;
|
||||
this.CreatureAllowOverride.SetOption(false);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
@ -555,7 +555,7 @@ public class CastleSiege extends TeamGame
|
||||
Scoreboard.Write(_kingHealth + " Health");
|
||||
}
|
||||
|
||||
long timeLeft = 24000 - WorldTimeSet;
|
||||
long timeLeft = 24000 - WorldTimeSet.GetOption();
|
||||
timeLeft = timeLeft / 20 * 1000;
|
||||
|
||||
|
||||
@ -584,7 +584,7 @@ public class CastleSiege extends TeamGame
|
||||
if (!IsLive())
|
||||
return;
|
||||
|
||||
if (this.WorldTimeSet > 24100)
|
||||
if (this.WorldTimeSet.GetOption() > 24100)
|
||||
{
|
||||
SetCustomWinLine(_kingName + ChatColor.RESET + " has survived the siege!");
|
||||
|
||||
@ -937,7 +937,7 @@ public class CastleSiege extends TeamGame
|
||||
if (event.getType() != UpdateType.TICK)
|
||||
return;
|
||||
|
||||
WorldTimeSet = (WorldTimeSet + 1);
|
||||
WorldTimeSet.SetOption(WorldTimeSet.GetOption() + 1);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -67,16 +67,16 @@ public class ChampionsCTF extends CaptureTheFlag
|
||||
|
||||
Manager.getClassManager().GetItemFactory().getProximityManager().setProxyLimit(6);
|
||||
|
||||
this.StrictAntiHack = true;
|
||||
this.StrictAntiHack.SetOption(true);
|
||||
|
||||
InventoryOpenChest = true;
|
||||
InventoryOpenChest.SetOption(true);
|
||||
|
||||
EloRanking = false;
|
||||
EloStart = 1000;
|
||||
|
||||
this.DontAllowOverfill = true;
|
||||
this.DontAllowOverfill.SetOption(true);
|
||||
|
||||
this.DisableKillCommand = false;
|
||||
this.DisableKillCommand.SetOption(false);
|
||||
|
||||
registerStatTrackers(
|
||||
new KillReasonStatTracker(this, "Backstab", "Assassination", false),
|
||||
|
@ -62,16 +62,16 @@ public class ChampionsDominate extends Domination
|
||||
|
||||
Manager.getClassManager().GetItemFactory().getProximityManager().setProxyLimit(6);
|
||||
|
||||
this.StrictAntiHack = true;
|
||||
this.StrictAntiHack.SetOption(true);
|
||||
|
||||
InventoryOpenChest = true;
|
||||
InventoryOpenChest.SetOption(true);
|
||||
|
||||
EloRanking = false;
|
||||
EloStart = 1000;
|
||||
|
||||
this.DontAllowOverfill = true;
|
||||
this.DontAllowOverfill.SetOption(true);
|
||||
|
||||
this.DisableKillCommand = false;
|
||||
this.DisableKillCommand.SetOption(false);
|
||||
|
||||
registerStatTrackers(
|
||||
new KillReasonStatTracker(this, "Backstab", "Assassination", false),
|
||||
|
@ -63,13 +63,13 @@ public class ChampionsTDM extends TeamDeathmatch
|
||||
|
||||
Manager.getClassManager().GetItemFactory().getProximityManager().setProxyLimit(6);
|
||||
|
||||
this.StrictAntiHack = true;
|
||||
this.StrictAntiHack.SetOption(true);
|
||||
|
||||
InventoryOpenChest = true;
|
||||
InventoryOpenChest.SetOption(true);
|
||||
|
||||
this.DisableKillCommand = false;
|
||||
this.DisableKillCommand.SetOption(false);
|
||||
|
||||
this.DontAllowOverfill = true;
|
||||
this.DontAllowOverfill.SetOption(true);
|
||||
|
||||
registerStatTrackers(
|
||||
new WinWithoutLosingTeammateStatTracker(this, "FlawlessVictory"),
|
||||
|
@ -148,10 +148,10 @@ public class Christmas extends SoloGame
|
||||
"Defeat the Thief who stole the Presents!"
|
||||
});
|
||||
|
||||
BlockBreakAllow.add(4);
|
||||
HungerSet = 20;
|
||||
WorldTimeSet = 2000;
|
||||
PrepareFreeze = false;
|
||||
BlockBreakAllow.GetOption().add(4);
|
||||
HungerSet.SetOption(20);
|
||||
WorldTimeSet.SetOption(2000);
|
||||
PrepareFreeze.SetOption(false);
|
||||
|
||||
registerChatStats(
|
||||
DamageDealt,
|
||||
@ -332,7 +332,7 @@ public class Christmas extends SoloGame
|
||||
|
||||
Location loc = christmas.GetSleigh().GetLocation();
|
||||
|
||||
christmas.CreatureAllowOverride = true;
|
||||
christmas.CreatureAllowOverride.SetOption(true);
|
||||
for (int i=0 ; i<20 ; i++)
|
||||
{
|
||||
Location elfLoc = UtilBlock.getHighest(loc.getWorld(), (int)(loc.getX() + 20 - Math.random()*40), (int)(loc.getZ() + 20 - Math.random()*40)).getLocation().add(0.5, 0.5, 0.5);
|
||||
@ -345,7 +345,7 @@ public class Christmas extends SoloGame
|
||||
elf.setCustomName("Elf");
|
||||
|
||||
}
|
||||
christmas.CreatureAllowOverride = false;
|
||||
christmas.CreatureAllowOverride.SetOption(false);
|
||||
}
|
||||
}, 20);
|
||||
}
|
||||
|
@ -55,9 +55,9 @@ public class BossMobs
|
||||
_lastSpawn = System.currentTimeMillis();
|
||||
|
||||
//Spawn
|
||||
Host.Host.CreatureAllowOverride = true;
|
||||
Host.Host.CreatureAllowOverride.SetOption(true);
|
||||
Creature ent = UtilAlg.Random(_spawns).getWorld().spawn(UtilAlg.Random(_spawns), Skeleton.class);
|
||||
Host.Host.CreatureAllowOverride = false;
|
||||
Host.Host.CreatureAllowOverride.SetOption(false);
|
||||
|
||||
//Weapon
|
||||
double r = Math.random();
|
||||
|
@ -106,7 +106,7 @@ public class BossSnowmanPattern
|
||||
|
||||
_lastSpawn = System.currentTimeMillis();
|
||||
|
||||
Host.Host.CreatureAllowOverride = true;
|
||||
Host.Host.CreatureAllowOverride.SetOption(true);
|
||||
|
||||
//Spawn A
|
||||
for (int i=0 ; i<_spawnA.size() ; i++)
|
||||
@ -134,7 +134,7 @@ public class BossSnowmanPattern
|
||||
_ents.add(new BossSnowman(ent, loc, _bDir));
|
||||
}
|
||||
|
||||
Host.Host.CreatureAllowOverride = false;
|
||||
Host.Host.CreatureAllowOverride.SetOption(false);
|
||||
}
|
||||
|
||||
private void MoveDieHit()
|
||||
|
@ -27,9 +27,9 @@ public class CaveGiant
|
||||
{
|
||||
Host = host;
|
||||
|
||||
Host.Host.CreatureAllowOverride = true;
|
||||
Host.Host.CreatureAllowOverride.SetOption(true);
|
||||
_ent = loc.getWorld().spawn(loc, Giant.class);
|
||||
Host.Host.CreatureAllowOverride = false;
|
||||
Host.Host.CreatureAllowOverride.SetOption(false);
|
||||
UtilEnt.Vegetate(_ent);
|
||||
|
||||
_ent.setMaxHealth(300);
|
||||
|
@ -98,12 +98,12 @@ public class CaptureTheFlag extends TeamGame
|
||||
|
||||
});
|
||||
|
||||
this.DeathOut = false;
|
||||
this.PrepareFreeze = true;
|
||||
this.HungerSet = 20;
|
||||
this.WorldTimeSet = 2000;
|
||||
this.DeathOut.SetOption(false);
|
||||
this.PrepareFreeze.SetOption(true);
|
||||
this.HungerSet.SetOption(20);
|
||||
this.WorldTimeSet.SetOption(2000);
|
||||
|
||||
this.DeathSpectateSecs = 10;
|
||||
this.DeathSpectateSecs.SetOption(10);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -129,7 +129,7 @@ public class CaptureTheFlag extends TeamGame
|
||||
|
||||
if (this instanceof ChampionsCTF)
|
||||
{
|
||||
CreatureAllowOverride = true;
|
||||
CreatureAllowOverride.SetOption(true);
|
||||
for (int i = 0; i < GetKits().length && i < WorldData.GetDataLocs("LIGHT_BLUE").size() && i < WorldData.GetDataLocs("PINK").size(); i++)
|
||||
{
|
||||
Entity ent = GetKits()[i].SpawnEntity(WorldData.GetDataLocs("PINK").get(i));
|
||||
@ -138,7 +138,7 @@ public class CaptureTheFlag extends TeamGame
|
||||
ent = GetKits()[i].SpawnEntity(WorldData.GetDataLocs("LIGHT_BLUE").get(i));
|
||||
Manager.GetLobby().AddKitLocation(ent, GetKits()[i], WorldData.GetDataLocs("LIGHT_BLUE").get(i));
|
||||
}
|
||||
CreatureAllowOverride = false;
|
||||
CreatureAllowOverride.SetOption(false);
|
||||
}
|
||||
|
||||
//End kit spawning
|
||||
@ -247,7 +247,7 @@ public class CaptureTheFlag extends TeamGame
|
||||
else
|
||||
{
|
||||
_suddenDeath = true;
|
||||
this.DeathOut = true;
|
||||
this.DeathOut.SetOption(true);
|
||||
UtilTextMiddle.display(C.cYellow + "Sudden Death", "Next Capture Wins! No Respawns!");
|
||||
return;
|
||||
}
|
||||
|
@ -80,12 +80,12 @@ public class Domination extends TeamGame
|
||||
|
||||
});
|
||||
|
||||
this.DeathOut = false;
|
||||
this.PrepareFreeze = true;
|
||||
this.HungerSet = 20;
|
||||
this.WorldTimeSet = 2000;
|
||||
this.DeathOut.SetOption(false);
|
||||
this.PrepareFreeze.SetOption(true);
|
||||
this.HungerSet.SetOption(20);
|
||||
this.WorldTimeSet.SetOption(2000);
|
||||
|
||||
this.DeathSpectateSecs = 10;
|
||||
this.DeathSpectateSecs.SetOption(10);
|
||||
|
||||
//this.QuitOut = false;
|
||||
}
|
||||
@ -113,7 +113,7 @@ public class Domination extends TeamGame
|
||||
//Spawn Kits
|
||||
if (this instanceof ChampionsDominate)
|
||||
{
|
||||
CreatureAllowOverride = true;
|
||||
CreatureAllowOverride.SetOption(true);
|
||||
|
||||
for (int i = 0; i < GetKits().length && i < WorldData.GetDataLocs("RED").size() && i < WorldData.GetDataLocs("BLUE").size(); i++)
|
||||
{
|
||||
@ -124,7 +124,7 @@ public class Domination extends TeamGame
|
||||
Manager.GetLobby().AddKitLocation(ent, GetKits()[i], WorldData.GetDataLocs("BLUE").get(i));
|
||||
}
|
||||
|
||||
CreatureAllowOverride = false;
|
||||
CreatureAllowOverride.SetOption(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,14 +63,14 @@ public class DeathTag extends SoloGame
|
||||
"The last Runner alive wins!"
|
||||
});
|
||||
|
||||
this.StrictAntiHack = true;
|
||||
this.StrictAntiHack.SetOption(true);
|
||||
|
||||
this.DeathOut = false;
|
||||
this.HungerSet = 20;
|
||||
this.DeathOut.SetOption(false);
|
||||
this.HungerSet.SetOption(20);
|
||||
|
||||
this.CompassEnabled = true;
|
||||
|
||||
this.PrepareFreeze = false;
|
||||
this.PrepareFreeze.SetOption(false);
|
||||
|
||||
registerStatTrackers(new ComeAtMeBroStatTracker(this));
|
||||
|
||||
|
@ -114,9 +114,9 @@ public class DragonEscape extends SoloGame
|
||||
"Last player alive wins!"
|
||||
});
|
||||
|
||||
this.DamagePvP = false;
|
||||
this.HungerSet = 20;
|
||||
this.BlockPlace = true;
|
||||
this.DamagePvP.SetOption(false);
|
||||
this.HungerSet.SetOption(20);
|
||||
this.BlockPlace.SetOption(true);
|
||||
|
||||
registerStatTrackers(
|
||||
new ParalympicsStatTracker(this),
|
||||
@ -176,10 +176,10 @@ public class DragonEscape extends SoloGame
|
||||
_speedMult = WorldData.GetDataLocs("GREEN").get(0).getX()/100d;
|
||||
|
||||
if (WorldData.MapName.contains("Hell"))
|
||||
this.WorldTimeSet = 16000;
|
||||
this.WorldTimeSet.SetOption(16000);
|
||||
|
||||
if (WorldData.MapName.contains("Pirate"))
|
||||
this.WorldWaterDamage = 2;
|
||||
this.WorldWaterDamage.SetOption(2);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@ -191,9 +191,9 @@ public class DragonEscape extends SoloGame
|
||||
for (Team team : GetScoreboard().GetScoreboard().getTeams())
|
||||
team.setCanSeeFriendlyInvisibles(true);
|
||||
|
||||
this.CreatureAllowOverride = true;
|
||||
this.CreatureAllowOverride.SetOption(true);
|
||||
EnderDragon dragon = _dragon.getWorld().spawn(_dragon, EnderDragon.class);
|
||||
this.CreatureAllowOverride = false;
|
||||
this.CreatureAllowOverride.SetOption(false);
|
||||
|
||||
dragon.setCustomName(ChatColor.YELLOW + C.Bold + "Douglas the Dragon");
|
||||
|
||||
|
@ -81,8 +81,8 @@ public class DragonEscapeTeams extends TeamGame
|
||||
"Last player alive wins!"
|
||||
});
|
||||
|
||||
this.DamagePvP = false;
|
||||
this.HungerSet = 20;
|
||||
this.DamagePvP.SetOption(false);
|
||||
this.HungerSet.SetOption(20);
|
||||
|
||||
this.TeamArmorHotbar = true;
|
||||
|
||||
@ -159,7 +159,7 @@ public class DragonEscapeTeams extends TeamGame
|
||||
_speedMult = WorldData.GetDataLocs("GREEN").get(0).getX()/100d;
|
||||
|
||||
if (WorldData.MapName.contains("Hell"))
|
||||
this.WorldTimeSet = 16000;
|
||||
this.WorldTimeSet.SetOption(16000);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@ -174,9 +174,9 @@ public class DragonEscapeTeams extends TeamGame
|
||||
if (event.GetState() != GameState.Prepare)
|
||||
return;
|
||||
|
||||
this.CreatureAllowOverride = true;
|
||||
this.CreatureAllowOverride.SetOption(true);
|
||||
EnderDragon dragon = _dragon.getWorld().spawn(_dragon, EnderDragon.class);
|
||||
this.CreatureAllowOverride = false;
|
||||
this.CreatureAllowOverride.SetOption(false);
|
||||
|
||||
dragon.setCustomName(ChatColor.YELLOW + C.Bold + "Douglas the Dragon");
|
||||
|
||||
|
@ -39,10 +39,10 @@ public class DragonData
|
||||
Location = rider.getLocation();
|
||||
|
||||
//Spawn Dragon
|
||||
manager.GetGame().CreatureAllowOverride = true;
|
||||
manager.GetGame().CreatureAllowOverride.SetOption(true);
|
||||
Dragon = rider.getWorld().spawn(rider.getLocation(), EnderDragon.class);
|
||||
UtilEnt.Vegetate(Dragon);
|
||||
manager.GetGame().CreatureAllowOverride = false;
|
||||
manager.GetGame().CreatureAllowOverride.SetOption(false);
|
||||
|
||||
rider.getWorld().playSound(rider.getLocation(), Sound.ENDERDRAGON_GROWL, 20f, 1f);
|
||||
|
||||
|
@ -22,8 +22,8 @@ public class DragonRiders extends SoloGame
|
||||
|
||||
});
|
||||
|
||||
this.Damage = false;
|
||||
this.HungerSet = 20;
|
||||
this.Damage.SetOption(false);
|
||||
this.HungerSet.SetOption(20);
|
||||
|
||||
//Chat stats
|
||||
registerChatStats();
|
||||
|
@ -59,9 +59,9 @@ public class Dragons extends SoloGame
|
||||
"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);
|
||||
|
||||
registerStatTrackers(
|
||||
new SparklezStatTracker(this)
|
||||
@ -153,10 +153,10 @@ public class Dragons extends SoloGame
|
||||
|
||||
if (_dragons.size() < 7)
|
||||
{
|
||||
CreatureAllowOverride = true;
|
||||
CreatureAllowOverride.SetOption(true);
|
||||
EnderDragon ent = GetSpectatorLocation().getWorld().spawn(_dragonSpawns.get(0), EnderDragon.class);
|
||||
UtilEnt.Vegetate(ent);
|
||||
CreatureAllowOverride = false;
|
||||
CreatureAllowOverride.SetOption(false);
|
||||
|
||||
ent.getWorld().playSound(ent.getLocation(), Sound.ENDERDRAGON_GROWL, 20f, 1f);
|
||||
|
||||
|
@ -66,10 +66,10 @@ public class DragonsTeams extends TeamGame
|
||||
"Team with longest time survived wins!"
|
||||
});
|
||||
|
||||
this.DamagePvP = false;
|
||||
this.HungerSet = 20;
|
||||
this.WorldWaterDamage = 4;
|
||||
this.PrepareFreeze = false;
|
||||
this.DamagePvP.SetOption(false);
|
||||
this.HungerSet.SetOption(20);
|
||||
this.WorldWaterDamage.SetOption(4);
|
||||
this.PrepareFreeze.SetOption(false);
|
||||
|
||||
this.TeamArmor = true;
|
||||
this.TeamArmorHotbar = true;
|
||||
@ -157,10 +157,10 @@ public class DragonsTeams extends TeamGame
|
||||
|
||||
if (_dragons.size() < 7)
|
||||
{
|
||||
CreatureAllowOverride = true;
|
||||
CreatureAllowOverride.SetOption(true);
|
||||
EnderDragon ent = GetSpectatorLocation().getWorld().spawn(_dragonSpawns.get(0), EnderDragon.class);
|
||||
UtilEnt.Vegetate(ent);
|
||||
CreatureAllowOverride = false;
|
||||
CreatureAllowOverride.SetOption(false);
|
||||
|
||||
ent.getWorld().playSound(ent.getLocation(), Sound.ENDERDRAGON_GROWL, 20f, 1f);
|
||||
|
||||
|
@ -111,10 +111,10 @@ public class Draw extends SoloGame
|
||||
"Hints are given at top of screen",
|
||||
});
|
||||
|
||||
this.StrictAntiHack = true;
|
||||
this.Damage = false;
|
||||
this.HungerSet = 20;
|
||||
this.WorldTimeSet = 8000;
|
||||
this.StrictAntiHack.SetOption(true);
|
||||
this.Damage.SetOption(false);
|
||||
this.HungerSet.SetOption(20);
|
||||
this.WorldTimeSet.SetOption(8000);
|
||||
|
||||
_words = new String[]
|
||||
{
|
||||
|
@ -113,41 +113,41 @@ public class EventGame extends Game
|
||||
""
|
||||
});
|
||||
|
||||
this.JoinInProgress = true;
|
||||
this.JoinInProgress.SetOption(true);
|
||||
|
||||
this.DamageTeamSelf = true;
|
||||
this.DamagePvP = false;
|
||||
this.DamageEvP = false;
|
||||
this.DamagePvE = false;
|
||||
this.DamageTeamSelf.SetOption(true);
|
||||
this.DamagePvP.SetOption(false);
|
||||
this.DamageEvP.SetOption(false);
|
||||
this.DamagePvE.SetOption(false);
|
||||
|
||||
this.DeathMessages = false;
|
||||
this.DeathOut = false;
|
||||
this.DeathMessages.SetOption(false);
|
||||
this.DeathOut.SetOption(false);
|
||||
|
||||
this.CanAddStats = false;
|
||||
this.CanGiveLoot = false;
|
||||
|
||||
this.GadgetsDisabled = false;
|
||||
this.GadgetsDisabled.SetOption(false);
|
||||
|
||||
this.TeleportsDisqualify = false;
|
||||
this.TeleportsDisqualify.SetOption(false);
|
||||
|
||||
this.PrepareFreeze = false;
|
||||
this.PrepareFreeze.SetOption(false);
|
||||
|
||||
this.BlockPlaceCreative = true;
|
||||
this.BlockBreakCreative = true;
|
||||
this.BlockPlaceCreative.SetOption(true);
|
||||
this.BlockBreakCreative.SetOption(true);
|
||||
|
||||
this.InventoryClick = true;
|
||||
this.InventoryOpenBlock = true;
|
||||
this.InventoryOpenChest = true;
|
||||
this.InventoryClick.SetOption(true);
|
||||
this.InventoryOpenBlock.SetOption(true);
|
||||
this.InventoryOpenChest.SetOption(true);
|
||||
|
||||
|
||||
//Dont timeout
|
||||
this.GameTimeout = -1;
|
||||
this.GameTimeout.SetOption(-1);
|
||||
|
||||
_mps = manager.GetGameHostManager();
|
||||
_functionSigns = new HashMap<>();
|
||||
_powerdedSigns = new ArrayList<>();
|
||||
|
||||
this.CreatureAllow = true;
|
||||
this.CreatureAllow.SetOption(true);
|
||||
|
||||
_customAreas = new HashMap<>();
|
||||
}
|
||||
@ -989,13 +989,13 @@ public class EventGame extends Game
|
||||
|
||||
if(Manager.GetEventModule().getDamagePlayers().contains(event.GetDamagerPlayer(true)))
|
||||
{
|
||||
if(!Manager.GetGame().DamagePvP)
|
||||
if(!Manager.GetGame().DamagePvP.GetOption())
|
||||
{
|
||||
Manager.GetGame().Damage = true;
|
||||
Manager.GetGame().DamagePvP = true;
|
||||
Manager.GetGame().Damage.SetOption(true);
|
||||
Manager.GetGame().DamagePvP.SetOption(true);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Manager.GetGame().DamagePvP = false;
|
||||
Manager.GetGame().Damage = false;
|
||||
Manager.GetGame().DamagePvP.SetOption(false);
|
||||
Manager.GetGame().Damage.SetOption(false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -1032,13 +1032,13 @@ public class EventGame extends Game
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if(!Manager.GetGame().DamagePvP)
|
||||
if(!Manager.GetGame().DamagePvP.GetOption())
|
||||
{
|
||||
Manager.GetGame().Damage = true;
|
||||
Manager.GetGame().DamagePvP = true;
|
||||
Manager.GetGame().Damage.SetOption(true);
|
||||
Manager.GetGame().DamagePvP.SetOption(true);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
Manager.GetGame().DamagePvP = false;
|
||||
Manager.GetGame().Damage = false;
|
||||
Manager.GetGame().DamagePvP.SetOption(false);
|
||||
Manager.GetGame().Damage.SetOption(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -456,11 +456,11 @@ public class EventModule extends MiniPlugin
|
||||
|
||||
public void listSettings(Player player)
|
||||
{
|
||||
UtilPlayer.message(player, F.value("Damage All", F.tf(Manager.GetGame().Damage)));
|
||||
UtilPlayer.message(player, F.value("Damage PvP", F.tf(Manager.GetGame().DamagePvP)));
|
||||
UtilPlayer.message(player, F.value("Damage PvE", F.tf(Manager.GetGame().DamagePvE)));
|
||||
UtilPlayer.message(player, F.value("Damage EvP", F.tf(Manager.GetGame().DamageEvP)));
|
||||
UtilPlayer.message(player, F.value("Damage Fall", F.tf(Manager.GetGame().DamageFall)));
|
||||
UtilPlayer.message(player, F.value("Damage All", F.tf(Manager.GetGame().Damage.GetOption())));
|
||||
UtilPlayer.message(player, F.value("Damage PvP", F.tf(Manager.GetGame().DamagePvP.GetOption())));
|
||||
UtilPlayer.message(player, F.value("Damage PvE", F.tf(Manager.GetGame().DamagePvE.GetOption())));
|
||||
UtilPlayer.message(player, F.value("Damage EvP", F.tf(Manager.GetGame().DamageEvP.GetOption())));
|
||||
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)));
|
||||
@ -468,11 +468,11 @@ public class EventModule extends MiniPlugin
|
||||
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("Block Place Whitelist", UtilText.listToString(Manager.GetGame().BlockPlaceAllow, true)));
|
||||
UtilPlayer.message(player, F.value("Block Place Blacklist", UtilText.listToString(Manager.GetGame().BlockPlaceDeny, true)));
|
||||
UtilPlayer.message(player, F.value("Block Break", F.tf(Manager.GetGame().BlockPlace)));
|
||||
UtilPlayer.message(player, F.value("Block Break Whitelist", UtilText.listToString(Manager.GetGame().BlockBreakAllow, true)));
|
||||
UtilPlayer.message(player, F.value("Block Break Blacklist", UtilText.listToString(Manager.GetGame().BlockBreakDeny, true)));
|
||||
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("Time Set", Manager.GetGame().WorldTimeSet+""));
|
||||
UtilPlayer.message(player, F.value("Mob griefing", F.tf(_mobGriefing)));
|
||||
}
|
||||
@ -535,44 +535,44 @@ public class EventModule extends MiniPlugin
|
||||
{
|
||||
if (command.equalsIgnoreCase("add"))
|
||||
{
|
||||
Manager.GetGame().BlockPlaceAllow.add(blockId);
|
||||
Manager.GetGame().BlockPlaceAllow.GetOption().add(blockId);
|
||||
UtilPlayer.message(player, F.main("Event Settings", F.value("Block Place Whitelist", "Added " + blockId)));
|
||||
}
|
||||
else if (command.equalsIgnoreCase("remove"))
|
||||
{
|
||||
Manager.GetGame().BlockPlaceAllow.remove(blockId);
|
||||
Manager.GetGame().BlockPlaceAllow.GetOption().remove(blockId);
|
||||
UtilPlayer.message(player, F.main("Event Settings", F.value("Block Place Whitelist", "Removed " + blockId)));
|
||||
}
|
||||
else if (command.equalsIgnoreCase("clear"))
|
||||
{
|
||||
Manager.GetGame().BlockPlaceAllow.clear();
|
||||
Manager.GetGame().BlockPlaceAllow.GetOption().clear();
|
||||
UtilPlayer.message(player, F.main("Event Settings", F.value("Block Place Whitelist", "Cleared")));
|
||||
}
|
||||
else if (command.equalsIgnoreCase("list"))
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Event Settings", F.value("Block Place Whitelist", UtilText.listToString(Manager.GetGame().BlockPlaceAllow, true))));
|
||||
UtilPlayer.message(player, F.main("Event Settings", F.value("Block Place Whitelist", UtilText.listToString(Manager.GetGame().BlockPlaceAllow.GetOption(), true))));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (command.equalsIgnoreCase("add"))
|
||||
{
|
||||
Manager.GetGame().BlockPlaceDeny.add(blockId);
|
||||
Manager.GetGame().BlockPlaceDeny.GetOption().add(blockId);
|
||||
UtilPlayer.message(player, F.main("Event Settings", F.value("Block Place Blacklist", "Added " + blockId)));
|
||||
}
|
||||
else if (command.equalsIgnoreCase("remove"))
|
||||
{
|
||||
Manager.GetGame().BlockPlaceDeny.remove(blockId);
|
||||
Manager.GetGame().BlockPlaceDeny.GetOption().remove(blockId);
|
||||
UtilPlayer.message(player, F.main("Event Settings", F.value("Block Place Blacklist", "Removed " + blockId)));
|
||||
}
|
||||
else if (command.equalsIgnoreCase("clear"))
|
||||
{
|
||||
Manager.GetGame().BlockPlaceDeny.clear();
|
||||
Manager.GetGame().BlockPlaceDeny.GetOption().clear();
|
||||
UtilPlayer.message(player, F.main("Event Settings", F.value("Block Place Blacklist", "Cleared")));
|
||||
}
|
||||
else if (command.equalsIgnoreCase("list"))
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Event Settings", F.value("Block Place Blacklist", UtilText.listToString(Manager.GetGame().BlockPlaceDeny, true))));
|
||||
UtilPlayer.message(player, F.main("Event Settings", F.value("Block Place Blacklist", UtilText.listToString(Manager.GetGame().BlockPlaceDeny.GetOption(), true))));
|
||||
}
|
||||
}
|
||||
|
||||
@ -596,44 +596,44 @@ public class EventModule extends MiniPlugin
|
||||
{
|
||||
if (command.equalsIgnoreCase("add"))
|
||||
{
|
||||
Manager.GetGame().BlockBreakAllow.add(blockId);
|
||||
Manager.GetGame().BlockBreakAllow.GetOption().add(blockId);
|
||||
UtilPlayer.message(player, F.main("Event Settings", F.value("Block Break Whitelist", "Added " + blockId)));
|
||||
}
|
||||
else if (command.equalsIgnoreCase("remove"))
|
||||
{
|
||||
Manager.GetGame().BlockBreakAllow.remove(blockId);
|
||||
Manager.GetGame().BlockBreakAllow.GetOption().remove(blockId);
|
||||
UtilPlayer.message(player, F.main("Event Settings", F.value("Block Break Whitelist", "Removed " + blockId)));
|
||||
}
|
||||
else if (command.equalsIgnoreCase("clear"))
|
||||
{
|
||||
Manager.GetGame().BlockBreakAllow.clear();
|
||||
Manager.GetGame().BlockBreakAllow.GetOption().clear();
|
||||
UtilPlayer.message(player, F.main("Event Settings", F.value("Block Break Whitelist", "Cleared")));
|
||||
}
|
||||
else if (command.equalsIgnoreCase("list"))
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Event Settings", F.value("Block Break Whitelist", UtilText.listToString(Manager.GetGame().BlockBreakAllow, true))));
|
||||
UtilPlayer.message(player, F.main("Event Settings", F.value("Block Break Whitelist", UtilText.listToString(Manager.GetGame().BlockBreakAllow.GetOption(), true))));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (command.equalsIgnoreCase("add"))
|
||||
{
|
||||
Manager.GetGame().BlockBreakDeny.add(blockId);
|
||||
Manager.GetGame().BlockBreakDeny.GetOption().add(blockId);
|
||||
UtilPlayer.message(player, F.main("Event Settings", F.value("Block Break Blacklist", "Added " + blockId)));
|
||||
}
|
||||
else if (command.equalsIgnoreCase("remove"))
|
||||
{
|
||||
Manager.GetGame().BlockBreakDeny.remove(blockId);
|
||||
Manager.GetGame().BlockBreakDeny.GetOption().remove(blockId);
|
||||
UtilPlayer.message(player, F.main("Event Settings", F.value("Block Break Blacklist", "Removed " + blockId)));
|
||||
}
|
||||
else if (command.equalsIgnoreCase("clear"))
|
||||
{
|
||||
Manager.GetGame().BlockBreakDeny.clear();
|
||||
Manager.GetGame().BlockBreakDeny.GetOption().clear();
|
||||
UtilPlayer.message(player, F.main("Event Settings", F.value("Block Break Blacklist", "Cleared")));
|
||||
}
|
||||
else if (command.equalsIgnoreCase("list"))
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Event Settings", F.value("Block Break Blacklist", UtilText.listToString(Manager.GetGame().BlockBreakDeny, true))));
|
||||
UtilPlayer.message(player, F.main("Event Settings", F.value("Block Break Blacklist", UtilText.listToString(Manager.GetGame().BlockBreakDeny.GetOption(), true))));
|
||||
}
|
||||
}
|
||||
|
||||
@ -660,7 +660,7 @@ public class EventModule extends MiniPlugin
|
||||
if (health > 20)
|
||||
health = 20;
|
||||
|
||||
Manager.GetGame().HealthSet = health;
|
||||
Manager.GetGame().HealthSet.SetOption(health);
|
||||
|
||||
if (Manager.GetGame().HealthSet.GetOption() == -1)
|
||||
Manager.GetGame().Announce(F.main("Event Settings", F.value("Health Set", "Disabled")));
|
||||
@ -691,7 +691,7 @@ public class EventModule extends MiniPlugin
|
||||
if (hunger > 20)
|
||||
hunger = 20;
|
||||
|
||||
Manager.GetGame().HungerSet = hunger;
|
||||
Manager.GetGame().HungerSet.SetOption(hunger);
|
||||
|
||||
if (Manager.GetGame().HungerSet.GetOption() == -1)
|
||||
Manager.GetGame().Announce(F.main("Event Settings", F.value("Hunger Set", "Disabled")));
|
||||
@ -722,7 +722,7 @@ public class EventModule extends MiniPlugin
|
||||
if (time > 24000)
|
||||
time = 24000;
|
||||
|
||||
Manager.GetGame().WorldTimeSet = time;
|
||||
Manager.GetGame().WorldTimeSet.SetOption(time);
|
||||
|
||||
if (Manager.GetGame().WorldTimeSet.GetOption() == -1)
|
||||
Manager.GetGame().Announce(F.main("Event Settings", F.value("Time Set", "Disabled")));
|
||||
|
@ -28,7 +28,7 @@ public abstract class CreatureBase<T extends LivingEntity>
|
||||
Host = game;
|
||||
_name = name;
|
||||
|
||||
game.CreatureAllowOverride = true;
|
||||
game.CreatureAllowOverride.SetOption(true);
|
||||
_ent = loc.getWorld().spawn(loc, mobClass);
|
||||
|
||||
|
||||
@ -40,7 +40,7 @@ public abstract class CreatureBase<T extends LivingEntity>
|
||||
|
||||
SpawnCustom(_ent);
|
||||
|
||||
game.CreatureAllowOverride = false;
|
||||
game.CreatureAllowOverride.SetOption(false);
|
||||
}
|
||||
|
||||
public abstract void SpawnCustom(T ent);
|
||||
|
@ -92,28 +92,28 @@ public class BombLobbers extends TeamGame implements IThrown
|
||||
"Last team alive wins!"
|
||||
});
|
||||
|
||||
DamageFall = true;
|
||||
DamageEvP = true;
|
||||
DamageFall.SetOption(true);
|
||||
DamageEvP.SetOption(true);
|
||||
|
||||
WorldWaterDamage = 5;
|
||||
WorldWaterDamage.SetOption(5);
|
||||
|
||||
PrepareFreeze = false;
|
||||
PrepareFreeze.SetOption(false);
|
||||
|
||||
TeamArmor = true;
|
||||
TeamArmorHotbar = true;
|
||||
|
||||
InventoryOpenChest = false;
|
||||
InventoryOpenBlock = false;
|
||||
InventoryOpenChest.SetOption(false);
|
||||
InventoryOpenBlock.SetOption(false);
|
||||
|
||||
ItemDrop = false;
|
||||
ItemDrop.SetOption(false);
|
||||
|
||||
BlockPlace = false;
|
||||
BlockPlace.SetOption(false);
|
||||
|
||||
Manager.GetExplosion().SetLiquidDamage(false);
|
||||
|
||||
HungerSet = 20;
|
||||
HungerSet.SetOption(20);
|
||||
|
||||
WorldTimeSet = 6000;
|
||||
WorldTimeSet.SetOption(6000);
|
||||
|
||||
registerStatTrackers(
|
||||
new Tracker6Kill(this),
|
||||
@ -140,7 +140,7 @@ public class BombLobbers extends TeamGame implements IThrown
|
||||
|
||||
if (WorldData.MapName.equalsIgnoreCase("Intergalactic"))
|
||||
{
|
||||
WorldTimeSet = 18000;
|
||||
WorldTimeSet.SetOption(18000);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,7 @@ public class ChallengeDragonEgg extends Challenge
|
||||
block.getLocation().add(0.5, 0.5, 0.5), 0.5F, 0.5F, 0.5F, 0,
|
||||
11, ViewDist.MAX, UtilServer.getPlayers());
|
||||
|
||||
Host.CreatureAllowOverride = true;
|
||||
Host.CreatureAllowOverride.SetOption(true);
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
@ -106,7 +106,7 @@ public class ChallengeDragonEgg extends Challenge
|
||||
}
|
||||
}
|
||||
|
||||
Host.CreatureAllowOverride = false;
|
||||
Host.CreatureAllowOverride.SetOption(false);
|
||||
|
||||
Player player = event.getPlayer();
|
||||
|
||||
|
@ -100,13 +100,13 @@ public class ChallengeHitTargets extends Challenge
|
||||
@Override
|
||||
public void cleanupRoom()
|
||||
{
|
||||
Host.DamagePvP = false;
|
||||
Host.DamagePvP.SetOption(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupPlayers()
|
||||
{
|
||||
Host.DamagePvP = true;
|
||||
Host.DamagePvP.SetOption(true);
|
||||
ArrayList<Player> players = getChallengers();
|
||||
|
||||
for (Player player : players)
|
||||
|
@ -126,7 +126,7 @@ public class ChallengeMilkACow extends Challenge
|
||||
}
|
||||
}
|
||||
|
||||
Host.CreatureAllowOverride = true;
|
||||
Host.CreatureAllowOverride.SetOption(true);
|
||||
_villager = (Villager) getCenter().getWorld().spawnEntity(getCenter().clone().add(0, 1, 0), EntityType.VILLAGER);
|
||||
_villager.setProfession(Profession.FARMER);
|
||||
_villager.setCustomName(C.Bold + "Farmer Joe");
|
||||
@ -156,7 +156,7 @@ public class ChallengeMilkACow extends Challenge
|
||||
_milked.put(cow, new ArrayList<String>());
|
||||
}
|
||||
|
||||
Host.CreatureAllowOverride = false;
|
||||
Host.CreatureAllowOverride.SetOption(false);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -184,7 +184,7 @@ public class ChallengeNameThatSound extends ChallengeSeperateRooms
|
||||
|
||||
Collections.shuffle(entityType);
|
||||
|
||||
Host.CreatureAllowOverride = true;
|
||||
Host.CreatureAllowOverride.SetOption(true);
|
||||
|
||||
int i = 0;
|
||||
|
||||
@ -205,7 +205,7 @@ public class ChallengeNameThatSound extends ChallengeSeperateRooms
|
||||
}
|
||||
}
|
||||
|
||||
Host.CreatureAllowOverride = false;
|
||||
Host.CreatureAllowOverride.SetOption(false);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -52,7 +52,7 @@ public class ChallengeShootChickens extends Challenge
|
||||
arrow.remove();
|
||||
}
|
||||
|
||||
Host.DamagePvE = false;
|
||||
Host.DamagePvE.SetOption(false);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@ -140,9 +140,9 @@ public class ChallengeShootChickens extends Challenge
|
||||
{
|
||||
Location loc = getCenter().clone().add(UtilMath.r(20) - 10, 15, UtilMath.r(20) - 10);
|
||||
|
||||
Host.CreatureAllowOverride = true;
|
||||
Host.CreatureAllowOverride.SetOption(true);
|
||||
Chicken chicken = (Chicken) loc.getWorld().spawnEntity(loc, EntityType.CHICKEN);
|
||||
Host.CreatureAllowOverride = false;
|
||||
Host.CreatureAllowOverride.SetOption(false);
|
||||
chicken.setMaxHealth(0.1);
|
||||
chicken.setHealth(0.1);
|
||||
|
||||
@ -164,7 +164,7 @@ public class ChallengeShootChickens extends Challenge
|
||||
_killedChickens.put(player.getName(), 0);
|
||||
}
|
||||
|
||||
Host.DamagePvE = true;
|
||||
Host.DamagePvE.SetOption(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -42,7 +42,7 @@ public class ChallengeSkyFall extends Challenge
|
||||
@Override
|
||||
public void cleanupRoom()
|
||||
{
|
||||
Host.DamageEvP = false;
|
||||
Host.DamageEvP.SetOption(false);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@ -66,7 +66,7 @@ public class ChallengeSkyFall extends Challenge
|
||||
{
|
||||
setBorder(-50, 50, 0, 254, -50, 50);
|
||||
|
||||
Host.DamageEvP = true;
|
||||
Host.DamageEvP.SetOption(true);
|
||||
|
||||
for (Player player : getChallengers())
|
||||
{
|
||||
|
@ -29,7 +29,7 @@ public class ChallengeSmashOff extends Challenge
|
||||
@Override
|
||||
public void cleanupRoom()
|
||||
{
|
||||
Host.DamagePvP = false;
|
||||
Host.DamagePvP.SetOption(false);
|
||||
|
||||
for (Player player : getChallengers())
|
||||
{
|
||||
@ -40,7 +40,7 @@ public class ChallengeSmashOff extends Challenge
|
||||
@Override
|
||||
public void setupPlayers()
|
||||
{
|
||||
Host.DamagePvP = true;
|
||||
Host.DamagePvP.SetOption(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -46,7 +46,7 @@ public class ChallengeTntLauncher extends Challenge
|
||||
@Override
|
||||
public void cleanupRoom()
|
||||
{
|
||||
Host.Damage = true;
|
||||
Host.Damage.SetOption(true);
|
||||
|
||||
for (Entity tnt : _tnt)
|
||||
{
|
||||
|
@ -62,7 +62,7 @@ public class ChallengeVolleyPig extends Challenge
|
||||
public void cleanupRoom()
|
||||
{
|
||||
_pig.remove();
|
||||
Host.DamagePvE = false;
|
||||
Host.DamagePvE.SetOption(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -73,7 +73,7 @@ public class ChallengeVolleyPig extends Challenge
|
||||
player.getInventory().setItem(0, new ItemBuilder(Material.STICK).addEnchantment(Enchantment.KNOCKBACK, 1).build());
|
||||
}
|
||||
|
||||
Host.DamagePvE = true;
|
||||
Host.DamagePvE.SetOption(true);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOW)
|
||||
@ -203,12 +203,12 @@ public class ChallengeVolleyPig extends Challenge
|
||||
@Override
|
||||
public void generateRoom()
|
||||
{
|
||||
Host.CreatureAllowOverride = true;
|
||||
Host.CreatureAllowOverride.SetOption(true);
|
||||
|
||||
_pig = getCenter().getWorld().spawnEntity(getCenter().add(0, 1, 0), EntityType.PIG);
|
||||
UtilEnt.Vegetate(_pig);
|
||||
|
||||
Host.CreatureAllowOverride = false;
|
||||
Host.CreatureAllowOverride.SetOption(false);
|
||||
|
||||
for (int x = -6; x <= 6; x++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user