Update UI and fix typos
This commit is contained in:
parent
df53021f7c
commit
33cce620be
@ -4,6 +4,7 @@ import mineplex.core.common.Rank;
|
||||
import mineplex.core.party.event.PartyMemberKickGUIEvent;
|
||||
import mineplex.core.party.event.PartyTransferOwnerEvent;
|
||||
import mineplex.core.party.manager.PartyRedisManager;
|
||||
import mineplex.core.party.ui.Menu;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@ -93,7 +94,10 @@ public class PartyEventListener implements Listener
|
||||
@EventHandler
|
||||
public void onKick(PartyMemberKickGUIEvent event)
|
||||
{
|
||||
_plugin.removeFromParty(Bukkit.getPlayerExact(event.getPlayerClicked()), PartyRemoveReason.KICKED);
|
||||
Player clicked = Bukkit.getPlayerExact(event.getPlayerClicked());
|
||||
Lang.REMOVED.send(clicked);
|
||||
_plugin.removeFromParty(clicked, PartyRemoveReason.KICKED);
|
||||
Menu.get(event.getOwner().getUniqueId()).update(event.getOwner());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ import mineplex.core.party.command.PartyCommand;
|
||||
import mineplex.core.party.manager.PartyInviteManager;
|
||||
import mineplex.core.party.manager.PartyJoinManager;
|
||||
import mineplex.core.party.manager.PartyRedisManager;
|
||||
import mineplex.core.party.ui.Menu;
|
||||
import mineplex.core.party.ui.MenuListener;
|
||||
import mineplex.core.portal.Portal;
|
||||
import mineplex.core.preferences.PreferencesManager;
|
||||
@ -95,6 +96,14 @@ public class PartyManager extends MiniPlugin
|
||||
Player player = Bukkit.getPlayer(uuid);
|
||||
party.getMembers().remove(player.getName());
|
||||
party.onPlayerRemove(player.getName(), reason);
|
||||
if(player.getOpenInventory() != null)
|
||||
{
|
||||
if (Menu.get(player.getUniqueId()) != null)
|
||||
{
|
||||
player.closeInventory();
|
||||
Menu.remove(player.getUniqueId());
|
||||
}
|
||||
}
|
||||
int size = party.getMembers().size();
|
||||
if(size <= 1)
|
||||
{
|
||||
|
@ -8,6 +8,7 @@ import mineplex.core.party.Party;
|
||||
import mineplex.core.party.PartyManager;
|
||||
import mineplex.core.party.event.PartyMemberKickGUIEvent;
|
||||
import mineplex.core.party.ui.Button;
|
||||
import mineplex.core.party.ui.Menu;
|
||||
import mineplex.core.party.ui.button.tools.PartyButton;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.DyeColor;
|
||||
|
@ -1,6 +1,7 @@
|
||||
package mineplex.core.party.ui.button.tools.owner;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.itemstack.ItemBuilder;
|
||||
import mineplex.core.party.Party;
|
||||
import mineplex.core.party.ui.Menu;
|
||||
@ -18,14 +19,14 @@ public class KickPlayerButton extends PartyButton
|
||||
|
||||
private static final ItemStack ITEM_OFF = new ItemBuilder(Material.IRON_AXE)
|
||||
.setTitle(C.cYellow + "Kick Player's")
|
||||
.setLore(" ", C.cRed + "Right Click to enter " + C.cGreen + "Kick Mode",
|
||||
C.cGray + "While activated, click on a player's head", C.cGray + "to remove them fro the party")
|
||||
.setLore(" ", F.elem("Right-Click") + " to enter " + C.cGreen + "Kick Mode",
|
||||
C.cGray + "While activated, click on a player's head", C.cGray + "to remove them from the party")
|
||||
.build();
|
||||
|
||||
private static final ItemStack ITEM_ON = new ItemBuilder(Material.IRON_AXE)
|
||||
.setTitle(C.cYellow + "Kick Player's")
|
||||
.setLore(" ", C.cGreen + "Right Click to leave " + C.cRed + "Kick Mode",
|
||||
C.cGray + "While activated, click on a player's head", C.cGray + "to remove them fro the party")
|
||||
.setLore(" ", F.elem("Right-Click") + " to leave " + C.cRed + "Kick Mode",
|
||||
C.cGray + "While activated, click on a player's head", C.cGray + "to remove them from the party")
|
||||
.setGlow(true)
|
||||
.build();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user