Refactoring private server menu
This commit is contained in:
parent
d19431a47f
commit
a63c48e338
@ -32,7 +32,7 @@ import nautilus.game.arcade.ArcadeManager;
|
|||||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||||
import nautilus.game.arcade.game.Game;
|
import nautilus.game.arcade.game.Game;
|
||||||
import nautilus.game.arcade.game.GameTeam;
|
import nautilus.game.arcade.game.GameTeam;
|
||||||
import nautilus.game.arcade.gui.SpectatorShop;
|
import nautilus.game.arcade.gui.spectatorMenu.SpectatorShop;
|
||||||
|
|
||||||
public class CompassAddon extends MiniPlugin
|
public class CompassAddon extends MiniPlugin
|
||||||
{
|
{
|
||||||
|
@ -1,30 +0,0 @@
|
|||||||
package nautilus.game.arcade.gui;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.Material;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.inventory.ItemStack;
|
|
||||||
import org.bukkit.inventory.meta.SkullMeta;
|
|
||||||
|
|
||||||
import mineplex.core.account.CoreClientManager;
|
|
||||||
import mineplex.core.donation.DonationManager;
|
|
||||||
import mineplex.core.shop.ShopBase;
|
|
||||||
import mineplex.core.shop.page.ShopPageBase;
|
|
||||||
import nautilus.game.arcade.ArcadeManager;
|
|
||||||
import nautilus.game.arcade.gui.page.GameHostMenuPage;
|
|
||||||
|
|
||||||
public class GameHostShop extends ShopBase<ArcadeManager>
|
|
||||||
{
|
|
||||||
public GameHostShop(ArcadeManager plugin, CoreClientManager clientManager, DonationManager donationManager)
|
|
||||||
{
|
|
||||||
super(plugin, clientManager, donationManager, "Private Server Menu");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected ShopPageBase<ArcadeManager, ? extends ShopBase<ArcadeManager>> BuildPagesFor(Player player)
|
|
||||||
{
|
|
||||||
return new GameHostMenuPage(Plugin, this, player);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,28 +0,0 @@
|
|||||||
package nautilus.game.arcade.gui.button;
|
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.event.inventory.ClickType;
|
|
||||||
|
|
||||||
import mineplex.core.shop.item.IButton;
|
|
||||||
import nautilus.game.arcade.ArcadeManager;
|
|
||||||
import nautilus.game.arcade.gui.GameHostShop;
|
|
||||||
import nautilus.game.arcade.gui.page.GameHostOptionsPage;
|
|
||||||
import nautilus.game.arcade.gui.page.GiveAdminPage;
|
|
||||||
|
|
||||||
public class GameSettingsButton implements IButton
|
|
||||||
{
|
|
||||||
private ArcadeManager _arcadeManager;
|
|
||||||
private GameHostShop _shop;
|
|
||||||
|
|
||||||
public GameSettingsButton(ArcadeManager arcadeManager, GameHostShop shop)
|
|
||||||
{
|
|
||||||
_shop = shop;
|
|
||||||
_arcadeManager = arcadeManager;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onClick(Player player, ClickType clickType)
|
|
||||||
{
|
|
||||||
_shop.OpenPageForPlayer(player, new GameHostOptionsPage(_arcadeManager, _shop, player));
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,24 @@
|
|||||||
|
package nautilus.game.arcade.gui.privateServer;
|
||||||
|
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import mineplex.core.account.CoreClientManager;
|
||||||
|
import mineplex.core.donation.DonationManager;
|
||||||
|
import mineplex.core.shop.ShopBase;
|
||||||
|
import mineplex.core.shop.page.ShopPageBase;
|
||||||
|
import nautilus.game.arcade.ArcadeManager;
|
||||||
|
import nautilus.game.arcade.gui.privateServer.page.MenuPage;
|
||||||
|
|
||||||
|
public class PrivateServerShop extends ShopBase<ArcadeManager>
|
||||||
|
{
|
||||||
|
public PrivateServerShop(ArcadeManager plugin, CoreClientManager clientManager, DonationManager donationManager)
|
||||||
|
{
|
||||||
|
super(plugin, clientManager, donationManager, "Private Server Menu");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected ShopPageBase<ArcadeManager, ? extends ShopBase<ArcadeManager>> BuildPagesFor(Player player)
|
||||||
|
{
|
||||||
|
return new MenuPage(Plugin, this, player);
|
||||||
|
}
|
||||||
|
}
|
@ -1,19 +1,19 @@
|
|||||||
package nautilus.game.arcade.gui.button;
|
package nautilus.game.arcade.gui.privateServer.button;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.inventory.ClickType;
|
import org.bukkit.event.inventory.ClickType;
|
||||||
|
|
||||||
import mineplex.core.shop.item.IButton;
|
import mineplex.core.shop.item.IButton;
|
||||||
import nautilus.game.arcade.ArcadeManager;
|
import nautilus.game.arcade.ArcadeManager;
|
||||||
import nautilus.game.arcade.gui.GameHostShop;
|
import nautilus.game.arcade.gui.privateServer.PrivateServerShop;
|
||||||
import nautilus.game.arcade.gui.page.BanPage;
|
import nautilus.game.arcade.gui.privateServer.page.BanPage;
|
||||||
|
|
||||||
public class BanButton implements IButton
|
public class BanButton implements IButton
|
||||||
{
|
{
|
||||||
private ArcadeManager _arcadeManager;
|
private ArcadeManager _arcadeManager;
|
||||||
private GameHostShop _shop;
|
private PrivateServerShop _shop;
|
||||||
|
|
||||||
public BanButton(ArcadeManager arcadeManager, GameHostShop shop)
|
public BanButton(ArcadeManager arcadeManager, PrivateServerShop shop)
|
||||||
{
|
{
|
||||||
_shop = shop;
|
_shop = shop;
|
||||||
_arcadeManager = arcadeManager;
|
_arcadeManager = arcadeManager;
|
@ -1,19 +1,19 @@
|
|||||||
package nautilus.game.arcade.gui.button;
|
package nautilus.game.arcade.gui.privateServer.button;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.inventory.ClickType;
|
import org.bukkit.event.inventory.ClickType;
|
||||||
|
|
||||||
import mineplex.core.shop.item.IButton;
|
import mineplex.core.shop.item.IButton;
|
||||||
import nautilus.game.arcade.ArcadeManager;
|
import nautilus.game.arcade.ArcadeManager;
|
||||||
import nautilus.game.arcade.gui.GameHostShop;
|
import nautilus.game.arcade.gui.privateServer.PrivateServerShop;
|
||||||
import nautilus.game.arcade.gui.page.EditRotationPage;
|
import nautilus.game.arcade.gui.privateServer.page.EditRotationPage;
|
||||||
|
|
||||||
public class EditRotationButton implements IButton
|
public class EditRotationButton implements IButton
|
||||||
{
|
{
|
||||||
private ArcadeManager _arcadeManager;
|
private ArcadeManager _arcadeManager;
|
||||||
private GameHostShop _shop;
|
private PrivateServerShop _shop;
|
||||||
|
|
||||||
public EditRotationButton(ArcadeManager arcadeManager, GameHostShop shop)
|
public EditRotationButton(ArcadeManager arcadeManager, PrivateServerShop shop)
|
||||||
{
|
{
|
||||||
_shop = shop;
|
_shop = shop;
|
||||||
_arcadeManager = arcadeManager;
|
_arcadeManager = arcadeManager;
|
@ -1,19 +1,19 @@
|
|||||||
package nautilus.game.arcade.gui.button;
|
package nautilus.game.arcade.gui.privateServer.button;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.inventory.ClickType;
|
import org.bukkit.event.inventory.ClickType;
|
||||||
|
|
||||||
import mineplex.core.shop.item.IButton;
|
import mineplex.core.shop.item.IButton;
|
||||||
import nautilus.game.arcade.ArcadeManager;
|
import nautilus.game.arcade.ArcadeManager;
|
||||||
import nautilus.game.arcade.gui.GameHostShop;
|
import nautilus.game.arcade.gui.privateServer.PrivateServerShop;
|
||||||
import nautilus.game.arcade.gui.page.GiveAdminPage;
|
import nautilus.game.arcade.gui.privateServer.page.GiveAdminPage;
|
||||||
|
|
||||||
public class GiveAdminButton implements IButton
|
public class GiveAdminButton implements IButton
|
||||||
{
|
{
|
||||||
private ArcadeManager _arcadeManager;
|
private ArcadeManager _arcadeManager;
|
||||||
private GameHostShop _shop;
|
private PrivateServerShop _shop;
|
||||||
|
|
||||||
public GiveAdminButton(ArcadeManager arcadeManager, GameHostShop shop)
|
public GiveAdminButton(ArcadeManager arcadeManager, PrivateServerShop shop)
|
||||||
{
|
{
|
||||||
_shop = shop;
|
_shop = shop;
|
||||||
_arcadeManager = arcadeManager;
|
_arcadeManager = arcadeManager;
|
@ -0,0 +1,27 @@
|
|||||||
|
package nautilus.game.arcade.gui.privateServer.button;
|
||||||
|
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.event.inventory.ClickType;
|
||||||
|
|
||||||
|
import mineplex.core.shop.item.IButton;
|
||||||
|
import nautilus.game.arcade.ArcadeManager;
|
||||||
|
import nautilus.game.arcade.gui.privateServer.PrivateServerShop;
|
||||||
|
import nautilus.game.arcade.gui.privateServer.page.OptionsPage;
|
||||||
|
|
||||||
|
public class OptionsButton implements IButton
|
||||||
|
{
|
||||||
|
private ArcadeManager _arcadeManager;
|
||||||
|
private PrivateServerShop _shop;
|
||||||
|
|
||||||
|
public OptionsButton(ArcadeManager arcadeManager, PrivateServerShop shop)
|
||||||
|
{
|
||||||
|
_shop = shop;
|
||||||
|
_arcadeManager = arcadeManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(Player player, ClickType clickType)
|
||||||
|
{
|
||||||
|
_shop.OpenPageForPlayer(player, new OptionsPage(_arcadeManager, _shop, player));
|
||||||
|
}
|
||||||
|
}
|
@ -1,19 +1,19 @@
|
|||||||
package nautilus.game.arcade.gui.button;
|
package nautilus.game.arcade.gui.privateServer.button;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.inventory.ClickType;
|
import org.bukkit.event.inventory.ClickType;
|
||||||
|
|
||||||
import mineplex.core.shop.item.IButton;
|
import mineplex.core.shop.item.IButton;
|
||||||
import nautilus.game.arcade.ArcadeManager;
|
import nautilus.game.arcade.ArcadeManager;
|
||||||
import nautilus.game.arcade.gui.GameHostShop;
|
import nautilus.game.arcade.gui.privateServer.PrivateServerShop;
|
||||||
import nautilus.game.arcade.gui.page.SetGamePage;
|
import nautilus.game.arcade.gui.privateServer.page.SetGamePage;
|
||||||
|
|
||||||
public class SetGameButton implements IButton
|
public class SetGameButton implements IButton
|
||||||
{
|
{
|
||||||
private ArcadeManager _arcadeManager;
|
private ArcadeManager _arcadeManager;
|
||||||
private GameHostShop _shop;
|
private PrivateServerShop _shop;
|
||||||
|
|
||||||
public SetGameButton(ArcadeManager arcadeManager, GameHostShop shop)
|
public SetGameButton(ArcadeManager arcadeManager, PrivateServerShop shop)
|
||||||
{
|
{
|
||||||
_shop = shop;
|
_shop = shop;
|
||||||
_arcadeManager = arcadeManager;
|
_arcadeManager = arcadeManager;
|
@ -1,20 +1,19 @@
|
|||||||
package nautilus.game.arcade.gui.button;
|
package nautilus.game.arcade.gui.privateServer.button;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.inventory.ClickType;
|
import org.bukkit.event.inventory.ClickType;
|
||||||
|
|
||||||
import mineplex.core.shop.item.IButton;
|
import mineplex.core.shop.item.IButton;
|
||||||
import nautilus.game.arcade.ArcadeManager;
|
import nautilus.game.arcade.ArcadeManager;
|
||||||
import nautilus.game.arcade.gui.GameHostShop;
|
import nautilus.game.arcade.gui.privateServer.PrivateServerShop;
|
||||||
import nautilus.game.arcade.gui.page.BanPage;
|
import nautilus.game.arcade.gui.privateServer.page.UnbanPage;
|
||||||
import nautilus.game.arcade.gui.page.UnbanPage;
|
|
||||||
|
|
||||||
public class UnbanButton implements IButton
|
public class UnbanButton implements IButton
|
||||||
{
|
{
|
||||||
private ArcadeManager _arcadeManager;
|
private ArcadeManager _arcadeManager;
|
||||||
private GameHostShop _shop;
|
private PrivateServerShop _shop;
|
||||||
|
|
||||||
public UnbanButton(ArcadeManager arcadeManager, GameHostShop shop)
|
public UnbanButton(ArcadeManager arcadeManager, PrivateServerShop shop)
|
||||||
{
|
{
|
||||||
_shop = shop;
|
_shop = shop;
|
||||||
_arcadeManager = arcadeManager;
|
_arcadeManager = arcadeManager;
|
@ -1,12 +1,12 @@
|
|||||||
package nautilus.game.arcade.gui.page;
|
package nautilus.game.arcade.gui.privateServer.page;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import nautilus.game.arcade.ArcadeManager;
|
import nautilus.game.arcade.ArcadeManager;
|
||||||
import nautilus.game.arcade.gui.GameHostShop;
|
import nautilus.game.arcade.gui.privateServer.PrivateServerShop;
|
||||||
|
|
||||||
public class BanPage extends PlayerPage
|
public class BanPage extends PlayerPage
|
||||||
{
|
{
|
||||||
public BanPage(ArcadeManager plugin, GameHostShop shop, Player player)
|
public BanPage(ArcadeManager plugin, PrivateServerShop shop, Player player)
|
||||||
{
|
{
|
||||||
super(plugin, shop, "Ban Players", player);
|
super(plugin, shop, "Ban Players", player);
|
||||||
BuildPage();
|
BuildPage();
|
@ -1,7 +1,6 @@
|
|||||||
package nautilus.game.arcade.gui.page;
|
package nautilus.game.arcade.gui.privateServer.page;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.function.Consumer;
|
|
||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -14,19 +13,19 @@ import mineplex.core.shop.item.IButton;
|
|||||||
import mineplex.core.shop.item.ShopItem;
|
import mineplex.core.shop.item.ShopItem;
|
||||||
import mineplex.core.shop.page.ShopPageBase;
|
import mineplex.core.shop.page.ShopPageBase;
|
||||||
import nautilus.game.arcade.ArcadeManager;
|
import nautilus.game.arcade.ArcadeManager;
|
||||||
import nautilus.game.arcade.gui.GameHostShop;
|
import nautilus.game.arcade.gui.privateServer.PrivateServerShop;
|
||||||
import nautilus.game.arcade.managers.GameHostManager;
|
import nautilus.game.arcade.managers.GameHostManager;
|
||||||
|
|
||||||
public abstract class GameHostPage extends ShopPageBase<ArcadeManager, GameHostShop>
|
public abstract class BasePage extends ShopPageBase<ArcadeManager, PrivateServerShop>
|
||||||
{
|
{
|
||||||
protected GameHostManager _manager;
|
protected GameHostManager _manager;
|
||||||
|
|
||||||
public GameHostPage(ArcadeManager plugin, GameHostShop shop, String pageName, Player player)
|
public BasePage(ArcadeManager plugin, PrivateServerShop shop, String pageName, Player player)
|
||||||
{
|
{
|
||||||
this(plugin, shop, pageName, player, 54);
|
this(plugin, shop, pageName, player, 54);
|
||||||
}
|
}
|
||||||
|
|
||||||
public GameHostPage(ArcadeManager plugin, GameHostShop shop, String pageName, Player player, int slots)
|
public BasePage(ArcadeManager plugin, PrivateServerShop shop, String pageName, Player player, int slots)
|
||||||
{
|
{
|
||||||
super(plugin, shop, plugin.GetClients(), plugin.GetDonation(), pageName, player, slots);
|
super(plugin, shop, plugin.GetClients(), plugin.GetDonation(), pageName, player, slots);
|
||||||
|
|
||||||
@ -40,7 +39,7 @@ public abstract class GameHostPage extends ShopPageBase<ArcadeManager, GameHostS
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(Player player, ClickType clickType)
|
public void onClick(Player player, ClickType clickType)
|
||||||
{
|
{
|
||||||
Shop.OpenPageForPlayer(player, new GameHostMenuPage(Plugin, Shop, player));
|
Shop.OpenPageForPlayer(player, new MenuPage(Plugin, Shop, player));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.gui.page;
|
package nautilus.game.arcade.gui.privateServer.page;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -11,11 +11,11 @@ import mineplex.core.shop.item.IButton;
|
|||||||
import mineplex.core.shop.item.ShopItem;
|
import mineplex.core.shop.item.ShopItem;
|
||||||
import nautilus.game.arcade.ArcadeManager;
|
import nautilus.game.arcade.ArcadeManager;
|
||||||
import nautilus.game.arcade.GameType;
|
import nautilus.game.arcade.GameType;
|
||||||
import nautilus.game.arcade.gui.GameHostShop;
|
import nautilus.game.arcade.gui.privateServer.PrivateServerShop;
|
||||||
|
|
||||||
public class EditRotationPage extends GameHostPage
|
public class EditRotationPage extends BasePage
|
||||||
{
|
{
|
||||||
public EditRotationPage(ArcadeManager plugin, GameHostShop shop, Player player)
|
public EditRotationPage(ArcadeManager plugin, PrivateServerShop shop, Player player)
|
||||||
{
|
{
|
||||||
super(plugin, shop, "Edit Rotation", player);
|
super(plugin, shop, "Edit Rotation", player);
|
||||||
BuildPage();
|
BuildPage();
|
@ -1,13 +1,13 @@
|
|||||||
package nautilus.game.arcade.gui.page;
|
package nautilus.game.arcade.gui.privateServer.page;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import nautilus.game.arcade.ArcadeManager;
|
import nautilus.game.arcade.ArcadeManager;
|
||||||
import nautilus.game.arcade.gui.GameHostShop;
|
import nautilus.game.arcade.gui.privateServer.PrivateServerShop;
|
||||||
|
|
||||||
public class GiveAdminPage extends PlayerPage
|
public class GiveAdminPage extends PlayerPage
|
||||||
{
|
{
|
||||||
public GiveAdminPage(ArcadeManager plugin, GameHostShop shop, Player player)
|
public GiveAdminPage(ArcadeManager plugin, PrivateServerShop shop, Player player)
|
||||||
{
|
{
|
||||||
super(plugin, shop, "Give Admin", player);
|
super(plugin, shop, "Give Admin", player);
|
||||||
BuildPage();
|
BuildPage();
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.gui.page;
|
package nautilus.game.arcade.gui.privateServer.page;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
@ -7,18 +7,17 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
|
|
||||||
import mineplex.core.shop.item.ShopItem;
|
import mineplex.core.shop.item.ShopItem;
|
||||||
import nautilus.game.arcade.ArcadeManager;
|
import nautilus.game.arcade.ArcadeManager;
|
||||||
import nautilus.game.arcade.gui.GameHostShop;
|
import nautilus.game.arcade.gui.privateServer.PrivateServerShop;
|
||||||
import nautilus.game.arcade.gui.button.BanButton;
|
import nautilus.game.arcade.gui.privateServer.button.BanButton;
|
||||||
import nautilus.game.arcade.gui.button.EditRotationButton;
|
import nautilus.game.arcade.gui.privateServer.button.EditRotationButton;
|
||||||
import nautilus.game.arcade.gui.button.GiveAdminButton;
|
import nautilus.game.arcade.gui.privateServer.button.GiveAdminButton;
|
||||||
import nautilus.game.arcade.gui.button.SetGameButton;
|
import nautilus.game.arcade.gui.privateServer.button.SetGameButton;
|
||||||
import nautilus.game.arcade.gui.button.GameSettingsButton;
|
import nautilus.game.arcade.gui.privateServer.button.OptionsButton;
|
||||||
import nautilus.game.arcade.gui.button.UnbanButton;
|
import nautilus.game.arcade.gui.privateServer.button.UnbanButton;
|
||||||
import nautilus.game.arcade.managers.GameHostManager;
|
|
||||||
|
|
||||||
public class GameHostMenuPage extends GameHostPage
|
public class MenuPage extends BasePage
|
||||||
{
|
{
|
||||||
public GameHostMenuPage(ArcadeManager plugin, GameHostShop shop, Player player)
|
public MenuPage(ArcadeManager plugin, PrivateServerShop shop, Player player)
|
||||||
{
|
{
|
||||||
super(plugin, shop, "Private Server Menu", player, 9*3);
|
super(plugin, shop, "Private Server Menu", player, 9*3);
|
||||||
BuildPage();
|
BuildPage();
|
||||||
@ -39,8 +38,8 @@ public class GameHostMenuPage extends GameHostPage
|
|||||||
GiveAdminButton giveAdminButton = new GiveAdminButton(Plugin, Shop);
|
GiveAdminButton giveAdminButton = new GiveAdminButton(Plugin, Shop);
|
||||||
AddButton(3 + 9, new ShopItem(Material.ENDER_CHEST, "Give Admin", new String[] {}, 1, false), giveAdminButton);
|
AddButton(3 + 9, new ShopItem(Material.ENDER_CHEST, "Give Admin", new String[] {}, 1, false), giveAdminButton);
|
||||||
|
|
||||||
GameSettingsButton gameSettingsButton = new GameSettingsButton(Plugin, Shop);
|
OptionsButton optionsButton = new OptionsButton(Plugin, Shop);
|
||||||
AddButton(5 + 9, new ShopItem(Material.LEVER, "Toggle Game Settings", new String[] {}, 1, false), gameSettingsButton);
|
AddButton(5 + 9, new ShopItem(Material.LEVER, "Toggle Game Settings", new String[] {}, 1, false), optionsButton);
|
||||||
|
|
||||||
BanButton banButton = new BanButton(Plugin, Shop);
|
BanButton banButton = new BanButton(Plugin, Shop);
|
||||||
AddButton(7 + 9, new ShopItem(Material.MONSTER_EGG, "Ban Player", new String[] {}, 1, false), banButton);
|
AddButton(7 + 9, new ShopItem(Material.MONSTER_EGG, "Ban Player", new String[] {}, 1, false), banButton);
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.gui.page;
|
package nautilus.game.arcade.gui.privateServer.page;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
@ -9,13 +9,13 @@ import mineplex.core.shop.item.IButton;
|
|||||||
import mineplex.core.shop.item.ShopItem;
|
import mineplex.core.shop.item.ShopItem;
|
||||||
import nautilus.game.arcade.ArcadeManager;
|
import nautilus.game.arcade.ArcadeManager;
|
||||||
import nautilus.game.arcade.game.GameServerConfig;
|
import nautilus.game.arcade.game.GameServerConfig;
|
||||||
import nautilus.game.arcade.gui.GameHostShop;
|
import nautilus.game.arcade.gui.privateServer.PrivateServerShop;
|
||||||
|
|
||||||
public class GameHostOptionsPage extends GameHostPage
|
public class OptionsPage extends BasePage
|
||||||
{
|
{
|
||||||
private GameServerConfig _config;
|
private GameServerConfig _config;
|
||||||
|
|
||||||
public GameHostOptionsPage(ArcadeManager plugin, GameHostShop shop, Player player)
|
public OptionsPage(ArcadeManager plugin, PrivateServerShop shop, Player player)
|
||||||
{
|
{
|
||||||
super(plugin, shop, "Game Options", player);
|
super(plugin, shop, "Game Options", player);
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.gui.page;
|
package nautilus.game.arcade.gui.privateServer.page;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -9,11 +9,11 @@ import mineplex.core.common.util.C;
|
|||||||
import mineplex.core.common.util.UtilServer;
|
import mineplex.core.common.util.UtilServer;
|
||||||
import mineplex.core.shop.item.IButton;
|
import mineplex.core.shop.item.IButton;
|
||||||
import nautilus.game.arcade.ArcadeManager;
|
import nautilus.game.arcade.ArcadeManager;
|
||||||
import nautilus.game.arcade.gui.GameHostShop;
|
import nautilus.game.arcade.gui.privateServer.PrivateServerShop;
|
||||||
|
|
||||||
public abstract class PlayerPage extends GameHostPage
|
public abstract class PlayerPage extends BasePage
|
||||||
{
|
{
|
||||||
public PlayerPage(ArcadeManager plugin, GameHostShop shop, String pageName, Player player)
|
public PlayerPage(ArcadeManager plugin, PrivateServerShop shop, String pageName, Player player)
|
||||||
{
|
{
|
||||||
super(plugin, shop, pageName, player);
|
super(plugin, shop, pageName, player);
|
||||||
}
|
}
|
@ -1,6 +1,4 @@
|
|||||||
package nautilus.game.arcade.gui.page;
|
package nautilus.game.arcade.gui.privateServer.page;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -11,11 +9,11 @@ import mineplex.core.shop.item.IButton;
|
|||||||
import mineplex.core.shop.item.ShopItem;
|
import mineplex.core.shop.item.ShopItem;
|
||||||
import nautilus.game.arcade.ArcadeManager;
|
import nautilus.game.arcade.ArcadeManager;
|
||||||
import nautilus.game.arcade.GameType;
|
import nautilus.game.arcade.GameType;
|
||||||
import nautilus.game.arcade.gui.GameHostShop;
|
import nautilus.game.arcade.gui.privateServer.PrivateServerShop;
|
||||||
|
|
||||||
public class SetGamePage extends GameHostPage
|
public class SetGamePage extends BasePage
|
||||||
{
|
{
|
||||||
public SetGamePage(ArcadeManager plugin, GameHostShop shop, Player player)
|
public SetGamePage(ArcadeManager plugin, PrivateServerShop shop, Player player)
|
||||||
{
|
{
|
||||||
super(plugin, shop, "Set Game", player);
|
super(plugin, shop, "Set Game", player);
|
||||||
BuildPage();
|
BuildPage();
|
||||||
@ -44,7 +42,7 @@ public class SetGamePage extends GameHostPage
|
|||||||
public void onClick(Player player, ClickType clickType)
|
public void onClick(Player player, ClickType clickType)
|
||||||
{
|
{
|
||||||
Plugin.GetGame().setGame(type, player, true);
|
Plugin.GetGame().setGame(type, player, true);
|
||||||
Player.closeInventory();
|
org.bukkit.entity.Player.closeInventory();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.gui.page;
|
package nautilus.game.arcade.gui.privateServer.page;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
@ -11,11 +11,11 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
import mineplex.core.common.util.C;
|
import mineplex.core.common.util.C;
|
||||||
import mineplex.core.shop.item.IButton;
|
import mineplex.core.shop.item.IButton;
|
||||||
import nautilus.game.arcade.ArcadeManager;
|
import nautilus.game.arcade.ArcadeManager;
|
||||||
import nautilus.game.arcade.gui.GameHostShop;
|
import nautilus.game.arcade.gui.privateServer.PrivateServerShop;
|
||||||
|
|
||||||
public class UnbanPage extends GameHostPage
|
public class UnbanPage extends BasePage
|
||||||
{
|
{
|
||||||
public UnbanPage(ArcadeManager plugin, GameHostShop shop, Player player)
|
public UnbanPage(ArcadeManager plugin, PrivateServerShop shop, Player player)
|
||||||
{
|
{
|
||||||
super(plugin, shop, "Unban Players", player);
|
super(plugin, shop, "Unban Players", player);
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package nautilus.game.arcade.gui;
|
package nautilus.game.arcade.gui.spectatorMenu;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import mineplex.core.account.CoreClientManager;
|
import mineplex.core.account.CoreClientManager;
|
||||||
@ -8,7 +8,7 @@ import mineplex.core.shop.ShopBase;
|
|||||||
import mineplex.core.shop.page.ShopPageBase;
|
import mineplex.core.shop.page.ShopPageBase;
|
||||||
import nautilus.game.arcade.ArcadeManager;
|
import nautilus.game.arcade.ArcadeManager;
|
||||||
import nautilus.game.arcade.addons.CompassAddon;
|
import nautilus.game.arcade.addons.CompassAddon;
|
||||||
import nautilus.game.arcade.gui.page.SpectatorPage;
|
import nautilus.game.arcade.gui.spectatorMenu.page.SpectatorPage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by shaun on 14-09-24.
|
* Created by shaun on 14-09-24.
|
@ -1,6 +1,5 @@
|
|||||||
package nautilus.game.arcade.gui.button;
|
package nautilus.game.arcade.gui.spectatorMenu.button;
|
||||||
|
|
||||||
import org.bukkit.GameMode;
|
|
||||||
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.inventory.ClickType;
|
import org.bukkit.event.inventory.ClickType;
|
@ -1,17 +1,15 @@
|
|||||||
package nautilus.game.arcade.gui.page;
|
package nautilus.game.arcade.gui.spectatorMenu.page;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.meta.ItemMeta;
|
import org.bukkit.inventory.meta.ItemMeta;
|
||||||
import org.bukkit.inventory.meta.SkullMeta;
|
import org.bukkit.inventory.meta.SkullMeta;
|
||||||
import org.bukkit.scoreboard.Team;
|
|
||||||
|
|
||||||
import mineplex.core.account.CoreClientManager;
|
import mineplex.core.account.CoreClientManager;
|
||||||
import mineplex.core.common.util.C;
|
import mineplex.core.common.util.C;
|
||||||
@ -23,8 +21,8 @@ import mineplex.core.shop.page.ShopPageBase;
|
|||||||
import nautilus.game.arcade.ArcadeManager;
|
import nautilus.game.arcade.ArcadeManager;
|
||||||
import nautilus.game.arcade.addons.CompassAddon;
|
import nautilus.game.arcade.addons.CompassAddon;
|
||||||
import nautilus.game.arcade.game.GameTeam;
|
import nautilus.game.arcade.game.GameTeam;
|
||||||
import nautilus.game.arcade.gui.SpectatorShop;
|
import nautilus.game.arcade.gui.spectatorMenu.SpectatorShop;
|
||||||
import nautilus.game.arcade.gui.button.SpectatorButton;
|
import nautilus.game.arcade.gui.spectatorMenu.button.SpectatorButton;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by shaun on 14-09-24.
|
* Created by shaun on 14-09-24.
|
@ -4,7 +4,6 @@ import java.util.ArrayList;
|
|||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.sun.org.apache.xpath.internal.SourceTree;
|
|
||||||
import mineplex.core.common.Rank;
|
import mineplex.core.common.Rank;
|
||||||
import mineplex.core.common.util.C;
|
import mineplex.core.common.util.C;
|
||||||
import mineplex.core.common.util.F;
|
import mineplex.core.common.util.F;
|
||||||
@ -17,7 +16,7 @@ import mineplex.core.updater.event.UpdateEvent;
|
|||||||
import nautilus.game.arcade.ArcadeManager;
|
import nautilus.game.arcade.ArcadeManager;
|
||||||
import nautilus.game.arcade.GameType;
|
import nautilus.game.arcade.GameType;
|
||||||
import nautilus.game.arcade.game.Game.GameState;
|
import nautilus.game.arcade.game.Game.GameState;
|
||||||
import nautilus.game.arcade.gui.GameHostShop;
|
import nautilus.game.arcade.gui.privateServer.PrivateServerShop;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
@ -49,12 +48,12 @@ public class GameHostManager implements Listener
|
|||||||
private HashSet<String> _whitelist = new HashSet<String>();
|
private HashSet<String> _whitelist = new HashSet<String>();
|
||||||
private HashSet<String> _blacklist = new HashSet<String>();
|
private HashSet<String> _blacklist = new HashSet<String>();
|
||||||
|
|
||||||
private GameHostShop _shop;
|
private PrivateServerShop _shop;
|
||||||
|
|
||||||
public GameHostManager(ArcadeManager manager)
|
public GameHostManager(ArcadeManager manager)
|
||||||
{
|
{
|
||||||
Manager = manager;
|
Manager = manager;
|
||||||
_shop = new GameHostShop(manager, manager.GetClients(), manager.GetDonation());
|
_shop = new PrivateServerShop(manager, manager.GetClients(), manager.GetDonation());
|
||||||
Manager.GetPluginManager().registerEvents(this, Manager.GetPlugin());
|
Manager.GetPluginManager().registerEvents(this, Manager.GetPlugin());
|
||||||
|
|
||||||
//Ultra Games
|
//Ultra Games
|
||||||
|
Loading…
Reference in New Issue
Block a user