API Endpoints, Web calls, Gem Fountain Schematics, Game Menu Update, Booster implementation

This commit is contained in:
Shaun Bennett 2016-05-24 17:13:33 +10:00
parent efb264dd75
commit 12c5ba80b7
23 changed files with 814 additions and 457 deletions

View File

@ -37,13 +37,10 @@ public class SortedSchematicLoader<T>
public void update(T value)
{
System.out.println("Update Fountain Schematic... Value: " + value);
Map.Entry<T, Schematic> entry = _schematicMap.floorEntry(value);
System.out.println("Found Schematic Entry: " + (entry == null ? null : "Key: " + entry.getKey() + " Value: " + entry.getValue().toString()));
if (entry != null && !entry.getKey().equals(_currentValue))
{
System.out.println("Pasting Schematic!");
_currentValue = entry.getKey();
entry.getValue().paste(_pasteLocation, false);
}

View File

@ -7,8 +7,8 @@ import com.google.gson.Gson;
*/
public class ApiEndpoint
{
private static final String API_HOST = "localhost";
private static final int API_PORT = 3000;
private static final String API_HOST = "10.33.53.12";
private static final int API_PORT = 7979;
private ApiWebCall _webCall;

View File

@ -0,0 +1,17 @@
package mineplex.core.common.api;
import com.google.gson.FieldNamingStrategy;
import java.lang.reflect.Field;
/**
* @author Shaun Bennett
*/
public class ApiFieldNamingStrategy implements FieldNamingStrategy
{
@Override
public String translateName(Field field)
{
return (field.getName().startsWith("_") ? field.getName().substring(1) : field.getName());
}
}

View File

@ -16,6 +16,7 @@ import org.apache.http.protocol.HTTP;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Type;
/**
* @author Shaun Bennett
@ -24,7 +25,6 @@ public class ApiWebCall
{
private String _url;
private Gson _gson;
private PoolingHttpClientConnectionManager _cm;
private CloseableHttpClient _httpClient;
@ -40,12 +40,17 @@ public class ApiWebCall
}
public <T> T get(String resource, Class<T> clazz)
{
return get(resource, (Type)clazz);
}
public <T> T get(String resource, Type type)
{
T returnData = null;
HttpGet httpGet = new HttpGet(_url + resource);
try (CloseableHttpResponse response = _httpClient.execute(httpGet)) {
returnData = getFromResponse(response, clazz);
returnData = parseResponse(response, type);
} catch (IOException e)
{
e.printStackTrace();
@ -70,10 +75,7 @@ public class ApiWebCall
try (CloseableHttpResponse response = _httpClient.execute(httpPost))
{
returnData = getFromResponse(response, clazz);
} catch (ClientProtocolException e)
{
e.printStackTrace();
returnData = parseResponse(response, clazz);
} catch (IOException e)
{
e.printStackTrace();
@ -87,9 +89,9 @@ public class ApiWebCall
return returnData;
}
private <T> T getFromResponse(CloseableHttpResponse response, Class<T> clazz) throws IOException
private <T> T parseResponse(CloseableHttpResponse response, Type type) throws IOException
{
HttpEntity entity = response.getEntity();
return _gson.fromJson(new InputStreamReader(entity.getContent()), clazz);
return _gson.fromJson(new InputStreamReader(entity.getContent()), type);
}
}

View File

@ -19,7 +19,7 @@ import org.bukkit.inventory.PlayerInventory;
public class UtilInv
{
private static Field _enchantmentNew;
private static DullEnchantment _enchantment;
private static DullEnchantment DULL_ENCHANTMENT;
static
{
@ -29,8 +29,8 @@ public class UtilInv
_enchantmentNew.setAccessible(true);
_enchantmentNew.set(null, true);
_enchantment = new DullEnchantment();
EnchantmentWrapper.registerEnchantment(_enchantment);
DULL_ENCHANTMENT = new DullEnchantment();
EnchantmentWrapper.registerEnchantment(DULL_ENCHANTMENT);
}
catch (Exception e)
{
@ -40,17 +40,17 @@ public class UtilInv
public static void addDullEnchantment(ItemStack itemStack)
{
itemStack.addEnchantment(_enchantment, 1);
itemStack.addEnchantment(DULL_ENCHANTMENT, 1);
}
public static void removeDullEnchantment(ItemStack itemStack)
{
itemStack.removeEnchantment(_enchantment);
itemStack.removeEnchantment(DULL_ENCHANTMENT);
}
public static DullEnchantment getDullEnchantment()
{
return _enchantment;
return DULL_ENCHANTMENT;
}
@SuppressWarnings("deprecation")

View File

@ -79,6 +79,11 @@ public class UtilTime
{
return _ms;
}
public static TimeUnit[] decreasingOrder()
{
return new TimeUnit[]{ DAYS, HOURS, MINUTES, SECONDS, MILLISECONDS };
}
}
/**
@ -121,6 +126,41 @@ public class UtilTime
{
return convertString(Math.max(0, time), trim, TimeUnit.FIT);
}
public static String convertColonString(long time)
{
return convertColonString(time, TimeUnit.HOURS, TimeUnit.SECONDS);
}
/**
* Converts a time into a colon separated string, displaying max to min units.
*
* @param time Time in milliseconds
* @param max The max {@link TimeUnit} to display, inclusive
* @param min The min {@link TimeUnit} to display, inclusive
* @return A colon separated string to represent the time
*/
public static String convertColonString(long time, TimeUnit max, TimeUnit min)
{
if (time == -1) return "Permanent";
else if (time == 0) return "0";
StringBuilder sb = new StringBuilder();
long curr = time;
for (TimeUnit unit : TimeUnit.decreasingOrder())
{
if (unit.getMilliseconds() >= min.getMilliseconds() && unit.getMilliseconds() <= max.getMilliseconds())
{
long amt = curr / unit.getMilliseconds();
if (amt < 10 && unit.getMilliseconds() != max.getMilliseconds()) sb.append('0'); // prefix single digit numbers with a 0
sb.append(amt);
if (unit.getMilliseconds() > min.getMilliseconds()) sb.append(':');
curr -= amt * unit.getMilliseconds();
}
}
return sb.toString();
}
public static String convertString(long time, int trim, TimeUnit type)
{

View File

@ -1,5 +1,7 @@
package mineplex.core.boosters;
import mineplex.core.common.util.UtilTime;
import java.util.Date;
import java.util.UUID;
@ -8,13 +10,13 @@ import java.util.UUID;
*/
public class Booster
{
private String playerName;
private UUID uuid;
private int accountId;
private int duration;
private Date startTime;
private Date endTime;
private Date activationTime;
private String _playerName;
private UUID _uuid;
private int _accountId;
private int _duration;
private Date _startTime;
private Date _endTime;
private Date _activationTime;
public Booster()
{
@ -22,50 +24,65 @@ public class Booster
public String getPlayerName()
{
return playerName;
return _playerName;
}
public UUID getUuid()
{
return uuid;
return _uuid;
}
public int getAccountId()
{
return accountId;
return _accountId;
}
public int getDuration()
{
return duration;
return _duration;
}
public Date getStartTime()
{
return startTime;
return _startTime;
}
public Date getEndTime()
{
return endTime;
return _endTime;
}
public Date getActivationTime()
{
return activationTime;
return _activationTime;
}
public boolean isActive()
{
return getEndTime().before(new Date());
}
public long getTimeRemaining()
{
return getEndTime().getTime() - System.currentTimeMillis();
}
public String getTimeRemainingString()
{
return UtilTime.convertColonString(getTimeRemaining(), UtilTime.TimeUnit.MINUTES, UtilTime.TimeUnit.SECONDS);
}
@Override
public String toString()
{
return "Booster{" +
"playerName='" + playerName + '\'' +
", uuid=" + uuid +
", accountId=" + accountId +
", duration=" + duration +
", startTime=" + startTime +
", endTime=" + endTime +
", activationTime=" + activationTime +
"_playerName='" + _playerName + '\'' +
", _uuid=" + _uuid +
", _accountId=" + _accountId +
", _duration=" + _duration +
", _startTime=" + _startTime +
", _endTime=" + _endTime +
", _activationTime=" + _activationTime +
'}';
}
}

View File

@ -2,12 +2,19 @@ package mineplex.core.boosters;
import mineplex.core.common.api.ApiResponse;
import java.util.Date;
/**
* @author Shaun Bennett
*/
public class BoosterApiResponse extends ApiResponse
{
public String startTime;
private Date startTime;
public Date getStartTime()
{
return startTime;
}
@Override
public String toString()

View File

@ -0,0 +1,12 @@
package mineplex.core.boosters;
import mineplex.core.game.GameDisplay;
/**
* @author Shaun Bennett
*/
public enum BoosterCategory
{
}

View File

@ -1,14 +1,20 @@
package mineplex.core.boosters;
import mineplex.core.MiniPlugin;
import mineplex.core.account.CoreClientManager;
import mineplex.core.boosters.command.BoosterCommand;
import mineplex.core.boosters.gui.BoosterShop;
import mineplex.core.common.util.Callback;
import mineplex.core.donation.DonationManager;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.plugin.java.JavaPlugin;
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.List;
import java.util.UUID;
import java.util.*;
/**
* @author Shaun Bennett
@ -16,20 +22,73 @@ import java.util.UUID;
public class BoosterManager extends MiniPlugin
{
private BoosterRepository _repository;
private CoreClientManager _clientManager;
private DonationManager _donationManager;
private BoosterShop _shop;
public BoosterManager(JavaPlugin plugin)
private long _cacheLastUpdated;
private Map<String, List<Booster>> _boosterCache = new HashMap<>();
public BoosterManager(JavaPlugin plugin, CoreClientManager clientManager, DonationManager donationManager)
{
super("Booster Manager", plugin);
_repository = new BoosterRepository();
_clientManager = clientManager;
_donationManager = donationManager;
_shop = new BoosterShop(this, clientManager, donationManager);
}
public void getBoosters(Callback<List<Booster>> callback)
@Override
public void addCommands()
{
addCommand(new BoosterCommand(this));
}
public void getBoosters(String serverGroup, Callback<List<Booster>> callback)
public Map<String, List<Booster>> getBoosters()
{
return _boosterCache;
}
public void getBoostersAsync(Callback<Map<String, List<Booster>>> callback)
{
runAsync(() -> {
try
{
long time = System.currentTimeMillis();
Map<String, List<Booster>> boosters = _repository.getBoosters();
long timeTaken = System.currentTimeMillis() - time;
runSync(() -> {
_cacheLastUpdated = System.currentTimeMillis();
System.out.println("Got Boosters. Took: " + timeTaken + "ms");
_boosterCache = boosters;
if (callback != null) callback.run(boosters);
});
}
catch (Exception e)
{
System.err.println("Failed to grab boosters;");
e.printStackTrace();
}
});
}
public Booster getActiveBooster(String serverGroup)
{
List<Booster> boosters = _boosterCache.get(serverGroup);
if (boosters != null)
{
for (Booster booster : boosters)
{
if (booster.getEndTime().after(new Date()))
return booster;
}
}
return null;
}
public void getBoostersAsync(String serverGroup, Callback<List<Booster>> callback)
{
runAsync(() -> {
try
@ -45,17 +104,40 @@ public class BoosterManager extends MiniPlugin
});
}
public void activateBooster(String serverGroup, Player player)
public void activateBooster(String serverGroup, Player player, Callback<BoosterApiResponse> callback)
{
String playerName = player.getName();
UUID uuid = player.getUniqueId();
int accountId = _clientManager.getAccountId(player);
runAsync(() -> {
BoosterApiResponse response = _repository.addBooster(serverGroup, playerName, uuid, accountId, 3600);
callback.run(response);
});
}
public void openShop(Player player)
{
_shop.attemptShopOpen(player);
}
@EventHandler
public void updateCache(UpdateEvent event)
{
if (event.getType() == UpdateType.TICK)
{
getBoostersAsync(null);
}
}
public static void main(String[] args) throws IOException, URISyntaxException, InterruptedException
{
BoosterRepository repository = new BoosterRepository();
System.out.println("Adding Booster...");
System.out.println(repository.addBooster("Testing", "Phinary", UUID.randomUUID(), 100, 3600));
System.out.println("Getting Boosters");
System.out.println(repository.getBoosters("Testing"));
Map<String, List<Booster>> boosters = repository.getBoosters();
boosters.entrySet().forEach((entry) -> {
System.out.println("Booster Entry: " + entry.getKey());
System.out.println("Booster Size: " + entry.getValue().size());
entry.getValue().forEach(System.out::println);
});
}
}

View File

@ -0,0 +1,8 @@
package mineplex.core.boosters;
/**
* @author Shaun Bennett
*/
public class BoosterMap
{
}

View File

@ -1,13 +1,16 @@
package mineplex.core.boosters;
import com.google.common.reflect.TypeToken;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonObject;
import mineplex.core.common.api.ApiEndpoint;
import mineplex.core.common.api.ApiFieldNamingStrategy;
import mineplex.core.common.api.ApiResponse;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.UUID;
/**
@ -17,7 +20,13 @@ public class BoosterRepository extends ApiEndpoint
{
public BoosterRepository()
{
super("/booster", new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSX").create());
super("/booster", new GsonBuilder().setFieldNamingStrategy(new ApiFieldNamingStrategy())
.setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSX").create());
}
public Map<String, List<Booster>> getBoosters()
{
return getWebCall().get("/", new TypeToken<Map<String, List<Booster>>>(){}.getType());
}
public List<Booster> getBoosters(String serverGroup)
@ -25,7 +34,7 @@ public class BoosterRepository extends ApiEndpoint
return Arrays.asList(getWebCall().get("/" + serverGroup, Booster[].class));
}
public ApiResponse addBooster(String serverGroup, String playerName, UUID uuid, int accountId, int duration)
public BoosterApiResponse addBooster(String serverGroup, String playerName, UUID uuid, int accountId, int duration)
{
JsonObject body = new JsonObject();
body.addProperty("playerName", playerName);

View File

@ -0,0 +1,54 @@
package mineplex.core.boosters.command;
import mineplex.core.boosters.BoosterApiResponse;
import mineplex.core.boosters.BoosterManager;
import mineplex.core.command.CommandBase;
import mineplex.core.common.Rank;
import mineplex.core.common.util.Callback;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilPlayer;
import org.bukkit.entity.Player;
/**
* @author Shaun Bennett
*/
public class AddCommand extends CommandBase<BoosterManager>
{
public AddCommand(BoosterManager plugin)
{
super(plugin, Rank.ALL, "add");
}
@Override
public void Execute(Player caller, String[] args)
{
if (args != null && args.length > 0)
{
String serverGroup = args[0];
Plugin.activateBooster(serverGroup, caller, new Callback<BoosterApiResponse>()
{
@Override
public void run(BoosterApiResponse response)
{
if (response.isSuccess())
{
UtilPlayer.message(caller, F.main("Booster", "Successfully added booster to " + F.elem(serverGroup)));
}
else
{
UtilPlayer.message(caller, F.main("Booster", "Failed to add booster. Error: " + F.elem(response.getError())));
}
}
});
}
else
{
help(caller);
}
}
private void help(Player caller)
{
UtilPlayer.message(caller, F.help("booster add <servergroup>", "Add a booster to that server group", Rank.ALL));
}
}

View File

@ -0,0 +1,28 @@
package mineplex.core.boosters.command;
import mineplex.core.boosters.BoosterManager;
import mineplex.core.command.CommandBase;
import mineplex.core.command.MultiCommandBase;
import mineplex.core.common.Rank;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilPlayer;
import org.bukkit.entity.Player;
/**
* @author Shaun Bennett
*/
public class BoosterCommand extends MultiCommandBase<BoosterManager>
{
public BoosterCommand(BoosterManager plugin)
{
super(plugin, Rank.ALL, "booster");
AddCommand(new AddCommand(plugin));
}
@Override
protected void Help(Player caller, String[] args)
{
UtilPlayer.message(caller, F.help("booster add <servergroup>", "Add a booster to that server group", Rank.ALL));
}
}

View File

@ -0,0 +1,48 @@
package mineplex.core.boosters.gui;
import mineplex.core.boosters.BoosterApiResponse;
import mineplex.core.boosters.BoosterManager;
import mineplex.core.common.util.C;
import mineplex.core.common.util.Callback;
import mineplex.core.common.util.UtilTime;
import mineplex.core.shop.item.IButton;
import org.bukkit.entity.Player;
import org.bukkit.event.inventory.ClickType;
/**
* @author Shaun Bennett
*/
public class ActivateBoosterButton implements IButton
{
private BoosterShop _boosterShop;
private BoosterManager _boosterManager;
public ActivateBoosterButton(BoosterShop boosterShop, BoosterManager boosterManager)
{
_boosterShop = boosterShop;
_boosterManager = boosterManager;
}
@Override
public void onClick(Player player, ClickType clickType)
{
player.closeInventory();
_boosterManager.activateBooster("Testing", player, new Callback<BoosterApiResponse>()
{
@Override
public void run(BoosterApiResponse response)
{
if (response.isSuccess())
{
long timeToStart = response.getStartTime().getTime() - System.currentTimeMillis();
if (timeToStart <= 0) player.sendMessage(C.cGreen + "Booster activated and enabled now!");
else player.sendMessage(C.cGreen + "Booster activated. Enabled in " + UtilTime.convertString(timeToStart, 2, UtilTime.TimeUnit.FIT));
}
else
{
player.sendMessage(C.cRed + "There was an error trying to enable your booster :(");
}
}
});
}
}

View File

@ -0,0 +1,27 @@
package mineplex.core.boosters.gui;
import mineplex.core.account.CoreClientManager;
import mineplex.core.boosters.BoosterCategory;
import mineplex.core.boosters.BoosterManager;
import mineplex.core.donation.DonationManager;
import mineplex.core.shop.page.ShopPageBase;
import org.bukkit.entity.Player;
/**
* @author Shaun Bennett
*/
public class BoosterPage extends ShopPageBase<BoosterManager, BoosterShop>
{
public BoosterPage(BoosterManager plugin, BoosterShop shop, CoreClientManager clientManager, DonationManager donationManager, Player player, BoosterCategory category)
{
super(plugin, shop, clientManager, donationManager, "Booster", player);
buildPage();
}
@Override
protected void buildPage()
{
}
}

View File

@ -0,0 +1,25 @@
package mineplex.core.boosters.gui;
import mineplex.core.account.CoreClientManager;
import mineplex.core.boosters.BoosterManager;
import mineplex.core.donation.DonationManager;
import mineplex.core.shop.ShopBase;
import mineplex.core.shop.page.ShopPageBase;
import org.bukkit.entity.Player;
/**
* @author Shaun Bennett
*/
public class BoosterShop extends ShopBase<BoosterManager>
{
public BoosterShop(BoosterManager plugin, CoreClientManager clientManager, DonationManager donationManager)
{
super(plugin, clientManager, donationManager, "Boosters");
}
@Override
protected ShopPageBase<BoosterManager, ? extends ShopBase<BoosterManager>> buildPagesFor(Player player)
{
return new MenuPage(getPlugin(), this, getClientManager(), getDonationManager(), player);
}
}

View File

@ -0,0 +1,37 @@
package mineplex.core.boosters.gui;
import mineplex.core.account.CoreClientManager;
import mineplex.core.boosters.Booster;
import mineplex.core.boosters.BoosterManager;
import mineplex.core.common.util.C;
import mineplex.core.common.util.Callback;
import mineplex.core.common.util.UtilSkull;
import mineplex.core.common.util.UtilTime;
import mineplex.core.donation.DonationManager;
import mineplex.core.shop.item.ShopItem;
import mineplex.core.shop.page.ShopPageBase;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import java.util.ArrayList;
import java.util.List;
/**
* @author Shaun Bennett
*/
public class MenuPage extends ShopPageBase<BoosterManager,BoosterShop>
{
public MenuPage(BoosterManager plugin, BoosterShop shop, CoreClientManager clientManager, DonationManager donationManager, Player player)
{
super(plugin, shop, clientManager, donationManager, "Boosters", player);
buildPage();
}
@Override
protected void buildPage()
{
}
}

View File

@ -8,6 +8,8 @@ import java.util.HashSet;
import java.util.List;
import java.util.Map;
import mineplex.core.common.util.UtilInput;
import mineplex.core.common.util.UtilInv;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Color;
@ -56,6 +58,7 @@ public class ItemBuilder
private Material _mat;
private String _title = null;
private boolean _unbreakable;
private boolean _glow;
private String _playerHeadName = null;
private HashSet<ItemFlag> _itemFlags = new HashSet<ItemFlag>();
@ -132,6 +135,13 @@ public class ItemBuilder
return this;
}
public ItemBuilder setGlow(boolean glow)
{
_glow = glow;
return this;
}
public ItemBuilder setItemFlags(Collection<ItemFlag> flags)
{
getItemFlags().clear();
@ -267,6 +277,7 @@ public class ItemBuilder
}
item.addUnsafeEnchantments(_enchants);
if (_glow) item.addEnchantment(UtilInv.getDullEnchantment(), 1);
return item;
}

View File

@ -1,5 +1,6 @@
package mineplex.hub;
import mineplex.core.boosters.BoosterManager;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
@ -146,8 +147,9 @@ public class Hub extends JavaPlugin implements IRelation
QueueManager queueManager = new QueueManager(this, clientManager, donationManager, new EloManager(this, clientManager), partyManager);
new ServerManager(this, clientManager, donationManager, portal, partyManager, serverStatusManager, hubManager, new StackerManager(hubManager), queueManager);
BoosterManager boosterManager = new BoosterManager(this, clientManager, donationManager);
new ServerManager(this, clientManager, donationManager, portal, partyManager, serverStatusManager, hubManager, new StackerManager(hubManager), queueManager, boosterManager);
Chat chat = new Chat(this, incognito, clientManager, preferenceManager, achievementManager, serverStatusManager.getCurrentServerName());
new MessageManager(this, incognito, clientManager, preferenceManager, ignoreManager, punish, friendManager, chat);
new MemoryFix(this);

View File

@ -9,6 +9,7 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.Random;
import mineplex.core.boosters.BoosterManager;
import mineplex.core.brawl.fountain.FountainManager;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;

View File

@ -11,6 +11,7 @@ import java.util.List;
import java.util.Random;
import java.util.Set;
import mineplex.core.boosters.BoosterManager;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Material;
@ -79,6 +80,7 @@ public class ServerManager extends MiniDbClientPlugin<SimpleClanToken>
private PartyManager _partyManager;
private ServerStatusManager _statusManager;
private HubManager _hubManager;
private BoosterManager _boosterManager;
private NautHashMap<String, Long> _queueCooldowns = new NautHashMap<String, Long>();
private NautHashMap<String, HashSet<ServerInfo>> _serverKeyInfoMap = new NautHashMap<String, HashSet<ServerInfo>>();
@ -100,7 +102,7 @@ public class ServerManager extends MiniDbClientPlugin<SimpleClanToken>
private boolean _retrieving = false;
private long _lastRetrieve = 0;
public ServerManager(JavaPlugin plugin, CoreClientManager clientManager, DonationManager donationManager, Portal portal, PartyManager partyManager, ServerStatusManager statusManager, HubManager hubManager, StackerManager stackerManager, QueueManager queueManager)
public ServerManager(JavaPlugin plugin, CoreClientManager clientManager, DonationManager donationManager, Portal portal, PartyManager partyManager, ServerStatusManager statusManager, HubManager hubManager, StackerManager stackerManager, QueueManager queueManager, BoosterManager boosterManager)
{
super("Server Manager", plugin, clientManager);
@ -110,6 +112,7 @@ public class ServerManager extends MiniDbClientPlugin<SimpleClanToken>
_partyManager = partyManager;
_statusManager = statusManager;
_hubManager = hubManager;
_boosterManager = boosterManager;
plugin.getServer().getMessenger().registerOutgoingPluginChannel(plugin, "BungeeCord");
@ -943,4 +946,9 @@ public class ServerManager extends MiniDbClientPlugin<SimpleClanToken>
{
return new SimpleClanToken();
}
public BoosterManager getBoosterManager()
{
return _boosterManager;
}
}

View File

@ -3,11 +3,12 @@ package mineplex.hub.server.ui;
import java.util.ArrayList;
import java.util.List;
import mineplex.core.boosters.Booster;
import mineplex.core.shop.item.IButton;
import org.bukkit.ChatColor;
import org.bukkit.Color;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import mineplex.core.account.CoreClientManager;
import mineplex.core.common.util.C;
@ -19,15 +20,15 @@ import mineplex.hub.server.ui.button.*;
public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
{
private List<ItemStack> _superSmashCycle = new ArrayList<ItemStack>();
private List<ItemStack> _minigameCycle = new ArrayList<ItemStack>();
private List<ItemBuilder> _superSmashCycle = new ArrayList<>();
private List<ItemBuilder> _minigameCycle = new ArrayList<>();
private int _ssmIndex;
private int _minigameIndex;
private boolean _extraValue;
public ServerGameMenu(ServerManager plugin, QuickShop quickShop, CoreClientManager clientManager,
DonationManager donationManager, String name, Player player)
DonationManager donationManager, String name, Player player)
{
super(plugin, quickShop, clientManager, donationManager, name, player, 45);
@ -40,112 +41,51 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
@Override
protected void buildPage()
{
/*
addButton(2, new ItemBuilder(Material.RED_ROSE).setTitle(C.cYellowB + "Valentines Vendetta " + C.cGray + "Save Valentines!").addLore(new String[]
{
(_extraValue ? C.cAquaB : C.cWhiteB) + "LIMITED TIME GAME",
C.Reset + "",
C.Reset + "Calvin the Cow has a Valentines Date,",
C.Reset + "but he was robbed by the nasty pigs!",
C.Reset + "Recover his items, and save the day!",
C.Reset + "",
C.Reset + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("VV") + C.Reset + " other players!",
}).setHideInfo(true).build(), new SelectVVButton(this));
*/
addButton(2, new ItemBuilder(Material.QUARTZ_BLOCK).setTitle(C.cYellowB + "Speed Builders " + C.cGray + "Competitive Building").addLore(new String[]
add(2, Material.QUARTZ_BLOCK, C.cYellowB + "Speed Builders " + C.cGray + "Competitive Building", new String[]
{
(_extraValue ? C.cAquaB : C.cWhiteB) + "NEW GAME",
C.Reset + "",
C.Reset + "Memorize Gwen the Guardian's builds",
C.Reset + "Then recreate them in a short amount of time.",
C.Reset + "The least correct builder is eliminated.",
C.Reset + "",
C.Reset + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("SB") + C.Reset + " other players!",
}).setHideInfo(true).build(), new SelectSBButton(this));
}, "SB", "SpeedBuilders", new SelectSBButton(this));
addButton(4, new ItemBuilder(Material.BOOK_AND_QUILL).setTitle(C.cYellowB + "Draw My Thing " + C.cGray + "Pictionary").addLore(new String[]
add(4, Material.BOOK_AND_QUILL, C.cYellowB + "Draw My Thing " + C.cGray + "Pictionary", new String[]
{
(_extraValue ? C.cAquaB : C.cWhiteB) + "NEW UPDATE",
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 " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("DMT") + C.Reset + " other players!",
}).setHideInfo(true).build(), new SelectDMTButton(this));
}, "DMT", "DrawMyThing", new SelectDMTButton(this));
addButton(6, new ItemBuilder(Material.TNT).setTitle(C.cYellowB + "Dragon Escape " + C.cGray + "Fast Paced Parkour").addLore(new String[]
add(6, Material.TNT, C.cYellowB + "Dragon Escape " + C.cGray + "Fast Paced Parkour", new String[]
{
(_extraValue ? C.cAquaB : C.cWhiteB) + "FEATURED ARCADE GAME",
C.Reset + "",
C.Reset + "Douglas the Dragon is angry",
C.Reset + "You better RUNNNNN!",
C.Reset + "Last player alive wins",
C.Reset + "",
C.Reset + "Join " + C.cGreen + getPlugin().getGroupTagPlayerCount("DE") + C.Reset + " other players!"
}).setHideInfo(true).build(), new SelectFEATButton(this, "Dragon Escape"));
}, "DE", null, new SelectFEATButton(this, "Dragon Escape"));
/*
addButton(6, new ItemBuilder(Material.IRON_SWORD).setTitle(C.cYellowB + "Gladiators" + C.cGray + " Bracketted Deathmatch").addLore(new String[]
{
(_extraValue ? C.cAquaB : C.cWhiteB) + "FEATURED ARCADE GAME",
C.Reset + "",
C.Reset + "A 1v1 tournament.",
C.Reset + "Kill your enemy and then",
C.Reset + "run to the next arena!",
C.Reset + "",
C.Reset + "Join " + C.cGreen + getPlugin().getGroupTagPlayerCount("GLD") + C.Reset + " other players!"
}).setHideInfo(true).build(), new SelectFEATButton(this, "Gladiators"));
*/
/*
addButton(6, new ItemBuilder(Material.LAVA_BUCKET).setTitle(C.cYellowB + "Micro Battle" + C.cGray + " 4 Team Deathmatch").addLore(new String[]
{
(_extraValue ? C.cAquaB : C.cWhiteB) + "FEATURED ARCADE GAME",
C.Reset + "",
C.Reset + "4 teams stand alone",
C.Reset + "Who shall remain victorious",
C.Reset + "You decide",
C.Reset + "",
C.Reset + "Join " + C.cGreen + getPlugin().getGroupTagPlayerCount("MB") + C.Reset + " other players!"
}).setHideInfo(true).build(), new SelectFEATButton(this, "Micro Battle"));
*/
/*
addButton(6, new ItemBuilder(Material.TNT).setTitle(C.cYellowB + "Bomb Lobbers " + C.cGray + "TNT Mayhem").addLore(new String[]
{
(_extraValue ? C.cAquaB : C.cWhiteB) + "FEATURED ARCADE GAME",
C.Reset + "",
C.Reset + "Fight against your enemies using",
C.Reset + "the power of explosives!",
C.Reset + "",
C.Reset + "Join " + C.cGreen + getPlugin().getGroupTagPlayerCount("BL") + C.Reset + " other players!"
}).setHideInfo(true).build(), new SelectFEATButton(this, "Bomb Lobbers"));
*/
addButton(9, new ItemBuilder(Material.IRON_PICKAXE).setTitle(C.cYellowB + "The Bridges " + C.cGray + "4 Team Survival").addLore(new String[]
add(9, Material.IRON_PICKAXE, C.cYellowB + "The Bridges " + C.cGray + "4 Team Survival", 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(), new SelectBRButton(this));
}, "BR", "Bridge", new SelectBRButton(this));
addButton(11, new ItemBuilder(Material.DIAMOND_SWORD).setTitle(C.cYellowB + "Survival Games " + C.cGray + "Solo/Team Survival").addLore(new String[]
add(11, Material.DIAMOND_SWORD, (byte) 0, C.cYellowB + "Survival Games " + C.cGray + "Solo/Team Survival", 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(), new SelectSGButton(this));
}, new String[] {"HG", "SG2"}, "SurvivalGames", new SelectSGButton(this));
addButton(13, new ItemBuilder(Material.FEATHER).setTitle(C.cYellowB + "Skywars " + C.cGray + "Solo/Team Survival").addLore(new String[]
add(13, Material.FEATHER, (byte) 0, C.cYellowB + "Skywars " + C.cGray + "Solo/Team Survival", new String[]
{
C.Reset + "",
C.Reset + "16 contenders fight to rule the skies!",
@ -153,411 +93,329 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
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(), new SelectSKYButton(this));
}, new String[] {"SKY", "SKY2"}, "SkyWars", new SelectSKYButton(this));
addButton(15, new ItemBuilder(Material.GOLDEN_APPLE).setTitle(C.cYellowB + "UHC " + C.cGray + "Ultra Hardcore Mode").addLore(new String[]
add(15, Material.GOLDEN_APPLE, C.cYellowB + "UHC " + C.cGray + "Ultra Hardcore Mode", 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(), new SelectUHCButton(this));
}, "UHC", "UHC", new SelectUHCButton(this));
addButton(17, new ItemBuilder(Material.BLAZE_ROD).setTitle(C.cYellowB + "Wizards " + C.cGray + "Last Man Standing").addLore(new String[]
add(17, Material.BLAZE_ROD, C.cYellowB + "Wizards " + C.cGray + "Last Man Standing", 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(), new SelectWIZButton(this));
}, "WIZ", "Wizards", new SelectWIZButton(this));
addButton(18, new ItemBuilder(Material.BANNER).setColor(Color.RED).setTitle(C.cYellowB + "Capture the Flag " + C.cGray + "Team Game").addLore(new String[]
add(18, new ItemBuilder(Material.BANNER).setColor(Color.RED), C.cYellowB + "Capture the Flag " + C.cGray + "Team Game", new String[]
{
C.Reset + "",
C.Reset + "One team must steal the other",
C.Reset + "team's flag. Capture it",
C.Reset + "three times to win.",
C.Reset + "",
C.Reset + "Join " + C.cGreen + getPlugin().getGroupTagPlayerCount("CTF") + C.Reset + " other players!",
}).setHideInfo(true).build(), new SelectCTFButton(this));
}, new String[] {"CTF"}, "CTF", new SelectCTFButton(this));
addButton(20, new ItemBuilder(Material.BEACON).setTitle(C.cYellowB + "Dominate " + C.cGray + "Team Game").addLore(new String[]
add(20, Material.BEACON, C.cYellowB + "Dominate " + C.cGray + "Team Game", 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 " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("DOM") + C.Reset + " other players!",
}).setHideInfo(true).build(), new SelectDOMButton(this));
}, "DOM", "Dominate", new SelectDOMButton(this));
addButton(22, new ItemBuilder(Material.GOLD_SWORD).setTitle(C.cYellowB + "Team Deathmatch " + C.cGray + "Team Game").addLore(new String[]
add(22, Material.GOLD_SWORD, C.cYellowB + "Team Deathmatch " + C.cGray + "Team Game", 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(), new SelectTDMButton(this));
}, "TDM", "TeamDeathMatch", new SelectTDMButton(this));
addButton(24, new ItemBuilder(Material.DIAMOND_CHESTPLATE).setTitle(C.cYellowB + "Castle Siege " + C.cGray + "Team Game").addLore(new String[]
add(24, Material.DIAMOND_CHESTPLATE, C.cYellowB + "Castle Siege " + C.cGray + "Team Game", 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(), new SelectCSButton(this));
}, "CS", "CastleSiege", new SelectCSButton(this));
addButton(26, new ItemBuilder(Material.GRASS).setTitle(C.cYellowB + "Block Hunt " + C.cGray + "Cat and Mouse").addLore(new String[]
add(26, Material.GRASS, C.cYellowB + "Block Hunt " + C.cGray + "Cat and Mouse", 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(), new SelectBHButton(this));
}, "BH", "BlockHunt", new SelectBHButton(this));
addButton(28, new ItemBuilder(Material.TNT).setTitle(C.cYellowB + "MineStrike " + C.cGray + "Team Survival").addLore(new String[]
add(28, Material.TNT, C.cYellowB + "MineStrike " + C.cGray + "Team Survival", 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(), new SelectMSButton(this));
}, "MS", "MineStrike", new SelectMSButton(this));
addButton(30, _superSmashCycle.get(_ssmIndex), new SelectSSMButton(this));
add(30, _superSmashCycle.get(_ssmIndex).clone(), null, null, new String[] {"SSM", "SSM2"}, "SmashMobs", new SelectSSMButton(this));
addButton(32, _minigameCycle.get(_minigameIndex), new SelectMINButton(this));
String[] games = new String[] {"MIN", "DR", "DE", "PB", "TF", "RUN", "SN", "DT", "SQ", "SA", "SS",
"OITQ", "BB", "MB", "EVO", "GLD", "BL"};
add(32, _minigameCycle.get(_minigameIndex).clone(), null, null, games, "Arcade", new SelectMINButton(this));
addButton(34, new ItemBuilder(Material.WOOD).setTitle(C.cYellowB + "Master Builders " + C.cGray + "Creative Build").setLore(new String[]
add(34, Material.WOOD, C.cYellowB + "Master Builders " + C.cGray + "Creative Build", 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 " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("BLD") + C.Reset + " other players!",
}).setHideInfo(true).build(), new SelectBLDButton(this));
}, "BLD", "MasterBuilders", new SelectBLDButton(this));
/*
addButton(37, new ItemBuilder(Material.SNOW_BALL).setTitle(C.cYellowB + "Snow Fight " + C.cGray + "Team Survival").addLore(new String[]
{
(_extraValue ? C.cAquaB : C.cWhiteB) + "LIMITED TIME",
C.Reset + "",
C.Reset + "Harness the power of snow",
C.Reset + "to vanquish your enemies in",
C.Reset + "this ULTIMATE snowball fight!",
C.Reset + "",
C.Reset + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("SF") + C.Reset + " other players!",
}).setHideInfo(true).build(), new SelectFEATButton(this, "Snow Fight"));
*/
addButton(39, new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 3).setTitle(C.cYellowB + "Player Servers " + C.cGray + "Player Hosted Games").addLore(new String[]
add(39, Material.SKULL_ITEM, (byte) 3, C.cYellowB + "Player Servers " + C.cGray + "Player Hosted Games", 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.",
}).setHideInfo(true).build(), new SelectPLAYERButton(this));
}, null, null, new SelectPLAYERButton(this));
addButton(40, new ItemBuilder(Material.IRON_DOOR).setTitle(C.cYellowB + "Mineplex Clans " + C.cGray + "Factions PvP").addLore(new String[]
add(40, Material.IRON_DOOR, C.cYellowB + "Mineplex Clans " + C.cGray + "Factions PvP", new String[]
{
(_extraValue ? C.cAquaB : C.cWhiteB) + "BETA RELEASE",
C.Reset + "",
C.Reset + "Equip custom skills and builds",
C.Reset + "and join your clan to destroy",
C.Reset + "and raid others!",
C.Reset + "",
C.Reset + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("Clans") + C.Reset + " other players!",
}).setHideInfo(true).build(), new SelectCLANSButton(this));
}, "Clans", "Clans", new SelectCLANSButton(this));
addButton(41, new ItemBuilder(Material.BREWING_STAND_ITEM).setTitle(C.cYellowB + "Monster Maze " + C.cGray + "Snow Sprint").addLore(new String[]
add(41, Material.BREWING_STAND_ITEM, C.cYellowB + "Monster Maze " + C.cGray + "Snow Sprint", new String[]
{
(_extraValue ? C.cAquaB : C.cWhiteB) + "BETA GAME",
C.Reset + "",
C.Reset + "Run along a maze avoiding",
C.Reset + "evil monsters. Get to the",
C.Reset + "Safe-Pad or be killed!",
C.Reset + "",
C.Reset + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("BETA") + C.Reset + " other players!",
}).setHideInfo(true).build(), new SelectBETAButton(this));
}, "BETA", "Beta", new SelectBETAButton(this));
}
/*
addButton(43, new ItemBuilder(Material.BOOKSHELF).setTitle(C.cYellowB + "Christmas Chaos " + C.cGray + "Help Save Christmas").addLore(new String[]
{
(_extraValue ? C.cAquaB : C.cWhiteB) + "LIMITED TIME",
C.Reset + "",
C.Reset + "Band together with your friends",
C.Reset + "and help Santa save Christmas from",
C.Reset + "a deadly enemy...",
C.Reset + "",
C.Reset + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("CC") + C.Reset + " other players!",
}).setHideInfo(true).build(), new SelectFEATButton(this, "Christmas Chaos"));
*/
private void add(int slot, Material material, String title, String[] lore, String serverTag, String serverGroup, IButton button)
{
add(slot, material, (byte) 0, title, lore, serverTag == null ? null : new String[]{serverTag}, serverGroup, button);
}
private void add(int slot, Material material, byte data, String title, String[] lore, String[] serverTags, String serverGroup, IButton button)
{
add(slot, new ItemBuilder(material, 1, data), title, lore, serverTags, serverGroup, button);
}
private void add(int slot, ItemBuilder builder, String title, String[] lore, String[] serverTags, String serverGroup, IButton button)
{
// Boosters
if (serverGroup != null)
{
Booster booster = getPlugin().getBoosterManager().getActiveBooster(serverGroup);
if (booster != null)
{
// append to start of lore
builder.getLore().add(0, C.cGreen + "Boosted by " + C.cWhite + booster.getPlayerName() + C.cGreen + " - " + C.cWhite + booster.getTimeRemainingString());
builder.setGlow(true);
}
}
if (title != null) builder.setTitle(title);
if (lore != null) builder.addLore(lore);
builder.setHideInfo(true);
// Player Count
if (serverTags != null && serverTags.length > 0)
{
int playerCount = 0;
for (String tag : serverTags) playerCount += getPlugin().getGroupTagPlayerCount(tag);
builder.addLore(" ", C.Reset + "Join " + ChatColor.GREEN + playerCount + C.Reset + " other players!");
}
addButton(slot, builder.build(), button);
}
private void createMinigameCycle()
{
int playerCount = 0
+ 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")
+ getPlugin().getGroupTagPlayerCount("BB")
+ getPlugin().getGroupTagPlayerCount("MB")
+ getPlugin().getGroupTagPlayerCount("EVO")
+ getPlugin().getGroupTagPlayerCount("GLD")
+ getPlugin().getGroupTagPlayerCount("BL");
_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 and more!",
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());
.setTitle(C.Reset + C.Bold + C.cYellow + "Arcade " + C.cGray + "Mixed Games").addLore(C.Reset + "",
C.Reset + "Play all of these fun minigames and more!",
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").setHideInfo(true));
_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 and more!",
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());
.setTitle(C.Reset + C.Bold + C.cYellow + "Arcade " + C.cGray + "Mixed Games").addLore(C.Reset + "",
C.Reset + "Play all of these fun minigames and more!",
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").setHideInfo(true));
_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 and more!",
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());
.setTitle(C.Reset + C.Bold + C.cYellow + "Arcade " + C.cGray + "Mixed Games").addLore(C.Reset + "",
C.Reset + "Play all of these fun minigames and more!",
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").setHideInfo(true));
_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 and more!",
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());
.setTitle(C.Reset + C.Bold + C.cYellow + "Arcade " + C.cGray + "Mixed Games").addLore(C.Reset + "",
C.Reset + "Play all of these fun minigames and more!",
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").setHideInfo(true));
_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 and more!",
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());
.setTitle(C.Reset + C.Bold + C.cYellow + "Arcade " + C.cGray + "Mixed Games").addLore(C.Reset + "",
C.Reset + "Play all of these fun minigames and more!",
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").setHideInfo(true));
_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 and more!",
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());
.setTitle(C.Reset + C.Bold + C.cYellow + "Arcade " + C.cGray + "Mixed Games").addLore(C.Reset + "",
C.Reset + "Play all of these fun minigames and more!",
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").setHideInfo(true));
_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 and more!",
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());
.setTitle(C.Reset + C.Bold + C.cYellow + "Arcade " + C.cGray + "Mixed Games").addLore(C.Reset + "",
C.Reset + "Play all of these fun minigames and more!",
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").setHideInfo(true));
_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 and more!",
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());
.setTitle(C.Reset + C.Bold + C.cYellow + "Arcade " + C.cGray + "Mixed Games").addLore(C.Reset + "",
C.Reset + "Play all of these fun minigames and more!",
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").setHideInfo(true));
_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 and more!",
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());
.setTitle(C.Reset + C.Bold + C.cYellow + "Arcade " + C.cGray + "Mixed Games").addLore(C.Reset + "",
C.Reset + "Play all of these fun minigames and more!",
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").setHideInfo(true));
_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 and more!",
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());
.setTitle(C.Reset + C.Bold + C.cYellow + "Arcade " + C.cGray + "Mixed Games").addLore(C.Reset + "",
C.Reset + "Play all of these fun minigames and more!",
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").setHideInfo(true));
_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 and more!",
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());
.setTitle(C.Reset + C.Bold + C.cYellow + "Arcade " + C.cGray + "Mixed Games").addLore(C.Reset + "",
C.Reset + "Play all of these fun minigames and more!",
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").setHideInfo(true));
}
private void createSuperSmashCycle()
@ -568,25 +426,23 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
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) 0).setTitle(C.cYellowB + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch").addLore(desc).setHideInfo(true).build());
_superSmashCycle.add(new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 1).setTitle(C.cYellowB + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch").addLore(desc).setHideInfo(true).build());
_superSmashCycle.add(new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 2).setTitle(C.cYellowB + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch").addLore(desc).setHideInfo(true).build());
_superSmashCycle.add(new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 3).setPlayerHead("MHF_LavaSlime").setTitle(C.cYellowB + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch").addLore(desc).setHideInfo(true).build());
_superSmashCycle.add(new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 3).setPlayerHead("MHF_Golem").setTitle(C.cYellowB + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch").addLore(desc).setHideInfo(true).build());
_superSmashCycle.add(new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 3).setPlayerHead("MHF_Enderman").setTitle(C.cYellowB + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch").addLore(desc).setHideInfo(true).build());
_superSmashCycle.add(new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 3).setPlayerHead("MHF_Cow").setTitle(C.cYellowB + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch").addLore(desc).setHideInfo(true).build());
_superSmashCycle.add(new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 3).setPlayerHead("MHF_Chicken").setTitle(C.cYellowB + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch").addLore(desc).setHideInfo(true).build());
_superSmashCycle.add(new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 3).setPlayerHead("MHF_Blaze").setTitle(C.cYellowB + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch").addLore(desc).setHideInfo(true).build());
_superSmashCycle.add(new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 3).setPlayerHead("MHF_Squid").setTitle(C.cYellowB + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch").addLore(desc).setHideInfo(true).build());
_superSmashCycle.add(new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 3).setPlayerHead("MHF_Spider").setTitle(C.cYellowB + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch").addLore(desc).setHideInfo(true).build());
_superSmashCycle.add(new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 3).setPlayerHead("MHF_Slime").setTitle(C.cYellowB + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch").addLore(desc).setHideInfo(true).build());
_superSmashCycle.add(new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 3).setPlayerHead("MHF_Sheep").setTitle(C.cYellowB + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch").addLore(desc).setHideInfo(true).build());
_superSmashCycle.add(new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 3).setPlayerHead("MHF_Pig").setTitle(C.cYellowB + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch").addLore(desc).setHideInfo(true).build());
_superSmashCycle.add(new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 4).setTitle(C.cYellowB + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch").addLore(desc).setHideInfo(true).build());
_superSmashCycle.add(new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 0).setTitle(C.cYellowB + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch").addLore(desc).setHideInfo(true));
_superSmashCycle.add(new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 1).setTitle(C.cYellowB + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch").addLore(desc).setHideInfo(true));
_superSmashCycle.add(new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 2).setTitle(C.cYellowB + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch").addLore(desc).setHideInfo(true));
_superSmashCycle.add(new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 3).setPlayerHead("MHF_LavaSlime").setTitle(C.cYellowB + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch").addLore(desc).setHideInfo(true));
_superSmashCycle.add(new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 3).setPlayerHead("MHF_Golem").setTitle(C.cYellowB + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch").addLore(desc).setHideInfo(true));
_superSmashCycle.add(new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 3).setPlayerHead("MHF_Enderman").setTitle(C.cYellowB + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch").addLore(desc).setHideInfo(true));
_superSmashCycle.add(new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 3).setPlayerHead("MHF_Cow").setTitle(C.cYellowB + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch").addLore(desc).setHideInfo(true));
_superSmashCycle.add(new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 3).setPlayerHead("MHF_Chicken").setTitle(C.cYellowB + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch").addLore(desc).setHideInfo(true));
_superSmashCycle.add(new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 3).setPlayerHead("MHF_Blaze").setTitle(C.cYellowB + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch").addLore(desc).setHideInfo(true));
_superSmashCycle.add(new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 3).setPlayerHead("MHF_Squid").setTitle(C.cYellowB + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch").addLore(desc).setHideInfo(true));
_superSmashCycle.add(new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 3).setPlayerHead("MHF_Spider").setTitle(C.cYellowB + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch").addLore(desc).setHideInfo(true));
_superSmashCycle.add(new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 3).setPlayerHead("MHF_Slime").setTitle(C.cYellowB + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch").addLore(desc).setHideInfo(true));
_superSmashCycle.add(new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 3).setPlayerHead("MHF_Sheep").setTitle(C.cYellowB + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch").addLore(desc).setHideInfo(true));
_superSmashCycle.add(new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 3).setPlayerHead("MHF_Pig").setTitle(C.cYellowB + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch").addLore(desc).setHideInfo(true));
_superSmashCycle.add(new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 4).setTitle(C.cYellowB + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch").addLore(desc).setHideInfo(true));
}
public void Update()
@ -623,7 +479,7 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
{
getPlugin().getCtfShop().attemptShopOpen(player);
}
public void openCS(Player player)
{
getPlugin().getCastleSiegeShop().attemptShopOpen(player);
@ -678,7 +534,7 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
{
getPlugin().getBetaShop().attemptShopOpen(player);
}
public void openFeatured(Player player, String name)
{
getPlugin().getShop(name).attemptShopOpen(player);
@ -698,12 +554,12 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
{
getPlugin().getPlayerGamesShop().attemptShopOpen(player);
}
public void openClans(Player player)
{
getPlugin().getClansShop().attemptShopOpen(player);
}
public void openTypeWars(Player player)
{
getPlugin().getTypeWarsShop().attemptShopOpen(player);
@ -713,4 +569,73 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
{
getPlugin().getValentinesShop().attemptShopOpen(player);
}
/*
ADDITIONAL LORES;
addButton(2, new ItemBuilder(Material.RED_ROSE).setTitle(C.cYellowB + "Valentines Vendetta " + C.cGray + "Save Valentines!").addLore(new String[]
{
(_extraValue ? C.cAquaB : C.cWhiteB) + "LIMITED TIME GAME",
C.Reset + "",
C.Reset + "Calvin the Cow has a Valentines Date,",
C.Reset + "but he was robbed by the nasty pigs!",
C.Reset + "Recover his items, and save the day!",
C.Reset + "",
C.Reset + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("VV") + C.Reset + " other players!",
}).setHideInfo(true).build(), new SelectVVButton(this));
addButton(6, new ItemBuilder(Material.IRON_SWORD).setTitle(C.cYellowB + "Gladiators" + C.cGray + " Bracketted Deathmatch").addLore(new String[]
{
(_extraValue ? C.cAquaB : C.cWhiteB) + "FEATURED ARCADE GAME",
C.Reset + "",
C.Reset + "A 1v1 tournament.",
C.Reset + "Kill your enemy and then",
C.Reset + "run to the next arena!",
C.Reset + "",
C.Reset + "Join " + C.cGreen + getPlugin().getGroupTagPlayerCount("GLD") + C.Reset + " other players!"
}).setHideInfo(true).build(), new SelectFEATButton(this, "Gladiators"));
addButton(6, new ItemBuilder(Material.LAVA_BUCKET).setTitle(C.cYellowB + "Micro Battle" + C.cGray + " 4 Team Deathmatch").addLore(new String[]
{
(_extraValue ? C.cAquaB : C.cWhiteB) + "FEATURED ARCADE GAME",
C.Reset + "",
C.Reset + "4 teams stand alone",
C.Reset + "Who shall remain victorious",
C.Reset + "You decide",
C.Reset + "",
C.Reset + "Join " + C.cGreen + getPlugin().getGroupTagPlayerCount("MB") + C.Reset + " other players!"
}).setHideInfo(true).build(), new SelectFEATButton(this, "Micro Battle"));
addButton(6, new ItemBuilder(Material.TNT).setTitle(C.cYellowB + "Bomb Lobbers " + C.cGray + "TNT Mayhem").addLore(new String[]
{
(_extraValue ? C.cAquaB : C.cWhiteB) + "FEATURED ARCADE GAME",
C.Reset + "",
C.Reset + "Fight against your enemies using",
C.Reset + "the power of explosives!",
C.Reset + "",
C.Reset + "Join " + C.cGreen + getPlugin().getGroupTagPlayerCount("BL") + C.Reset + " other players!"
}).setHideInfo(true).build(), new SelectFEATButton(this, "Bomb Lobbers"));
addButton(37, new ItemBuilder(Material.SNOW_BALL).setTitle(C.cYellowB + "Snow Fight " + C.cGray + "Team Survival").addLore(new String[]
{
(_extraValue ? C.cAquaB : C.cWhiteB) + "LIMITED TIME",
C.Reset + "",
C.Reset + "Harness the power of snow",
C.Reset + "to vanquish your enemies in",
C.Reset + "this ULTIMATE snowball fight!",
C.Reset + "",
C.Reset + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("SF") + C.Reset + " other players!",
}).setHideInfo(true).build(), new SelectFEATButton(this, "Snow Fight"));
addButton(43, new ItemBuilder(Material.BOOKSHELF).setTitle(C.cYellowB + "Christmas Chaos " + C.cGray + "Help Save Christmas").addLore(new String[]
{
(_extraValue ? C.cAquaB : C.cWhiteB) + "LIMITED TIME",
C.Reset + "",
C.Reset + "Band together with your friends",
C.Reset + "and help Santa save Christmas from",
C.Reset + "a deadly enemy...",
C.Reset + "",
C.Reset + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("CC") + C.Reset + " other players!",
}).setHideInfo(true).build(), new SelectFEATButton(this, "Christmas Chaos"));
*/
}