public class GroupMenu extends java.lang.Object implements WauzInventory
WauzPlayerGroup| Constructor and Description |
|---|
GroupMenu() |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<WauzMode> |
getGamemodes() |
java.lang.String |
getInventoryId() |
void |
handlePlayerInteractions(org.bukkit.entity.Player player,
org.bukkit.inventory.ItemStack clicked)
Handles a player head or option interaction.
|
private void |
kickPlayer(org.bukkit.entity.Player player,
org.bukkit.entity.Player target)
Kicks a player out of the group.
|
static void |
open(org.bukkit.entity.Player player)
Opens the menu for the given player.
|
void |
openInstance(org.bukkit.entity.Player player)
Opens a new inventory of this type for the given player.
|
static void |
passwordInput(org.bukkit.entity.Player player,
java.lang.String groupUuidString,
java.lang.String passwordString)
Opens an menu to input a password for a group creation or join.
|
static void |
playerSelection(org.bukkit.entity.Player player,
boolean promote)
Opens a view, showing all members of the player's group.
|
private void |
promotePlayer(org.bukkit.entity.Player player,
org.bukkit.entity.Player target)
Promotes a player to the new group leader.
|
void |
selectMenuPoint(org.bukkit.event.inventory.InventoryClickEvent event)
Checks if an event in this inventory was triggered by a player click.
|
static void |
setGroupItemMeta(org.bukkit.inventory.ItemStack groupItemStack,
WauzPlayerGroup playerGroup,
boolean insideGroup)
Adds information about a group to an item stack.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdestroyInventorypublic java.lang.String getInventoryId()
getInventoryId in interface WauzInventorypublic java.util.List<WauzMode> getGamemodes()
getGamemodes in interface WauzInventorypublic void openInstance(org.bukkit.entity.Player player)
openInstance in interface WauzInventoryplayer - The player that should view the inventory.public static void open(org.bukkit.entity.Player player)
player - The player that should view the inventory.WauzPlayerGroupPool.getGroups(),
WauzPlayerGroup.getPlayers(),
setGroupItemMeta(ItemStack, WauzPlayerGroup, boolean),
MenuUtils.setBorders(Inventory)public static void setGroupItemMeta(org.bukkit.inventory.ItemStack groupItemStack,
WauzPlayerGroup playerGroup,
boolean insideGroup)
groupItemStack - The item stack that will receive the group infos.playerGroup - The group to get the infos from.insideGroup - If the viewer of the item is inside the group.WauzPlayerGroup.getWauzMode(),
WauzPlayerGroup.getAdminUuidString(),
WauzPlayerGroup.getPlayerAmount(),
WauzPlayerGroup.getWrappedGroupDescription(),
WauzPlayerGroup.isPasswordProtected()public static void passwordInput(org.bukkit.entity.Player player,
java.lang.String groupUuidString,
java.lang.String passwordString)
player - The player that is inputting a password character.groupUuidString - The group that password is for.passwordString - The incomplete password.public static void playerSelection(org.bukkit.entity.Player player,
boolean promote)
player - The player that is promoting or kicking a member.promote - If it is a promotion, else it is a kick.WauzPlayerGroup.getPlayers(),
MenuUtils.setBorders(Inventory)public void selectMenuPoint(org.bukkit.event.inventory.InventoryClickEvent event)
selectMenuPoint in interface WauzInventoryevent - The inventory click event.WauzPlayerGroup,
WauzPlayerDataSectionSelections.setGroupUuidString(String),
WauzPlayerGroupPool.regGroup(WauzPlayerGroup),
passwordInput(Player, String, String),
handlePlayerInteractions(Player, ItemStack)public void handlePlayerInteractions(org.bukkit.entity.Player player,
org.bukkit.inventory.ItemStack clicked)
player - The player who started the interaction.clicked - The option to interact with.playerSelection(Player, boolean),
promotePlayer(Player, Player),
kickPlayer(Player, Player),
WauzTeleporter.playerTeleportManual(Player, Player)private void promotePlayer(org.bukkit.entity.Player player,
org.bukkit.entity.Player target)
player - The player performing the action.target - The player to get promoted.private void kickPlayer(org.bukkit.entity.Player player,
org.bukkit.entity.Player target)
player - The player performing the action.target - The player to get kicked.