Manually open clans ui
This commit is contained in:
parent
6f4d68087f
commit
6bc167fca7
@ -3,6 +3,7 @@ package mineplex.hub.server.ui.clans;
|
||||
import mineplex.core.account.CoreClientManager;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.donation.DonationManager;
|
||||
import mineplex.core.newnpc.event.NPCInteractEvent;
|
||||
import mineplex.core.party.Party;
|
||||
import mineplex.core.shop.ShopBase;
|
||||
import mineplex.core.shop.page.ShopPageBase;
|
||||
@ -10,9 +11,13 @@ import mineplex.hub.server.ServerManager;
|
||||
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
|
||||
public class ClansServerShop extends ShopBase<ServerManager>
|
||||
{
|
||||
|
||||
private static final String NPC_METADATA = "GAME_Clans";
|
||||
|
||||
public ClansServerShop(ServerManager plugin, CoreClientManager clientManager, DonationManager donationManager)
|
||||
{
|
||||
super(plugin, clientManager, donationManager, "Clans");
|
||||
@ -48,4 +53,13 @@ public class ClansServerShop extends ShopBase<ServerManager>
|
||||
{
|
||||
getPlugin().getHubManager().GetVisibility().removeHiddenPlayer(player);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void npcInteract(NPCInteractEvent event)
|
||||
{
|
||||
if (event.getNpc().getMetadata().equals(NPC_METADATA))
|
||||
{
|
||||
attemptShopOpen(event.getPlayer());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user