LinkedHashMaps, Buttons

This commit is contained in:
Shaun Bennett 2015-12-08 17:45:27 -05:00
parent 7f75749194
commit 2e49611035
4 changed files with 54 additions and 6 deletions

View File

@ -14,12 +14,14 @@ import mineplex.core.donation.DonationManager;
import mineplex.core.itemstack.ItemStackFactory;
import mineplex.core.shop.page.ShopPageBase;
import mineplex.hub.server.ServerManager;
import mineplex.hub.server.ui.button.SelectBHButton;
import mineplex.hub.server.ui.button.SelectBLDButton;
import mineplex.hub.server.ui.button.SelectBRButton;
import mineplex.hub.server.ui.button.SelectCSButton;
import mineplex.hub.server.ui.button.SelectDMTButton;
import mineplex.hub.server.ui.button.SelectDOMButton;
import mineplex.hub.server.ui.button.SelectMINButton;
import mineplex.hub.server.ui.button.SelectMSButton;
import mineplex.hub.server.ui.button.SelectPLAYERButton;
import mineplex.hub.server.ui.button.SelectSGButton;
import mineplex.hub.server.ui.button.SelectSKYButton;
@ -193,9 +195,9 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
getButtonMap().put(8, new SelectWIZButton(this));
getButtonMap().put(18, new SelectCSButton(this));
// getButtonMap().put(20, new SelectBHButton(this));
getButtonMap().put(20, new SelectBHButton(this));
getButtonMap().put(22, new SelectSSMButton(this));
// getButtonMap().put(24, new SelectMSButton(this));
getButtonMap().put(24, new SelectMSButton(this));
getButtonMap().put(26, new SelectDMTButton(this));
getButtonMap().put(36, new SelectDOMButton(this));
getButtonMap().put(38, new SelectTDMButton(this));

View File

@ -0,0 +1,23 @@
package mineplex.hub.server.ui.button;
import org.bukkit.entity.Player;
import org.bukkit.event.inventory.ClickType;
import mineplex.core.shop.item.IButton;
import mineplex.hub.server.ui.ServerGameMenu;
public class SelectBHButton implements IButton
{
private ServerGameMenu _menu;
public SelectBHButton(ServerGameMenu menu)
{
_menu = menu;
}
@Override
public void onClick(Player player, ClickType clickType)
{
_menu.OpenBH(player);
}
}

View File

@ -0,0 +1,23 @@
package mineplex.hub.server.ui.button;
import org.bukkit.entity.Player;
import org.bukkit.event.inventory.ClickType;
import mineplex.core.shop.item.IButton;
import mineplex.hub.server.ui.ServerGameMenu;
public class SelectMSButton implements IButton
{
private ServerGameMenu _menu;
public SelectMSButton(ServerGameMenu menu)
{
_menu = menu;
}
@Override
public void onClick(Player player, ClickType clickType)
{
_menu.openMS(player);
}
}

View File

@ -54,10 +54,10 @@ public class WorldData
public GameType Game = null;
public HashMap<String, ArrayList<Location>> SpawnLocs = new HashMap<String, ArrayList<Location>>();
private HashMap<String, ArrayList<Location>> DataLocs = new HashMap<String, ArrayList<Location>>();
private HashMap<String, ArrayList<Location>> CustomLocs = new HashMap<String, ArrayList<Location>>();
private final Map<String, String> _dataEntries = new HashMap<>();
public HashMap<String, ArrayList<Location>> SpawnLocs = new LinkedHashMap<String, ArrayList<Location>>();
private HashMap<String, ArrayList<Location>> DataLocs = new LinkedHashMap<String, ArrayList<Location>>();
private HashMap<String, ArrayList<Location>> CustomLocs = new LinkedHashMap<String, ArrayList<Location>>();
private final Map<String, String> _dataEntries = new LinkedHashMap<>();
public WorldData(Game game)
{