Implement a setting to configure whether a game type can be the favorite game of a community

This commit is contained in:
AlexTheCoder 2016-12-14 22:04:15 -05:00 committed by cnr
parent 482f0e5b2a
commit 88fc34def4
1 changed files with 82 additions and 79 deletions

View File

@ -10,96 +10,96 @@ import org.bukkit.Material;
public enum GameDisplay
{
//Mini
BaconBrawl("Bacon Brawl", Material.PORK, (byte)0, GameCategory.ARCADE, 1),
Barbarians("A Barbarians Life", Material.WOOD_AXE, (byte)0, GameCategory.EXTRA, 2),
BossBattles("Boss Battles", Material.SKULL_ITEM, (byte) 0, GameCategory.EVENT, 55),
Bridge("The Bridges", Material.IRON_PICKAXE, (byte)0, GameCategory.SURVIVAL, 3),
CastleSiege("Castle Siege", Material.DIAMOND_CHESTPLATE, (byte)0, GameCategory.CLASSICS, 4),
ChampionsDominate("Champions Domination", "Champions", Material.BEACON, (byte)0, GameCategory.CHAMPIONS, 6),
ChampionsTDM("Champions TDM", "Champions", Material.GOLD_SWORD, (byte)0, GameCategory.CHAMPIONS, 5),
Christmas("Christmas Chaos", Material.SNOW_BALL, (byte)0, GameCategory.CLASSICS, 8),
DeathTag("Death Tag", Material.SKULL_ITEM, (byte)0, GameCategory.ARCADE, 9),
DragonEscape("Dragon Escape", Material.DRAGON_EGG, (byte)0, GameCategory.ARCADE, 10),
DragonEscapeTeams("Dragon Escape Teams", Material.DRAGON_EGG, (byte)0, GameCategory.TEAM_VARIANT, 11),
DragonRiders("Dragon Riders", Material.DRAGON_EGG, (byte)0, GameCategory.ARCADE, 12),
Dragons("Dragons", Material.ENDER_STONE, (byte)0, GameCategory.ARCADE, 13),
DragonsTeams("Dragons Teams", Material.DRAGON_EGG, (byte)0, GameCategory.TEAM_VARIANT, 14),
Draw("Draw My Thing", Material.BOOK_AND_QUILL, (byte)0, GameCategory.CLASSICS, 15),
ElytraRings("Elytra Rings", Material.ELYTRA, (byte) 0, GameCategory.CLASSICS, 61),
Evolution("Evolution", Material.EMERALD, (byte)0, GameCategory.ARCADE, 16),
Gravity("Gravity", Material.ENDER_PORTAL_FRAME, (byte)0, GameCategory.EXTRA, 18),
Halloween("Halloween Horror", Material.PUMPKIN, (byte)0, GameCategory.CLASSICS, 19),
Halloween2016("Pumpkin's Revenge", Material.PUMPKIN, (byte)0, GameCategory.CLASSICS, 63),
HideSeek("Block Hunt", Material.GRASS, (byte)0, GameCategory.CLASSICS, 20),
HoleInTheWall("Hole in the Wall", Material.STAINED_GLASS, (byte) 2, GameCategory.ARCADE, 52),
Horse("Horseback", Material.IRON_BARDING, (byte)0, GameCategory.ARCADE, 21),
BaconBrawl("Bacon Brawl", Material.PORK, (byte)0, GameCategory.ARCADE, 1, true),
Barbarians("A Barbarians Life", Material.WOOD_AXE, (byte)0, GameCategory.EXTRA, 2, false),
BossBattles("Boss Battles", Material.SKULL_ITEM, (byte) 0, GameCategory.EVENT, 55, false),
Bridge("The Bridges", Material.IRON_PICKAXE, (byte)0, GameCategory.SURVIVAL, 3, true),
CastleSiege("Castle Siege", Material.DIAMOND_CHESTPLATE, (byte)0, GameCategory.CLASSICS, 4, true),
ChampionsDominate("Champions Domination", "Champions", Material.BEACON, (byte)0, GameCategory.CHAMPIONS, 6, true),
ChampionsTDM("Champions TDM", "Champions", Material.GOLD_SWORD, (byte)0, GameCategory.CHAMPIONS, 5, true),
Christmas("Christmas Chaos", Material.SNOW_BALL, (byte)0, GameCategory.CLASSICS, 8, false),
DeathTag("Death Tag", Material.SKULL_ITEM, (byte)0, GameCategory.ARCADE, 9, true),
DragonEscape("Dragon Escape", Material.DRAGON_EGG, (byte)0, GameCategory.ARCADE, 10, true),
DragonEscapeTeams("Dragon Escape Teams", Material.DRAGON_EGG, (byte)0, GameCategory.TEAM_VARIANT, 11, false),
DragonRiders("Dragon Riders", Material.DRAGON_EGG, (byte)0, GameCategory.ARCADE, 12, false),
Dragons("Dragons", Material.ENDER_STONE, (byte)0, GameCategory.ARCADE, 13, true),
DragonsTeams("Dragons Teams", Material.DRAGON_EGG, (byte)0, GameCategory.TEAM_VARIANT, 14, false),
Draw("Draw My Thing", Material.BOOK_AND_QUILL, (byte)0, GameCategory.CLASSICS, 15, true),
ElytraRings("Elytra Rings", Material.ELYTRA, (byte) 0, GameCategory.CLASSICS, 61, false),
Evolution("Evolution", Material.EMERALD, (byte)0, GameCategory.ARCADE, 16, true),
Gravity("Gravity", Material.ENDER_PORTAL_FRAME, (byte)0, GameCategory.EXTRA, 18, false),
Halloween("Halloween Horror", Material.PUMPKIN, (byte)0, GameCategory.CLASSICS, 19, false),
Halloween2016("Pumpkin's Revenge", Material.PUMPKIN, (byte)0, GameCategory.CLASSICS, 63, false),
HideSeek("Block Hunt", Material.GRASS, (byte)0, GameCategory.CLASSICS, 20, true),
HoleInTheWall("Hole in the Wall", Material.STAINED_GLASS, (byte) 2, GameCategory.ARCADE, 52, false),
Horse("Horseback", Material.IRON_BARDING, (byte)0, GameCategory.ARCADE, 21, false),
Micro("Micro Battle", Material.LAVA_BUCKET, (byte)0, GameCategory.ARCADE, 24),
MilkCow("Milk the Cow", Material.MILK_BUCKET, (byte)0, GameCategory.ARCADE, 27),
MineStrike("MineStrike", Material.TNT, (byte)0, GameCategory.CHAMPIONS, 25),// Temp set to CHAMPIONS to fix UI bug
BawkBawkBattles("Bawk Bawk Battles", Material.EGG, (byte)0, GameCategory.CLASSICS, 26),
OldMineWare("Old MineWare", Material.PAPER, (byte)0, GameCategory.EXTRA, 26),
Paintball("Super Paintball", Material.ENDER_PEARL, (byte)0, GameCategory.ARCADE, 28),
Quiver("One in the Quiver", Material.ARROW, (byte)0, GameCategory.ARCADE, 29),
QuiverTeams("One in the Quiver Teams", Material.ARROW, (byte)0, GameCategory.TEAM_VARIANT, 30),
Runner("Runner", Material.LEATHER_BOOTS, (byte)0, GameCategory.ARCADE, 31),
SearchAndDestroy("Search and Destroy", Material.TNT, (byte)0, GameCategory.SURVIVAL, 32),
Sheep("Sheep Quest", Material.WOOL, (byte)4, GameCategory.ARCADE, 33),
Micro("Micro Battle", Material.LAVA_BUCKET, (byte)0, GameCategory.ARCADE, 24, true),
MilkCow("Milk the Cow", Material.MILK_BUCKET, (byte)0, GameCategory.ARCADE, 27, false),
MineStrike("MineStrike", Material.TNT, (byte)0, GameCategory.CHAMPIONS, 25, true),// Temp set to CHAMPIONS to fix UI bug
BawkBawkBattles("Bawk Bawk Battles", Material.EGG, (byte)0, GameCategory.CLASSICS, 26, true),
OldMineWare("Old MineWare", Material.PAPER, (byte)0, GameCategory.EXTRA, 26, false),
Paintball("Super Paintball", Material.ENDER_PEARL, (byte)0, GameCategory.ARCADE, 28, true),
Quiver("One in the Quiver", Material.ARROW, (byte)0, GameCategory.ARCADE, 29, true),
QuiverTeams("One in the Quiver Teams", Material.ARROW, (byte)0, GameCategory.TEAM_VARIANT, 30, false),
Runner("Runner", Material.LEATHER_BOOTS, (byte)0, GameCategory.ARCADE, 31, true),
SearchAndDestroy("Search and Destroy", Material.TNT, (byte)0, GameCategory.SURVIVAL, 32, false),
Sheep("Sheep Quest", Material.WOOL, (byte)4, GameCategory.ARCADE, 33, true),
Smash("Super Smash Mobs", Material.SKULL_ITEM, (byte)4, GameCategory.CLASSICS, 34),
SmashDomination("Super Smash Mobs Domination", "Super Smash Mobs", Material.SKULL_ITEM, (byte)4, GameCategory.EXTRA, 36),
SmashTeams("Super Smash Mobs Teams", "Super Smash Mobs", Material.SKULL_ITEM, (byte)4, GameCategory.TEAM_VARIANT, 35),
Snake("Snake", Material.WOOL, (byte)0, GameCategory.ARCADE, 37),
SneakyAssassins("Sneaky Assassins", Material.INK_SACK, (byte)0, GameCategory.ARCADE, 38),
SnowFight("Snow Fight", Material.SNOW_BALL, (byte)0, GameCategory.EXTRA, 39),
Spleef("Super Spleef", Material.IRON_SPADE, (byte)0, GameCategory.ARCADE, 40),
SpleefTeams("Super Spleef Teams", Material.IRON_SPADE, (byte)0, GameCategory.TEAM_VARIANT, 41),
SquidShooter("Squid Shooter", Material.FIREWORK_CHARGE, (byte)0, GameCategory.ARCADE, 43),
Stacker("Super Stacker", Material.BOWL, (byte)0, GameCategory.ARCADE, 42),
SurvivalGames("Survival Games", Material.IRON_SWORD, (byte)0, GameCategory.SURVIVAL, 22),
SurvivalGamesTeams("Survival Games Teams", "Survival Games", Material.IRON_SWORD, (byte)0, GameCategory.TEAM_VARIANT, 23),
Tug("Tug of Wool", Material.WHEAT, (byte)0, GameCategory.ARCADE, 44),
TurfWars("Turf Wars", Material.STAINED_CLAY, (byte)14, GameCategory.ARCADE, 45),
UHC("Ultra Hardcore", Material.GOLDEN_APPLE, (byte)0, GameCategory.TEAM_VARIANT, 46),
UHCSolo("Ultra Hardcore Solo", "Ultra Hardcore", Material.GOLDEN_APPLE, (byte)0, GameCategory.SURVIVAL, 46),
UHCSoloSpeed("Ultra Hardcore Solo Speed", "Ultra Hardcore", Material.GOLDEN_APPLE, (byte)0, GameCategory.SURVIVAL, 67),
UHCTeamsSpeed("Ultra Hardcore Teams Speed", "Ultra Hardcore", Material.GOLDEN_APPLE, (byte)0, GameCategory.TEAM_VARIANT, 67),
WitherAssault("Wither Assault", Material.SKULL_ITEM, (byte)1, GameCategory.ARCADE, 47),
Wizards("Wizards", Material.BLAZE_ROD, (byte)0, GameCategory.SURVIVAL, 48),
ZombieSurvival("Zombie Survival", Material.SKULL_ITEM, (byte)2, GameCategory.SURVIVAL, 49),
Smash("Super Smash Mobs", Material.SKULL_ITEM, (byte)4, GameCategory.CLASSICS, 34, true),
SmashDomination("Super Smash Mobs Domination", "Super Smash Mobs", Material.SKULL_ITEM, (byte)4, GameCategory.EXTRA, 36, false),
SmashTeams("Super Smash Mobs Teams", "Super Smash Mobs", Material.SKULL_ITEM, (byte)4, GameCategory.TEAM_VARIANT, 35, false),
Snake("Snake", Material.WOOL, (byte)0, GameCategory.ARCADE, 37, true),
SneakyAssassins("Sneaky Assassins", Material.INK_SACK, (byte)0, GameCategory.ARCADE, 38, true),
SnowFight("Snow Fight", Material.SNOW_BALL, (byte)0, GameCategory.EXTRA, 39, false),
Spleef("Super Spleef", Material.IRON_SPADE, (byte)0, GameCategory.ARCADE, 40, true),
SpleefTeams("Super Spleef Teams", Material.IRON_SPADE, (byte)0, GameCategory.TEAM_VARIANT, 41, false),
SquidShooter("Squid Shooter", Material.FIREWORK_CHARGE, (byte)0, GameCategory.ARCADE, 43, false),
Stacker("Super Stacker", Material.BOWL, (byte)0, GameCategory.ARCADE, 42, false),
SurvivalGames("Survival Games", Material.IRON_SWORD, (byte)0, GameCategory.SURVIVAL, 22, true),
SurvivalGamesTeams("Survival Games Teams", "Survival Games", Material.IRON_SWORD, (byte)0, GameCategory.TEAM_VARIANT, 23, false),
Tug("Tug of Wool", Material.WHEAT, (byte)0, GameCategory.ARCADE, 44, false),
TurfWars("Turf Wars", Material.STAINED_CLAY, (byte)14, GameCategory.ARCADE, 45, true),
UHC("Ultra Hardcore", Material.GOLDEN_APPLE, (byte)0, GameCategory.TEAM_VARIANT, 46, true),
UHCSolo("Ultra Hardcore Solo", "Ultra Hardcore", Material.GOLDEN_APPLE, (byte)0, GameCategory.SURVIVAL, 46, false),
UHCSoloSpeed("Ultra Hardcore Solo Speed", "Ultra Hardcore", Material.GOLDEN_APPLE, (byte)0, GameCategory.SURVIVAL, 67, false),
UHCTeamsSpeed("Ultra Hardcore Teams Speed", "Ultra Hardcore", Material.GOLDEN_APPLE, (byte)0, GameCategory.TEAM_VARIANT, 67, false),
WitherAssault("Wither Assault", Material.SKULL_ITEM, (byte)1, GameCategory.ARCADE, 47, true),
Wizards("Wizards", Material.BLAZE_ROD, (byte)0, GameCategory.SURVIVAL, 48, true),
ZombieSurvival("Zombie Survival", Material.SKULL_ITEM, (byte)2, GameCategory.SURVIVAL, 49, false),
Build("Master Builders", Material.WOOD, (byte)0, GameCategory.CLASSICS, 50),
BuildMavericks("Mavericks Master Builders", Material.WOOD, (byte)3, GameCategory.CLASSICS, 63),
Cards("Craft Against Humanity", Material.MAP, (byte)0, GameCategory.CLASSICS, 51),
Skywars("Skywars", Material.FEATHER, (byte) 0, GameCategory.SURVIVAL, 52),
SkywarsTeams("Skywars Teams", "Skywars", Material.FEATHER, (byte)0, GameCategory.TEAM_VARIANT, 53),
MonsterMaze("Monster Maze", Material.ROTTEN_FLESH, (byte)0, GameCategory.ARCADE, 55),
MonsterLeague("Monster League", Material.MINECART, (byte)0, GameCategory.ARCADE, 56),
Build("Master Builders", Material.WOOD, (byte)0, GameCategory.CLASSICS, 50, true),
BuildMavericks("Mavericks Master Builders", Material.WOOD, (byte)3, GameCategory.CLASSICS, 63, false),
Cards("Craft Against Humanity", Material.MAP, (byte)0, GameCategory.CLASSICS, 51, false),
Skywars("Skywars", Material.FEATHER, (byte) 0, GameCategory.SURVIVAL, 52, true),
SkywarsTeams("Skywars Teams", "Skywars", Material.FEATHER, (byte)0, GameCategory.TEAM_VARIANT, 53, false),
MonsterMaze("Monster Maze", Material.ROTTEN_FLESH, (byte)0, GameCategory.ARCADE, 55, true),
MonsterLeague("Monster League", Material.MINECART, (byte)0, GameCategory.ARCADE, 56, false),
Lobbers("Bomb Lobbers", Material.FIREBALL, (byte) 0, GameCategory.ARCADE, 54),
Lobbers("Bomb Lobbers", Material.FIREBALL, (byte) 0, GameCategory.ARCADE, 54, true),
Minecraft_League("MC League", Material.DIAMOND_SWORD, (byte)0, GameCategory.SURVIVAL, 62),
Minecraft_League("MC League", Material.DIAMOND_SWORD, (byte)0, GameCategory.SURVIVAL, 62, false),
ChampionsCTF("Champions CTF", "Champions", Material.BANNER, DyeColor.RED.getDyeData(), GameCategory.CHAMPIONS, 56),
ChampionsCTF("Champions CTF", "Champions", Material.BANNER, DyeColor.RED.getDyeData(), GameCategory.CHAMPIONS, 56, true),
BouncyBalls("Bouncy Balls", Material.SLIME_BALL, (byte)0, GameCategory.ARCADE, 57),
Gladiators("Gladiators", Material.IRON_SWORD, (byte)0, GameCategory.ARCADE, 58),
TypeWars("Type Wars", Material.NAME_TAG, (byte) 0, GameCategory.CLASSICS, 59),
BouncyBalls("Bouncy Balls", Material.SLIME_BALL, (byte)0, GameCategory.ARCADE, 57, false),
Gladiators("Gladiators", Material.IRON_SWORD, (byte)0, GameCategory.ARCADE, 58, true),
TypeWars("Type Wars", Material.NAME_TAG, (byte) 0, GameCategory.CLASSICS, 59, false),
SpeedBuilders("Speed Builders", Material.QUARTZ_BLOCK, (byte) 0, GameCategory.CLASSICS, 60),
SpeedBuilders("Speed Builders", Material.QUARTZ_BLOCK, (byte) 0, GameCategory.CLASSICS, 60, true),
Valentines("Valentines Vendetta", Material.LEATHER, (byte)0, GameCategory.EXTRA, 61),
Valentines("Valentines Vendetta", Material.LEATHER, (byte)0, GameCategory.EXTRA, 61, false),
Skyfall("Skyfall", Material.DIAMOND_BOOTS, (byte)0, GameCategory.SURVIVAL, 62),
SkyfallTeams("Skyfall Teams", Material.DIAMOND_BOOTS, (byte)0, GameCategory.SURVIVAL, 65),
Skyfall("Skyfall", Material.DIAMOND_BOOTS, (byte)0, GameCategory.SURVIVAL, 62, true),
SkyfallTeams("Skyfall Teams", Material.DIAMOND_BOOTS, (byte)0, GameCategory.SURVIVAL, 65, false),
Basketball("Hoops", Material.SLIME_BALL, (byte)0, GameCategory.EXTRA, 63),
Basketball("Hoops", Material.SLIME_BALL, (byte)0, GameCategory.EXTRA, 63, false),
QuiverPayload("One in the Quiver Payload", Material.ARROW, (byte)0, GameCategory.ARCADE, 64),
QuiverPayload("One in the Quiver Payload", Material.ARROW, (byte)0, GameCategory.ARCADE, 64, false),
Event("Mineplex Event", Material.CAKE, (byte)0, GameCategory.EVENT, 999),
Event("Mineplex Event", Material.CAKE, (byte)0, GameCategory.EVENT, 999, false),
Brawl("Brawl", Material.DIAMOND, (byte) 0, GameCategory.EVENT, 998);
Brawl("Brawl", Material.DIAMOND, (byte) 0, GameCategory.EVENT, 998, false);
String _name;
String _lobbyName;
@ -110,12 +110,15 @@ public enum GameDisplay
private int _gameId; // Unique identifying id for this gamemode (used for statistics)
public int getGameId() { return _gameId; }
GameDisplay(String name, Material mat, byte data, GameCategory gameCategory, int gameId)
private boolean _communityFavorite;
public boolean isCommunityFavoriteOption() { return _communityFavorite; }
GameDisplay(String name, Material mat, byte data, GameCategory gameCategory, int gameId, boolean communityFavorite)
{
this(name, name, mat, data, gameCategory, gameId);
this(name, name, mat, data, gameCategory, gameId, communityFavorite);
}
GameDisplay(String name, String lobbyName, Material mat, byte data, GameCategory gameCategory, int gameId)
GameDisplay(String name, String lobbyName, Material mat, byte data, GameCategory gameCategory, int gameId, boolean communityFavorite)
{
_name = name;
_lobbyName = lobbyName;