diff --git a/Plugins/Mineplex.Bungee.Mineplexer/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.Bungee.Mineplexer/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 7341ab168..000000000 --- a/Plugins/Mineplex.Bungee.Mineplexer/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.7 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.7 diff --git a/Plugins/Mineplex.BungeeRotator/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.BungeeRotator/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 7341ab168..000000000 --- a/Plugins/Mineplex.BungeeRotator/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.7 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.7 diff --git a/Plugins/Mineplex.Core.Common/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.Core.Common/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 7341ab168..000000000 --- a/Plugins/Mineplex.Core.Common/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.7 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.7 diff --git a/Plugins/Mineplex.Core/src/mineplex/core/itemstack/ItemBuilder.java b/Plugins/Mineplex.Core/src/mineplex/core/itemstack/ItemBuilder.java index c1d486795..8ea88cc70 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/itemstack/ItemBuilder.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/itemstack/ItemBuilder.java @@ -2,7 +2,9 @@ package mineplex.core.itemstack; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collection; import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Map; @@ -12,6 +14,7 @@ import org.bukkit.Color; import org.bukkit.FireworkEffect; import org.bukkit.Material; import org.bukkit.enchantments.Enchantment; +import org.bukkit.inventory.ItemFlag; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.FireworkEffectMeta; import org.bukkit.inventory.meta.ItemMeta; @@ -19,6 +22,8 @@ import org.bukkit.inventory.meta.LeatherArmorMeta; import org.bukkit.inventory.meta.SkullMeta; import org.bukkit.potion.Potion; +import mineplex.core.common.util.C; + public class ItemBuilder { @@ -48,20 +53,17 @@ public class ItemBuilder private final HashMap _enchants = new HashMap(); private final List _lore = new ArrayList(); private Material _mat; - // private Potion potion; private String _title = null; private boolean _unbreakable; private String _playerHeadName = null; + private HashSet _itemFlags = new HashSet(); public ItemBuilder(ItemStack item) { this(item.getType(), item.getDurability()); _amount = item.getAmount(); _enchants.putAll(item.getEnchantments()); - if (item.getType() == Material.POTION) - { - // setPotion(Potion.fromItemStack(item)); - } + if (item.hasItemMeta()) { ItemMeta meta = item.getItemMeta(); @@ -81,6 +83,8 @@ public class ItemBuilder setColor(((LeatherArmorMeta) meta).getColor()); } + _itemFlags.addAll(meta.getItemFlags()); + _unbreakable = meta.spigot().isUnbreakable(); } } @@ -107,13 +111,60 @@ public class ItemBuilder this(mat, 1, data); } + public HashSet getItemFlags() + { + return _itemFlags; + } + + public ItemBuilder addItemFlags(ItemFlag... flags) + { + getItemFlags().addAll(Arrays.asList(flags)); + + return this; + } + + public ItemBuilder setItemFlags(ItemFlag... flags) + { + getItemFlags().clear(); + addItemFlags(flags); + + return this; + } + + public ItemBuilder setItemFlags(Collection flags) + { + getItemFlags().clear(); + addItemFlags(flags.toArray(new ItemFlag[0])); + + return this; + } + + public ItemBuilder setHideInfo(boolean hideInfo) + { + if (hideInfo) + { + for (ItemFlag flag : ItemFlag.values()) + { + getItemFlags().add(flag); + } + } + else + { + getItemFlags().clear(); + } + + return this; + } + public ItemBuilder addEnchantment(Enchantment enchant, int level) { if (_enchants.containsKey(enchant)) { _enchants.remove(enchant); } + _enchants.put(enchant, level); + return this; } @@ -121,20 +172,31 @@ public class ItemBuilder { for (String lore : lores) { - _lore.add(ChatColor.GRAY + lore); + _lore.add(C.cGray + lore); } + + return this; + } + + public ItemBuilder setLore(String... lores) + { + _lore.clear(); + _lore.addAll(Arrays.asList(lores)); + return this; } public ItemBuilder addLore(String lore, int maxLength) { _lore.addAll(split(lore, maxLength)); + return this; } public ItemBuilder addLores(List lores) { _lore.addAll(lores); + return this; } @@ -144,6 +206,7 @@ public class ItemBuilder { addLore(lore, maxLength); } + return this; } @@ -155,6 +218,7 @@ public class ItemBuilder public ItemStack build() { Material mat = _mat; + if (mat == null) { mat = Material.AIR; @@ -164,8 +228,10 @@ public class ItemBuilder { Bukkit.getLogger().warning("Air material!"); } + ItemStack item = new ItemStack(mat, _amount, _data); ItemMeta meta = item.getItemMeta(); + if (meta != null) { if (_title != null) @@ -189,14 +255,13 @@ public class ItemBuilder ((FireworkEffectMeta) meta).setEffect(FireworkEffect.builder().withColor(_color).build()); } + meta.addItemFlags(getItemFlags().toArray(new ItemFlag[0])); meta.spigot().setUnbreakable(isUnbreakable()); item.setItemMeta(meta); } item.addUnsafeEnchantments(_enchants); - // if (potion != null) { - // potion.apply(item); - // } + return item; } @@ -263,52 +328,6 @@ public class ItemBuilder return _enchants.containsKey(enchant); } - public boolean isItem(ItemStack item) - { - ItemMeta meta = item.getItemMeta(); - - if (item.getType() != getType()) - { - return false; - } - - if (!meta.hasDisplayName() && getTitle() != null) - { - return false; - } - - if (!meta.getDisplayName().equals(getTitle())) - { - return false; - } - - if (!meta.hasLore() && !getLore().isEmpty()) - { - return false; - } - - if (meta.hasLore()) - { - for (String lore : meta.getLore()) - { - if (!getLore().contains(lore)) - { - return false; - } - } - } - - for (Enchantment enchant : item.getEnchantments().keySet()) - { - if (!hasEnchantment(enchant)) - { - return false; - } - } - - return true; - } - public boolean isUnbreakable() { return _unbreakable; @@ -317,17 +336,14 @@ public class ItemBuilder public ItemBuilder setAmount(int amount) { _amount = amount; + return this; } public ItemBuilder setColor(Color color) { - /* (!_mat.name().contains("LEATHER_")) - { - throw new IllegalArgumentException("Can only dye leather armor!"); - }*/ - _color = color; + return this; } @@ -338,19 +354,10 @@ public class ItemBuilder return this; } - public ItemBuilder setPotion(Potion potion) - { - if (_mat != Material.POTION) - { - _mat = Material.POTION; - } - - return this; - } - public ItemBuilder setRawTitle(String title) { _title = title; + return this; } @@ -378,24 +385,28 @@ public class ItemBuilder } setTitle(title); + return this; } public ItemBuilder setType(Material mat) { _mat = mat; + return this; } public ItemBuilder setUnbreakable(boolean setUnbreakable) { _unbreakable = setUnbreakable; + return this; } public ItemBuilder setPlayerHead(String playerName) { _playerHeadName = playerName; + return this; } diff --git a/Plugins/Mineplex.DDoSProtectionSwitcher/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.DDoSProtectionSwitcher/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 7341ab168..000000000 --- a/Plugins/Mineplex.DDoSProtectionSwitcher/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.7 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.7 diff --git a/Plugins/Mineplex.EnjinTranslator/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.EnjinTranslator/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 7341ab168..000000000 --- a/Plugins/Mineplex.EnjinTranslator/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.7 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.7 diff --git a/Plugins/Mineplex.Game.Clans/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.Game.Clans/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 7341ab168..000000000 --- a/Plugins/Mineplex.Game.Clans/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.7 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.7 diff --git a/Plugins/Mineplex.Hub/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.Hub/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 7341ab168..000000000 --- a/Plugins/Mineplex.Hub/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.7 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.7 diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/profile/buttons/ButtonPrefs.java b/Plugins/Mineplex.Hub/src/mineplex/hub/profile/buttons/ButtonPrefs.java index 38652a7c7..1b9c38395 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/profile/buttons/ButtonPrefs.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/profile/buttons/ButtonPrefs.java @@ -2,6 +2,7 @@ package mineplex.hub.profile.buttons; import mineplex.core.common.util.C; import mineplex.core.gui.GuiItem; +import mineplex.core.itemstack.ItemBuilder; import mineplex.core.itemstack.ItemStackFactory; import mineplex.hub.profile.gui.GUIProfile; @@ -17,7 +18,7 @@ public class ButtonPrefs implements GuiItem private GUIProfile _profile; private Player _player; - + public ButtonPrefs(GUIProfile profile, Player player) { _profile = profile; @@ -33,29 +34,27 @@ public class ButtonPrefs implements GuiItem @Override public ItemStack getObject() { - return ItemStackFactory.Instance.CreateStack(Material.REDSTONE_COMPARATOR.getId(), (byte)0, 1, - ChatColor.RESET + C.cYellow + "Preferences", - new String[] - { - "", - C.cWhite + "Set your preferences to your liking", - C.cWhite + "so you can enjoy the game more!", - - "", - C.cWhite + "Type " + C.cGreen + "/prefs" + C.cWhite + " to access this anywhere!" - }); + return new ItemBuilder(Material.REDSTONE_COMPARATOR).setTitle(C.Reset + C.cYellow + "Preferences").addLore(new String[] + { + "", + C.cWhite + "Set your preferences to your liking", + C.cWhite + "so you can enjoy the game more!", + + "", + C.cWhite + "Type " + C.cGreen + "/prefs" + C.cWhite + " to access this anywhere!" + }).build(); } @Override - public void setup() + public void setup() { - + } @Override public void close() { - + } } diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerManager.java index 83962381a..10f889fce 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerManager.java @@ -862,7 +862,7 @@ public class ServerManager extends MiniPlugin public ShopBase getMinestrikeShop() { - return _serverNpcShopMap.get("MineStrike"); + return _serverNpcShopMap.get("Mine-Strike"); } public ShopBase getWizardShop() diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerGameMenu.java b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerGameMenu.java index f33ab68fe..cd1a4d1fd 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerGameMenu.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerGameMenu.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import java.util.List; import org.bukkit.ChatColor; +//Mysticate@184.154.0.242:7990/scm/min/mineplex.git import org.bukkit.Material; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; @@ -11,6 +12,7 @@ import org.bukkit.inventory.ItemStack; import mineplex.core.account.CoreClientManager; import mineplex.core.common.util.C; import mineplex.core.donation.DonationManager; +import mineplex.core.itemstack.ItemBuilder; import mineplex.core.itemstack.ItemStackFactory; import mineplex.core.shop.page.ShopPageBase; import mineplex.hub.server.ServerManager; @@ -34,17 +36,18 @@ public class ServerGameMenu extends ShopPageBase { private List _superSmashCycle = new ArrayList(); private List _minigameCycle = new ArrayList(); - + private int _ssmIndex; private int _minigameIndex; - - public ServerGameMenu(ServerManager plugin, QuickShop quickShop, CoreClientManager clientManager, DonationManager donationManager, String name, Player player) + + public ServerGameMenu(ServerManager plugin, QuickShop quickShop, CoreClientManager clientManager, + DonationManager donationManager, String name, Player player) { super(plugin, quickShop, clientManager, donationManager, name, player, 47); - + createSuperSmashCycle(); createMinigameCycle(); - + buildPage(); } @@ -52,82 +55,93 @@ public class ServerGameMenu extends ShopPageBase @Override protected void buildPage() { - setItem(0, ItemStackFactory.Instance.CreateStack(Material.IRON_PICKAXE.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "The Bridges " + C.cGray + "4 Team Survival", new String[] - { - ChatColor.RESET + "", - ChatColor.RESET + "4 Teams get 10 minutes to prepare.", - ChatColor.RESET + "Then the bridges drop, and all hell", - ChatColor.RESET + "breaks loose as you battle to the", - ChatColor.RESET + "death with the other teams.", - ChatColor.RESET + "", - ChatColor.RESET + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("BR") + ChatColor.RESET + " other players!", - })); - - setItem(2, ItemStackFactory.Instance.CreateStack(Material.DIAMOND_SWORD.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Survival Games " + C.cGray + "Solo/Team Survival", new String[] - { - ChatColor.RESET + "", - ChatColor.RESET + "Search for chests to find loot and ", - ChatColor.RESET + "fight others to be the last man standing. ", - ChatColor.RESET + "Stay away from the borders!", - ChatColor.RESET + "", - ChatColor.RESET + "Join " + ChatColor.GREEN + (getPlugin().getGroupTagPlayerCount("HG") + getPlugin().getGroupTagPlayerCount("SG2")) + ChatColor.RESET + " other players!", - })); + setItem(0, new ItemBuilder(Material.IRON_PICKAXE) + .setTitle(C.Reset + C.Bold + C.cYellow + "The Bridges " + C.cGray + "4 Team Survival").addLore(new String[] + { + C.Reset + "", + C.Reset + "4 Teams get 10 minutes to prepare.", + C.Reset + "Then the bridges drop, and all hell", + C.Reset + "breaks loose as you battle to the", + C.Reset + "death with the other teams.", + C.Reset + "", + C.Reset + "Join " + C.cGreen + getPlugin().getGroupTagPlayerCount("BR") + C.Reset + " other players!" + }).setHideInfo(true).build()); - setItem(4, ItemStackFactory.Instance.CreateStack(Material.FEATHER.getId(), (byte) 0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Skywars " + C.cGray + "Solo/Team Survival", new String[] - { - ChatColor.RESET + "", - ChatColor.RESET + "16 contenders fight for the right to rule the skies!", - ChatColor.RESET + "Spawn on a sky island and build your path!", - ChatColor.RESET + "Find weapons to take your enemies down!", - ChatColor.RESET + "Way up there, death ever looming if you fall..", - ChatColor.RESET + "Can you fight? Can you live? Can you win Skywars?", - ChatColor.RESET + "", - ChatColor.RESET + "Join " + ChatColor.GREEN + (getPlugin().getGroupTagPlayerCount("SKY") + getPlugin().getGroupTagPlayerCount("SKY2")) + ChatColor.RESET + " other players!", - })); + setItem(2, new ItemBuilder(Material.DIAMOND_SWORD) + .setTitle(C.Reset + C.Bold + C.cYellow + "Survival Games " + C.cGray + "Solo/Team Survival").addLore(new String[] + { + C.Reset + "", + C.Reset + "Search for chests to find loot and ", + C.Reset + "fight others to be the last man standing. ", + C.Reset + "Stay away from the borders!", + C.Reset + "", + C.Reset + "Join " + C.cGreen + + (getPlugin().getGroupTagPlayerCount("HG") + getPlugin().getGroupTagPlayerCount("SG2")) + C.Reset + + " other players!" + }).setHideInfo(true).build()); - setItem(6, ItemStackFactory.Instance.CreateStack(Material.GOLDEN_APPLE.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "UHC " + C.cGray + "Ultra Hardcore Mode", new String[] - { - ChatColor.RESET + "", - ChatColor.RESET + "Extremely hard team-based survival ", - ChatColor.RESET + "Gather materials and fight your way", - ChatColor.RESET + "to become the last team standing!", - ChatColor.RESET + "", - ChatColor.RESET + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("UHC") + ChatColor.RESET + " other players!", - })); + setItem(4, new ItemBuilder(Material.FEATHER) + .setTitle(C.Reset + C.Bold + C.cYellow + "Skywars " + C.cGray + "Solo/Team Survival").addLore(new String[] + { + C.Reset + "", + C.Reset + "16 contenders fight to rule the skies!", + C.Reset + "Spawn on a sky island and build your path!", + C.Reset + "Find weapons to take your enemies down!", + C.Reset + "Up in the skies, death looming if you fall..", + C.Reset + "Win! Fight! Send enemies flying in Skywars!", + C.Reset + "", + C.Reset + "Join " + C.cGreen + + (getPlugin().getGroupTagPlayerCount("SKY") + getPlugin().getGroupTagPlayerCount("SKY2")) + C.Reset + + " other players!", + }).setHideInfo(true).build()); - setItem(8, ItemStackFactory.Instance.CreateStack(Material.BLAZE_ROD.getId(), (byte) 0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Wizards " + C.cGray + "Last Man Standing", new String[] - { - ChatColor.RESET + "", - ChatColor.RESET + "Wield powerful spells to fight", - ChatColor.RESET + "against other players in this", - ChatColor.RESET + "exciting free-for-all brawl!", - ChatColor.RESET + "", - ChatColor.RESET + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("WIZ") + ChatColor.RESET + " other players!", - })); + setItem(6, new ItemBuilder(Material.GOLDEN_APPLE) + .setTitle(C.Reset + C.Bold + C.cYellow + "UHC " + C.cGray + "Ultra Hardcore Mode").addLore(new String[] + { + C.Reset + "", + C.Reset + "Extremely hard team-based survival ", + C.Reset + "Gather materials and fight your way", + C.Reset + "to become the last team standing!", + C.Reset + "", + C.Reset + "Join " + C.cGreen + getPlugin().getGroupTagPlayerCount("UHC") + C.Reset + " other players!", + }).setHideInfo(true).build()); - setItem(18, ItemStackFactory.Instance.CreateStack(Material.DIAMOND_CHESTPLATE, (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Castle Siege " + C.cGray + "Team Game", new String[] - { - ChatColor.RESET + "", - ChatColor.RESET + "Defenders must protect King Sparklez", - ChatColor.RESET + "from the endless waves of Undead", - ChatColor.RESET + "until the sun rises!", - ChatColor.RESET + "", - ChatColor.RESET + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("CS") + ChatColor.RESET + " other players!", - })); + setItem(8, new ItemBuilder(Material.BLAZE_ROD) + .setTitle(C.Reset + C.Bold + C.cYellow + "Wizards " + C.cGray + "Last Man Standing").addLore(new String[] + { + C.Reset + "", + C.Reset + "Wield powerful spells to fight", + C.Reset + "against other players in this", + C.Reset + "exciting free-for-all brawl!", + C.Reset + "", + C.Reset + "Join " + C.cGreen + getPlugin().getGroupTagPlayerCount("WIZ") + C.Reset + " other players!", + }).setHideInfo(true).build()); - setItem(20, ItemStackFactory.Instance.CreateStack(Material.GRASS.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Block Hunt " + C.cGray + "Cat and Mouse", new String[] - { - ChatColor.RESET + "", - ChatColor.RESET + "Hide as blocks/animals, upgrade your ", - ChatColor.RESET + "weapon and fight to survive against", - ChatColor.RESET + "the Hunters!", - ChatColor.RESET + "", - ChatColor.RESET + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("BH") + ChatColor.RESET + " other players!", - })); + setItem(18, new ItemBuilder(Material.DIAMOND_CHESTPLATE) + .setTitle(C.Reset + C.Bold + C.cYellow + "Castle Siege " + C.cGray + "Team Game").addLore(new String[] + { + C.Reset + "", + C.Reset + "Defenders must protect King Sparklez", + C.Reset + "from the endless waves of Undead", + C.Reset + "until the sun rises!", + C.Reset + "", + C.Reset + "Join " + C.cGreen + getPlugin().getGroupTagPlayerCount("CS") + C.Reset + " other players!", + }).setHideInfo(true).build()); + + setItem(20, new ItemBuilder(Material.GRASS) + .setTitle(C.Reset + C.Bold + C.cYellow + "Block Hunt " + C.cGray + "Cat and Mouse").addLore(new String[] + { + C.Reset + "", + C.Reset + "Hide as blocks/animals, upgrade your ", + C.Reset + "weapon and fight to survive against", + C.Reset + "the Hunters!", + C.Reset + "", + C.Reset + "Join " + C.cGreen + getPlugin().getGroupTagPlayerCount("BH") + C.Reset + " other players!", + }).setHideInfo(true).build()); setItem(22, _superSmashCycle.get(_ssmIndex)); - setItem(24, ItemStackFactory.Instance.CreateStack(Material.TNT.getId(), (byte) 0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "MineStrike" + C.cGray + "Team Survival", new String[] + setItem(24, ItemStackFactory.Instance.CreateStack(Material.TNT.getId(), (byte) 0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Mine-Strike" + C.cGray + "Team Survival", new String[] { ChatColor.RESET + "", ChatColor.RESET + "One team must defend two bomb sites from", @@ -177,23 +191,79 @@ public class ServerGameMenu extends ShopPageBase ChatColor.RESET + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("BLD") + ChatColor.RESET + " other players!", })); + setItem(24, new ItemBuilder(Material.TNT) + .setTitle(C.Reset + C.Bold + C.cYellow + "Mine-Strike " + C.cGray + "Team Survival").addLore(new String[] + { + C.Reset + "", + C.Reset + "One team must defend two bomb sites from", + C.Reset + "the other team, who are trying to plant a bomb", + C.Reset + "and blow them up!", + C.Reset + "", + C.Reset + "Join " + C.cGreen + getPlugin().getGroupTagPlayerCount("MS") + C.Reset + " other players!", + }).setHideInfo(true).build()); + + setItem(26, new ItemBuilder(Material.BOOK_AND_QUILL) + .setTitle(C.Reset + C.Bold + C.cYellow + "Draw My Thing " + C.cGray + "Pictionary!").addLore(new String[] + { + C.Reset + "", + C.Reset + "Players take turns at drawing a random", + C.Reset + "word. Whoever guesses it within the time", + C.Reset + "limit gets some points!", + C.Reset + "", + C.Reset + "Join " + C.cGreen + getPlugin().getGroupTagPlayerCount("DMT") + C.Reset + " other players!", + }).setHideInfo(true).build()); + + setItem(36, new ItemBuilder(Material.BEACON).setTitle(C.Reset + C.Bold + C.cYellow + "Dominate " + C.cGray + "Team Game") + .addLore(new String[] + { + C.Reset + "", + C.Reset + "Customize one of five exciting champions", + C.Reset + "and battle with the opposing team for the", + C.Reset + "control points on the map.", + C.Reset + "", + C.Reset + "Join " + C.cGreen + getPlugin().getGroupTagPlayerCount("DOM") + C.Reset + " other players!", + }).setHideInfo(true).build()); + + setItem(38, new ItemBuilder(Material.GOLD_SWORD) + .setTitle(C.Reset + C.Bold + C.cYellow + "Team Deathmatch " + C.cGray + "Team Game").addLore(new String[] + { + C.Reset + "", + C.Reset + "Customize one of five exciting champions", + C.Reset + "and battle with the opposing team to the", + C.Reset + "last man standing.", + C.Reset + "", + C.Reset + "Join " + C.cGreen + getPlugin().getGroupTagPlayerCount("TDM") + C.Reset + " other players!", + }).setHideInfo(true).build()); + + setItem(40, new ItemBuilder(Material.WOOD) + .setTitle(C.Reset + C.Bold + C.cYellow + "Master Builders " + C.cGray + "Creative Build").addLore(new String[] + { + C.Reset + "", + C.Reset + "Players are given a Build Theme and ", + C.Reset + "must use blocks, monsters and more", + C.Reset + "to create a masterpiece!", + C.Reset + "", + C.Reset + "Join " + C.cGreen + getPlugin().getGroupTagPlayerCount("BLD") + C.Reset + " other players!", + }).setHideInfo(true).build()); + setItem(42, _minigameCycle.get(_minigameIndex)); - setItem(44, ItemStackFactory.Instance.CreateStack(Material.SKULL_ITEM.getId(), (byte) 3, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Player Servers " + C.cGray + "Player Hosted Games", new String[] - { - ChatColor.RESET + "", - ChatColor.RESET + "Join your friends in their own ", - ChatColor.RESET + "Mineplex Player Server. You can play", - ChatColor.RESET + "the games you want, when you want.", - ChatColor.RESET + "", - })); + setItem(44, new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 3) + .addLore(C.Reset + C.Bold + C.cYellow + "Player Servers " + C.cGray + "Player Hosted Games").addLore(new String[] + { + C.Reset + "", + C.Reset + "Join your friends in their own ", + C.Reset + "Mineplex Player Server. You can play", + C.Reset + "the games you want, when you want.", + C.Reset + "", + }).setHideInfo(true).build()); getButtonMap().put(0, new SelectBRButton(this)); getButtonMap().put(2, new SelectSGButton(this)); getButtonMap().put(4, new SelectSKYButton(this)); getButtonMap().put(6, new SelectUHCButton(this)); getButtonMap().put(8, new SelectWIZButton(this)); - + getButtonMap().put(18, new SelectCSButton(this)); getButtonMap().put(20, new SelectBHButton(this)); getButtonMap().put(22, new SelectSSMButton(this)); @@ -204,271 +274,280 @@ public class ServerGameMenu extends ShopPageBase getButtonMap().put(40, new SelectBLDButton(this)); getButtonMap().put(42, new SelectMINButton(this)); getButtonMap().put(44, new SelectPLAYERButton(this)); -// getButtonMap().put(44, new SelectBETAButton(this)); + // getButtonMap().put(44, new SelectBETAButton(this)); } @SuppressWarnings("deprecation") private void createMinigameCycle() { - int playerCount = getPlugin().getGroupTagPlayerCount("MIN") + - getPlugin().getGroupTagPlayerCount("DR") + - getPlugin().getGroupTagPlayerCount("DE") + - getPlugin().getGroupTagPlayerCount("PB") + - getPlugin().getGroupTagPlayerCount("TF") + - getPlugin().getGroupTagPlayerCount("RUN") + - getPlugin().getGroupTagPlayerCount("SN") + - getPlugin().getGroupTagPlayerCount("DT") + - getPlugin().getGroupTagPlayerCount("SQ") + - getPlugin().getGroupTagPlayerCount("SA") + - getPlugin().getGroupTagPlayerCount("SS") + - getPlugin().getGroupTagPlayerCount("OITQ"); - _minigameCycle.add(ItemStackFactory.Instance.CreateStack(98, (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String [] - { - ChatColor.RESET + "", - ChatColor.RESET + "Play all of these fun minigames:", - ChatColor.RESET + "", - ChatColor.RESET + C.Bold + ChatColor.GREEN + "Super Spleef", - ChatColor.RESET + "Runner", - ChatColor.RESET + "Dragons", - ChatColor.RESET + "One in the Quiver", - ChatColor.RESET + "Dragon Escape", - ChatColor.RESET + "Sneaky Assassins", - ChatColor.RESET + "Micro Battle", - ChatColor.RESET + "Super Paintball", - ChatColor.RESET + "Turf Wars", - ChatColor.RESET + "Death Tag", - ChatColor.RESET + "Bacon Brawl", - ChatColor.RESET + "", - ChatColor.RESET + "Join " + ChatColor.GREEN + playerCount + ChatColor.RESET + " other players!", - })); - - _minigameCycle.add(ItemStackFactory.Instance.CreateStack(Material.GOLD_BOOTS.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String [] - { - ChatColor.RESET + "", - ChatColor.RESET + "Play all of these fun minigames:", - ChatColor.RESET + "", - ChatColor.RESET + "Super Spleef", - ChatColor.RESET + C.Bold + ChatColor.GREEN + "Runner", - ChatColor.RESET + "Dragons", - ChatColor.RESET + "One in the Quiver", - ChatColor.RESET + "Dragon Escape", - ChatColor.RESET + "Sneaky Assassins", - ChatColor.RESET + "Micro Battle", - ChatColor.RESET + "Super Paintball", - ChatColor.RESET + "Turf Wars", - ChatColor.RESET + "Death Tag", - ChatColor.RESET + "Bacon Brawl", - ChatColor.RESET + "", - ChatColor.RESET + "Join " + ChatColor.GREEN + playerCount + ChatColor.RESET + " other players!", - })); - - _minigameCycle.add(ItemStackFactory.Instance.CreateStack(122, (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String [] - { - ChatColor.RESET + "", - ChatColor.RESET + "Play all of these fun minigames:", - ChatColor.RESET + "", - ChatColor.RESET + "Super Spleef", - ChatColor.RESET + "Runner", - ChatColor.RESET + C.Bold + ChatColor.GREEN + "Dragons", - ChatColor.RESET + "One in the Quiver", - ChatColor.RESET + "Dragon Escape", - ChatColor.RESET + "Sneaky Assassins", - ChatColor.RESET + "Micro Battle", - ChatColor.RESET + "Super Paintball", - ChatColor.RESET + "Turf Wars", - ChatColor.RESET + "Death Tag", - ChatColor.RESET + "Bacon Brawl", - ChatColor.RESET + "", - ChatColor.RESET + "Join " + ChatColor.GREEN + playerCount + ChatColor.RESET + " other players!", - })); - - _minigameCycle.add(ItemStackFactory.Instance.CreateStack(Material.BOW, (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String [] - { - ChatColor.RESET + "", - ChatColor.RESET + "Play all of these fun minigames:", - ChatColor.RESET + "", - ChatColor.RESET + "Super Spleef", - ChatColor.RESET + "Runner", - ChatColor.RESET + "Dragons", - ChatColor.RESET + C.Bold + ChatColor.GREEN + "One in the Quiver", - ChatColor.RESET + "Dragon Escape", - ChatColor.RESET + "Sneaky Assassins", - ChatColor.RESET + "Micro Battle", - ChatColor.RESET + "Super Paintball", - ChatColor.RESET + "Turf Wars", - ChatColor.RESET + "Death Tag", - ChatColor.RESET + "Bacon Brawl", - ChatColor.RESET + "", - ChatColor.RESET + "Join " + ChatColor.GREEN + playerCount + ChatColor.RESET + " other players!", - })); - - _minigameCycle.add(ItemStackFactory.Instance.CreateStack(Material.LEATHER_BOOTS.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String [] - { - ChatColor.RESET + "", - ChatColor.RESET + "Play all of these fun minigames:", - ChatColor.RESET + "", - ChatColor.RESET + "Super Spleef", - ChatColor.RESET + "Runner", - ChatColor.RESET + "Dragons", - ChatColor.RESET + "One in the Quiver", - ChatColor.RESET + C.Bold + ChatColor.GREEN + "Dragon Escape", - ChatColor.RESET + "Sneaky Assassins", - ChatColor.RESET + "Micro Battle", - ChatColor.RESET + "Super Paintball", - ChatColor.RESET + "Turf Wars", - ChatColor.RESET + "Death Tag", - ChatColor.RESET + "Bacon Brawl", - ChatColor.RESET + "", - ChatColor.RESET + "Join " + ChatColor.GREEN + playerCount + ChatColor.RESET + " other players!", - })); - - _minigameCycle.add(ItemStackFactory.Instance.CreateStack(Material.MILK_BUCKET.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String [] - { - ChatColor.RESET + "", - ChatColor.RESET + "Play all of these fun minigames:", - ChatColor.RESET + "", - ChatColor.RESET + "Super Spleef", - ChatColor.RESET + "Runner", - ChatColor.RESET + "Dragons", - ChatColor.RESET + "One in the Quiver", - ChatColor.RESET + "Dragon Escape", - ChatColor.RESET + C.Bold + ChatColor.GREEN + "Sneaky Assassins", - ChatColor.RESET + "Micro Battle", - ChatColor.RESET + "Super Paintball", - ChatColor.RESET + "Turf Wars", - ChatColor.RESET + "Death Tag", - ChatColor.RESET + "Bacon Brawl", - ChatColor.RESET + "", - ChatColor.RESET + "Join " + ChatColor.GREEN + playerCount + ChatColor.RESET + " other players!", - })); - - _minigameCycle.add(ItemStackFactory.Instance.CreateStack(Material.MILK_BUCKET.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String [] - { - ChatColor.RESET + "", - ChatColor.RESET + "Play all of these fun minigames:", - ChatColor.RESET + "", - ChatColor.RESET + "Super Spleef", - ChatColor.RESET + "Runner", - ChatColor.RESET + "Dragons", - ChatColor.RESET + "One in the Quiver", - ChatColor.RESET + "Dragon Escape", - ChatColor.RESET + "Sneaky Assassins", - ChatColor.RESET + C.Bold + ChatColor.GREEN + "Micro Battle", - ChatColor.RESET + "Super Paintball", - ChatColor.RESET + "Turf Wars", - ChatColor.RESET + "Death Tag", - ChatColor.RESET + "Bacon Brawl", - ChatColor.RESET + "", - ChatColor.RESET + "Join " + ChatColor.GREEN + playerCount + ChatColor.RESET + " other players!", - })); - - _minigameCycle.add(ItemStackFactory.Instance.CreateStack(Material.DIAMOND_BARDING.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String [] - { - ChatColor.RESET + "", - ChatColor.RESET + "Play all of these fun minigames:", - ChatColor.RESET + "", - ChatColor.RESET + "Super Spleef", - ChatColor.RESET + "Runner", - ChatColor.RESET + "Dragons", - ChatColor.RESET + "One in the Quiver", - ChatColor.RESET + "Dragon Escape", - ChatColor.RESET + "Sneaky Assassins", - ChatColor.RESET + "Micro Battle", - ChatColor.RESET + C.Bold + ChatColor.GREEN + "Super Paintball", - ChatColor.RESET + "Turf Wars", - ChatColor.RESET + "Death Tag", - ChatColor.RESET + "Bacon Brawl", - ChatColor.RESET + "", - ChatColor.RESET + "Join " + ChatColor.GREEN + playerCount + ChatColor.RESET + " other players!", - })); - - _minigameCycle.add(ItemStackFactory.Instance.CreateStack(159, (byte)14, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String [] - { - ChatColor.RESET + "", - ChatColor.RESET + "Play all of these fun minigames:", - ChatColor.RESET + "", - ChatColor.RESET + "Super Spleef", - ChatColor.RESET + "Runner", - ChatColor.RESET + "Dragons", - ChatColor.RESET + "One in the Quiver", - ChatColor.RESET + "Dragon Escape", - ChatColor.RESET + "Sneaky Assassins", - ChatColor.RESET + "Micro Battle", - ChatColor.RESET + "Super Paintball", - ChatColor.RESET + C.Bold + ChatColor.GREEN + "Turf Wars", - ChatColor.RESET + "Death Tag", - ChatColor.RESET + "Bacon Brawl", - ChatColor.RESET + "", - ChatColor.RESET + "Join " + ChatColor.GREEN + playerCount + ChatColor.RESET + " other players!", - })); - - _minigameCycle.add(ItemStackFactory.Instance.CreateStack(309, (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String [] - { - ChatColor.RESET + "", - ChatColor.RESET + "Play all of these fun minigames:", - ChatColor.RESET + "", - ChatColor.RESET + "Super Spleef", - ChatColor.RESET + "Runner", - ChatColor.RESET + "Dragons", - ChatColor.RESET + "One in the Quiver", - ChatColor.RESET + "Dragon Escape", - ChatColor.RESET + "Sneaky Assassins", - ChatColor.RESET + "Micro Battle", - ChatColor.RESET + "Super Paintball", - ChatColor.RESET + "Turf Wars", - ChatColor.RESET + C.Bold + ChatColor.GREEN + "Death Tag", - ChatColor.RESET + "Bacon Brawl", - ChatColor.RESET + "", - ChatColor.RESET + "Join " + ChatColor.GREEN + playerCount + ChatColor.RESET + " other players!", - })); - - _minigameCycle.add(ItemStackFactory.Instance.CreateStack(319, (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String [] - { - ChatColor.RESET + "", - ChatColor.RESET + "Play all of these fun minigames:", - ChatColor.RESET + "", - ChatColor.RESET + "Super Spleef", - ChatColor.RESET + "Runner", - ChatColor.RESET + "Dragons", - ChatColor.RESET + "One in the Quiver", - ChatColor.RESET + "Dragon Escape", - ChatColor.RESET + "Sneaky Assassins", - ChatColor.RESET + "Micro Battle", - ChatColor.RESET + "Super Paintball", - ChatColor.RESET + "Turf Wars", - ChatColor.RESET + "Death Tag", - ChatColor.RESET + C.Bold + ChatColor.GREEN + "Bacon Brawl", - ChatColor.RESET + "", - ChatColor.RESET + "Join " + ChatColor.GREEN + playerCount + ChatColor.RESET + " other players!", - })); + int playerCount = getPlugin().getGroupTagPlayerCount("MIN") + getPlugin().getGroupTagPlayerCount("DR") + + getPlugin().getGroupTagPlayerCount("DE") + getPlugin().getGroupTagPlayerCount("PB") + + getPlugin().getGroupTagPlayerCount("TF") + getPlugin().getGroupTagPlayerCount("RUN") + + getPlugin().getGroupTagPlayerCount("SN") + getPlugin().getGroupTagPlayerCount("DT") + + getPlugin().getGroupTagPlayerCount("SQ") + getPlugin().getGroupTagPlayerCount("SA") + + getPlugin().getGroupTagPlayerCount("SS") + getPlugin().getGroupTagPlayerCount("OITQ"); + _minigameCycle.add(new ItemBuilder(Material.SMOOTH_BRICK) + .setTitle(C.Reset + C.Bold + C.cYellow + "Arcade " + C.cGray + "Mixed Games").addLore(new String[] + { + C.Reset + "", + C.Reset + "Play all of these fun minigames:", + C.Reset + "", + C.Reset + C.Bold + C.cGreen + "Super Spleef", + C.Reset + "Runner", + C.Reset + "Dragons", + C.Reset + "One in the Quiver", + C.Reset + "Dragon Escape", + C.Reset + "Sneaky Assassins", + C.Reset + "Micro Battle", + C.Reset + "Super Paintball", + C.Reset + "Turf Wars", + C.Reset + "Death Tag", + C.Reset + "Bacon Brawl", + C.Reset + "", + C.Reset + "Join " + C.cGreen + playerCount + C.Reset + " other players!", + }).setHideInfo(true).build()); + + _minigameCycle.add(new ItemBuilder(Material.GOLD_BOOTS) + .setTitle(C.Reset + C.Bold + C.cYellow + "Arcade " + C.cGray + "Mixed Games").addLore(new String[] + { + C.Reset + "", + C.Reset + "Play all of these fun minigames:", + C.Reset + "", + C.Reset + "Super Spleef", + C.Reset + C.Bold + C.cGreen + "Runner", + C.Reset + "Dragons", + C.Reset + "One in the Quiver", + C.Reset + "Dragon Escape", + C.Reset + "Sneaky Assassins", + C.Reset + "Micro Battle", + C.Reset + "Super Paintball", + C.Reset + "Turf Wars", + C.Reset + "Death Tag", + C.Reset + "Bacon Brawl", + C.Reset + "", + C.Reset + "Join " + C.cGreen + playerCount + C.Reset + " other players!", + }).setHideInfo(true).build()); + + _minigameCycle.add(new ItemBuilder(Material.DRAGON_EGG) + .setTitle(C.Reset + C.Bold + C.cYellow + "Arcade " + C.cGray + "Mixed Games").addLore(new String[] + { + C.Reset + "", + C.Reset + "Play all of these fun minigames:", + C.Reset + "", + C.Reset + "Super Spleef", + C.Reset + "Runner", + C.Reset + C.Bold + C.cGreen + "Dragons", + C.Reset + "One in the Quiver", + C.Reset + "Dragon Escape", + C.Reset + "Sneaky Assassins", + C.Reset + "Micro Battle", + C.Reset + "Super Paintball", + C.Reset + "Turf Wars", + C.Reset + "Death Tag", + C.Reset + "Bacon Brawl", + C.Reset + "", + C.Reset + "Join " + C.cGreen + playerCount + C.Reset + " other players!", + }).setHideInfo(true).build()); + + _minigameCycle.add(new ItemBuilder(Material.BOW) + .setTitle(C.Reset + C.Bold + C.cYellow + "Arcade " + C.cGray + "Mixed Games").addLore(new String[] + { + C.Reset + "", + C.Reset + "Play all of these fun minigames:", + C.Reset + "", + C.Reset + "Super Spleef", + C.Reset + "Runner", + C.Reset + "Dragons", + C.Reset + C.Bold + C.cGreen + "One in the Quiver", + C.Reset + "Dragon Escape", + C.Reset + "Sneaky Assassins", + C.Reset + "Micro Battle", + C.Reset + "Super Paintball", + C.Reset + "Turf Wars", + C.Reset + "Death Tag", + C.Reset + "Bacon Brawl", + C.Reset + "", + C.Reset + "Join " + C.cGreen + playerCount + C.Reset + " other players!", + }).setHideInfo(true).build()); + + _minigameCycle.add(new ItemBuilder(Material.LEATHER_BOOTS) + .setTitle(C.Reset + C.Bold + C.cYellow + "Arcade " + C.cGray + "Mixed Games").addLore(new String[] + { + C.Reset + "", + C.Reset + "Play all of these fun minigames:", + C.Reset + "", + C.Reset + "Super Spleef", + C.Reset + "Runner", + C.Reset + "Dragons", + C.Reset + "One in the Quiver", + C.Reset + C.Bold + C.cGreen + "Dragon Escape", + C.Reset + "Sneaky Assassins", + C.Reset + "Micro Battle", + C.Reset + "Super Paintball", + C.Reset + "Turf Wars", + C.Reset + "Death Tag", + C.Reset + "Bacon Brawl", + C.Reset + "", + C.Reset + "Join " + C.cGreen + playerCount + C.Reset + " other players!", + }).setHideInfo(true).build()); + + _minigameCycle.add(new ItemBuilder(Material.MILK_BUCKET) + .setTitle(C.Reset + C.Bold + C.cYellow + "Arcade " + C.cGray + "Mixed Games").addLore(new String[] + { + C.Reset + "", + C.Reset + "Play all of these fun minigames:", + C.Reset + "", + C.Reset + "Super Spleef", + C.Reset + "Runner", + C.Reset + "Dragons", + C.Reset + "One in the Quiver", + C.Reset + "Dragon Escape", + C.Reset + C.Bold + C.cGreen + "Sneaky Assassins", + C.Reset + "Micro Battle", + C.Reset + "Super Paintball", + C.Reset + "Turf Wars", + C.Reset + "Death Tag", + C.Reset + "Bacon Brawl", + C.Reset + "", + C.Reset + "Join " + C.cGreen + playerCount + C.Reset + " other players!", + }).setHideInfo(true).build()); + + _minigameCycle.add(new ItemBuilder(Material.MILK_BUCKET) + .setTitle(C.Reset + C.Bold + C.cYellow + "Arcade " + C.cGray + "Mixed Games").addLore(new String[] + { + C.Reset + "", + C.Reset + "Play all of these fun minigames:", + C.Reset + "", + C.Reset + "Super Spleef", + C.Reset + "Runner", + C.Reset + "Dragons", + C.Reset + "One in the Quiver", + C.Reset + "Dragon Escape", + C.Reset + "Sneaky Assassins", + C.Reset + C.Bold + C.cGreen + "Micro Battle", + C.Reset + "Super Paintball", + C.Reset + "Turf Wars", + C.Reset + "Death Tag", + C.Reset + "Bacon Brawl", + C.Reset + "", + C.Reset + "Join " + C.cGreen + playerCount + C.Reset + " other players!", + }).setHideInfo(true).build()); + + _minigameCycle.add(new ItemBuilder(Material.DIAMOND_BARDING) + .setTitle(C.Reset + C.Bold + C.cYellow + "Arcade " + C.cGray + "Mixed Games").addLore(new String[] + { + C.Reset + "", + C.Reset + "Play all of these fun minigames:", + C.Reset + "", + C.Reset + "Super Spleef", + C.Reset + "Runner", + C.Reset + "Dragons", + C.Reset + "One in the Quiver", + C.Reset + "Dragon Escape", + C.Reset + "Sneaky Assassins", + C.Reset + "Micro Battle", + C.Reset + C.Bold + C.cGreen + "Super Paintball", + C.Reset + "Turf Wars", + C.Reset + "Death Tag", + C.Reset + "Bacon Brawl", + C.Reset + "", + C.Reset + "Join " + C.cGreen + playerCount + C.Reset + " other players!", + }).setHideInfo(true).build()); + + _minigameCycle.add(new ItemBuilder(Material.STAINED_CLAY, 1, (byte) 14) + .setTitle(C.Reset + C.Bold + C.cYellow + "Arcade " + C.cGray + "Mixed Games").addLore(new String[] + { + C.Reset + "", + C.Reset + "Play all of these fun minigames:", + C.Reset + "", + C.Reset + "Super Spleef", + C.Reset + "Runner", + C.Reset + "Dragons", + C.Reset + "One in the Quiver", + C.Reset + "Dragon Escape", + C.Reset + "Sneaky Assassins", + C.Reset + "Micro Battle", + C.Reset + "Super Paintball", + C.Reset + C.Bold + C.cGreen + "Turf Wars", + C.Reset + "Death Tag", + C.Reset + "Bacon Brawl", + C.Reset + "", + C.Reset + "Join " + C.cGreen + playerCount + C.Reset + " other players!", + }).setHideInfo(true).build()); + + _minigameCycle.add(new ItemBuilder(Material.IRON_BOOTS) + .setTitle(C.Reset + C.Bold + C.cYellow + "Arcade " + C.cGray + "Mixed Games").addLore(new String[] + { + C.Reset + "", + C.Reset + "Play all of these fun minigames:", + C.Reset + "", + C.Reset + "Super Spleef", + C.Reset + "Runner", + C.Reset + "Dragons", + C.Reset + "One in the Quiver", + C.Reset + "Dragon Escape", + C.Reset + "Sneaky Assassins", + C.Reset + "Micro Battle", + C.Reset + "Super Paintball", + C.Reset + "Turf Wars", + C.Reset + C.Bold + C.cGreen + "Death Tag", + C.Reset + "Bacon Brawl", + C.Reset + "", + C.Reset + "Join " + C.cGreen + playerCount + C.Reset + " other players!", + }).setHideInfo(true).build()); + + _minigameCycle.add(new ItemBuilder(Material.PORK) + .setTitle(C.Reset + C.Bold + C.cYellow + "Arcade " + C.cGray + "Mixed Games").addLore(new String[] + { + C.Reset + "", + C.Reset + "Play all of these fun minigames:", + C.Reset + "", + C.Reset + "Super Spleef", + C.Reset + "Runner", + C.Reset + "Dragons", + C.Reset + "One in the Quiver", + C.Reset + "Dragon Escape", + C.Reset + "Sneaky Assassins", + C.Reset + "Micro Battle", + C.Reset + "Super Paintball", + C.Reset + "Turf Wars", + C.Reset + "Death Tag", + C.Reset + C.Bold + C.cGreen + "Bacon Brawl", + C.Reset + "", + C.Reset + "Join " + C.cGreen + playerCount + C.Reset + " other players!", + }).setHideInfo(true).build()); } private void createSuperSmashCycle() { - String[] desc = new String[] - { - ChatColor.RESET + "", - ChatColor.RESET + "Pick from a selection of monsters,", - ChatColor.RESET + "then battle other players to the ", - ChatColor.RESET + "death with your monsters skills!", - ChatColor.RESET + "", - ChatColor.RESET + "Join " + ChatColor.GREEN + (getPlugin().getGroupTagPlayerCount("SSM") + getPlugin().getGroupTagPlayerCount("SSM2")) + ChatColor.RESET + " other players!", - }; - - _superSmashCycle.add(ItemStackFactory.Instance.CreateStack(397, (byte)4, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch", desc)); + String[] desc = new String[] + { + C.Reset + "", + C.Reset + "Pick from a selection of monsters,", + C.Reset + "then battle other players to the ", + C.Reset + "death with your monsters skills!", + C.Reset + "", + C.Reset + "Join " + C.cGreen + + (getPlugin().getGroupTagPlayerCount("SSM") + getPlugin().getGroupTagPlayerCount("SSM2")) + C.Reset + + " other players!", + }; + + _superSmashCycle.add(new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 4) + .setTitle(C.Reset + C.Bold + C.cYellow + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch").addLore(desc) + .setHideInfo(true).build()); } public void Update() { _ssmIndex++; _minigameIndex++; - + if (_ssmIndex >= _superSmashCycle.size()) _ssmIndex = 0; - + if (_minigameIndex >= _minigameCycle.size()) _minigameIndex = 0; - + buildPage(); } @@ -491,12 +570,12 @@ public class ServerGameMenu extends ShopPageBase { getPlugin().getCastleSiegeShop().attemptShopOpen(player); } - + public void OpenBR(Player player) { getPlugin().getBridgesShop().attemptShopOpen(player); } - + public void OpenBH(Player player) { getPlugin().getBlockHuntShop().attemptShopOpen(player); diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerTypePage.java b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerTypePage.java index 3c909f545..2f05cb7ad 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerTypePage.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerTypePage.java @@ -18,6 +18,7 @@ import mineplex.core.common.util.C; import mineplex.core.common.util.UtilTime; import mineplex.core.donation.DonationManager; import mineplex.core.game.GameDisplay; +import mineplex.core.itemstack.ItemBuilder; import mineplex.core.itemstack.ItemStackFactory; import mineplex.core.shop.item.IButton; import mineplex.core.shop.item.ShopItem; @@ -35,11 +36,11 @@ public class ServerTypePage extends ShopPageBase private ServerGroup _serverGroup; - public ServerTypePage(ServerManager plugin, ServerNpcShop shop, CoreClientManager clientManager, DonationManager donationManager, - Player player, ServerGroup serverGroup) + public ServerTypePage(ServerManager plugin, ServerNpcShop shop, CoreClientManager clientManager, + DonationManager donationManager, Player player, ServerGroup serverGroup) { super(plugin, shop, clientManager, donationManager, serverGroup.getServerNpcName(), player, 27); - + _serverGroup = serverGroup; buildPage(); @@ -49,23 +50,25 @@ public class ServerTypePage extends ShopPageBase protected void buildPage() { String friendlyName = _serverGroup.getServerNpcName(); - - setItem(12, ItemStackFactory.Instance.CreateStack(Material.SKULL_ITEM.getId(), (byte)3, 1, ChatColor.RESET + C.cYellow + "Solo " + friendlyName, new String[] - { - ChatColor.RESET + "", - ChatColor.RESET + C.cRed + C.Bold + "WARNING: " + ChatColor.RESET + "Teaming in Solo Mode is bannable!", - ChatColor.RESET + "", - ChatColor.RESET + C.cGreen + "Click to Play", - })); - - setItem(14, ItemStackFactory.Instance.CreateStack(Material.SKULL_ITEM.getId(), (byte)3, 2, ChatColor.RESET + C.cYellow + "Team " + friendlyName, new String[] - { - ChatColor.RESET + "", - ChatColor.RESET + C.cGray + "2 Player Teams", - ChatColor.RESET + "", - ChatColor.RESET + C.cGreen + "Click to Play" - })); - + + setItem(12, new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 3).setTitle(C.Reset + C.cYellow + "Solo " + friendlyName) + .addLore(new String[] + { + C.Reset + "", + C.Reset + C.cRed + C.Bold + "WARNING: " + C.Reset + "Teaming in Solo Mode is bannable!", + C.Reset + "", + C.Reset + C.cGreen + "Click to Play", + }).build()); + + setItem(14, new ItemBuilder(Material.SKULL_ITEM, 2, (byte) 3).setTitle(C.Reset + C.cYellow + "Team " + friendlyName) + .addLore(new String[] + { + C.Reset + "", + C.Reset + C.cGray + "2 Player Teams", + C.Reset + "", + C.Reset + C.cGreen + "Click to Play" + }).build()); + getButtonMap().put(12, new SelectTypeButton(this, false)); getButtonMap().put(14, new SelectTypeButton(this, true)); } @@ -77,14 +80,16 @@ public class ServerTypePage extends ShopPageBase } public void selectServer(Player player, boolean team) - { + { if (team) { - getShop().openPageForPlayer(player, new ServerNpcPage(getPlugin(), getShop(), getClientManager(), getDonationManager(), _serverGroup.getServerNpcName() + " Teams", player, _serverGroup.getTeamServerKey())); + getShop().openPageForPlayer(player, new ServerNpcPage(getPlugin(), getShop(), getClientManager(), + getDonationManager(), _serverGroup.getServerNpcName() + " Teams", player, _serverGroup.getTeamServerKey())); } else { - getShop().openPageForPlayer(player, new ServerNpcPage(getPlugin(), getShop(), getClientManager(), getDonationManager(), _serverGroup.getServerNpcName() + " Solo", player, _serverGroup.getPrefix())); + getShop().openPageForPlayer(player, new ServerNpcPage(getPlugin(), getShop(), getClientManager(), + getDonationManager(), _serverGroup.getServerNpcName() + " Solo", player, _serverGroup.getPrefix())); } } } diff --git a/Plugins/Mineplex.MapParser/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.MapParser/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 7341ab168..000000000 --- a/Plugins/Mineplex.MapParser/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.7 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.7 diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.Minecraft.Game.ClassCombat/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 7341ab168..000000000 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.7 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.7 diff --git a/Plugins/Mineplex.Minecraft.Game.Core/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.Minecraft.Game.Core/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 7341ab168..000000000 --- a/Plugins/Mineplex.Minecraft.Game.Core/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.7 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.7 diff --git a/Plugins/Mineplex.PlayerCache/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.PlayerCache/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 7341ab168..000000000 --- a/Plugins/Mineplex.PlayerCache/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.7 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.7 diff --git a/Plugins/Nautilus.Game.Arcade/.settings/org.eclipse.jdt.core.prefs b/Plugins/Nautilus.Game.Arcade/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index bfbbfb4d1..000000000 --- a/Plugins/Nautilus.Game.Arcade/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,15 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 -org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=next_line -org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert -org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/HolidayManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/HolidayManager.java index ba2c0d8cd..2328f93dc 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/HolidayManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/HolidayManager.java @@ -304,14 +304,16 @@ public class HolidayManager implements Listener if (Manager.GetGame() != null && !Manager.GetGame().IsAlive(event.getPlayer())) return; - if (!_active.contains(event.getClickedBlock())) - return; - specialBlockBreak(event.getPlayer(), event.getClickedBlock()); } private void specialBlockBreak(Player player, final Block block) { + if (!_active.contains(block)) + return; + + _active.remove(block); + block.getWorld().playEffect(block.getLocation(), Effect.STEP_SOUND, type.getBlockType()); block.setType(Material.AIR);