Add Super Smash Mobs Training to compass and NPC menus
This commit is contained in:
parent
3794686f58
commit
f565b0a9db
@ -25,7 +25,6 @@ public class ServerNpcShop extends ShopBase<ServerManager>
|
||||
{
|
||||
switch (_serverGroup.getPrefix().toUpperCase())
|
||||
{
|
||||
case "SSM":
|
||||
case "SKY":
|
||||
case "HG":
|
||||
return new ServerTypePage(getPlugin(), this, getClientManager(), getDonationManager(), player, _serverGroup);
|
||||
@ -39,6 +38,9 @@ public class ServerNpcShop extends ShopBase<ServerManager>
|
||||
case "SF":
|
||||
return new SkyfallServerTypePage(getPlugin(), this, getClientManager(), getDonationManager(), player);
|
||||
|
||||
case "SSM":
|
||||
return new SuperSmashMobsServerTypePage(getPlugin(), this, getClientManager(), getDonationManager(), player, _serverGroup);
|
||||
|
||||
default:
|
||||
return new ServerNpcPage(getPlugin(), this, getClientManager(), getDonationManager(), _serverGroup.getServerNpcName(), player, _serverGroup.getPrefix());
|
||||
}
|
||||
|
@ -0,0 +1,54 @@
|
||||
package mineplex.hub.server.ui;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import mineplex.core.account.CoreClientManager;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.donation.DonationManager;
|
||||
import mineplex.core.itemstack.ItemBuilder;
|
||||
import mineplex.core.shop.page.ShopPageBase;
|
||||
import mineplex.hub.server.ServerManager;
|
||||
import mineplex.serverdata.data.ServerGroup;
|
||||
|
||||
public class SuperSmashMobsServerTypePage extends ShopPageBase<ServerManager, ServerNpcShop>
|
||||
|
||||
{
|
||||
private final ServerGroup _serverGroup;
|
||||
|
||||
public SuperSmashMobsServerTypePage(ServerManager plugin, ServerNpcShop shop, CoreClientManager clientManager,
|
||||
DonationManager donationManager, Player player, ServerGroup group)
|
||||
{
|
||||
super(plugin, shop, clientManager, donationManager, "Super Smash Mobs ", player, 27);
|
||||
_serverGroup = group;
|
||||
|
||||
buildPage();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void buildPage()
|
||||
{
|
||||
setItem(12, new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 4).setTitle(C.Reset + C.cGold + "Play " + C.cYellow + "Super Smash Mobs")
|
||||
.addLore(new String[]
|
||||
{
|
||||
C.Reset + "",
|
||||
C.Reset + C.cGreen + "Click to Play",
|
||||
}).build());
|
||||
|
||||
setItem(14, new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 3).setTitle(C.Reset + C.cYellow + "Super Smash Mobs " + C.cGold + "Training")
|
||||
.addLore(new String[]
|
||||
{
|
||||
C.Reset + "",
|
||||
C.Reset + C.cGreen + "Click to Play",
|
||||
}).build());
|
||||
|
||||
getButtonMap().put(12, (player, __) -> getShop().openPageForPlayer(player, new ServerTypePage(getPlugin(), getShop(), getClientManager(), getDonationManager(), player, _serverGroup)));
|
||||
getButtonMap().put(14, (player, __) -> getShop().openPageForPlayer(player, new ServerNpcPage(getPlugin(), getShop(), getClientManager(), getDonationManager(), "SSM Training", player, "SSMT")));
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
getButtonMap().clear();
|
||||
buildPage();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user