Update UI and fix typos

This commit is contained in:
TadahTech 2016-06-23 03:11:45 -05:00
parent df53021f7c
commit 33cce620be
4 changed files with 20 additions and 5 deletions

View File

@ -4,6 +4,7 @@ import mineplex.core.common.Rank;
import mineplex.core.party.event.PartyMemberKickGUIEvent; import mineplex.core.party.event.PartyMemberKickGUIEvent;
import mineplex.core.party.event.PartyTransferOwnerEvent; import mineplex.core.party.event.PartyTransferOwnerEvent;
import mineplex.core.party.manager.PartyRedisManager; import mineplex.core.party.manager.PartyRedisManager;
import mineplex.core.party.ui.Menu;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
@ -93,7 +94,10 @@ public class PartyEventListener implements Listener
@EventHandler @EventHandler
public void onKick(PartyMemberKickGUIEvent event) 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());
} }
} }

View File

@ -9,6 +9,7 @@ import mineplex.core.party.command.PartyCommand;
import mineplex.core.party.manager.PartyInviteManager; import mineplex.core.party.manager.PartyInviteManager;
import mineplex.core.party.manager.PartyJoinManager; import mineplex.core.party.manager.PartyJoinManager;
import mineplex.core.party.manager.PartyRedisManager; import mineplex.core.party.manager.PartyRedisManager;
import mineplex.core.party.ui.Menu;
import mineplex.core.party.ui.MenuListener; import mineplex.core.party.ui.MenuListener;
import mineplex.core.portal.Portal; import mineplex.core.portal.Portal;
import mineplex.core.preferences.PreferencesManager; import mineplex.core.preferences.PreferencesManager;
@ -95,6 +96,14 @@ public class PartyManager extends MiniPlugin
Player player = Bukkit.getPlayer(uuid); Player player = Bukkit.getPlayer(uuid);
party.getMembers().remove(player.getName()); party.getMembers().remove(player.getName());
party.onPlayerRemove(player.getName(), reason); 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(); int size = party.getMembers().size();
if(size <= 1) if(size <= 1)
{ {

View File

@ -8,6 +8,7 @@ import mineplex.core.party.Party;
import mineplex.core.party.PartyManager; import mineplex.core.party.PartyManager;
import mineplex.core.party.event.PartyMemberKickGUIEvent; import mineplex.core.party.event.PartyMemberKickGUIEvent;
import mineplex.core.party.ui.Button; import mineplex.core.party.ui.Button;
import mineplex.core.party.ui.Menu;
import mineplex.core.party.ui.button.tools.PartyButton; import mineplex.core.party.ui.button.tools.PartyButton;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.DyeColor; import org.bukkit.DyeColor;

View File

@ -1,6 +1,7 @@
package mineplex.core.party.ui.button.tools.owner; package mineplex.core.party.ui.button.tools.owner;
import mineplex.core.common.util.C; import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.itemstack.ItemBuilder; import mineplex.core.itemstack.ItemBuilder;
import mineplex.core.party.Party; import mineplex.core.party.Party;
import mineplex.core.party.ui.Menu; 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) private static final ItemStack ITEM_OFF = new ItemBuilder(Material.IRON_AXE)
.setTitle(C.cYellow + "Kick Player's") .setTitle(C.cYellow + "Kick Player's")
.setLore(" ", C.cRed + "Right Click to enter " + C.cGreen + "Kick Mode", .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 fro the party") C.cGray + "While activated, click on a player's head", C.cGray + "to remove them from the party")
.build(); .build();
private static final ItemStack ITEM_ON = new ItemBuilder(Material.IRON_AXE) private static final ItemStack ITEM_ON = new ItemBuilder(Material.IRON_AXE)
.setTitle(C.cYellow + "Kick Player's") .setTitle(C.cYellow + "Kick Player's")
.setLore(" ", C.cGreen + "Right Click to leave " + C.cRed + "Kick Mode", .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 fro the party") C.cGray + "While activated, click on a player's head", C.cGray + "to remove them from the party")
.setGlow(true) .setGlow(true)
.build(); .build();