Bug fixes.

This commit is contained in:
TadahTech 2016-07-18 19:04:02 -05:00
parent cbb0fa37fb
commit b4aa303923
5 changed files with 14 additions and 5 deletions

View File

@ -21,6 +21,8 @@ public class PartyCommand extends CommandBase<PartyManager>
private final String[] HELP = {
F.main("Party", "Party Commands (Click the command!)"),
help("", "Brings up the Party GUI"),
help("<player>", "Send an invitation to a player."),
help("leave", "Send an invitation to a player."),
C.cBlue + "Party> " + C.cWhite + "#<message> " + C.cGray + "- Send a message to your party.",
C.cGreenB + "All party functions have been moved to the GUI!",
C.cGreenB + "Click the NameTag in your hotbar to get started!"
@ -73,6 +75,12 @@ public class PartyCommand extends CommandBase<PartyManager>
Plugin.getMethodManager().invite(caller, arg);
return;
}
if(arg.equalsIgnoreCase("leave")) {
Plugin.getMethodManager().leaveParty(caller);
return;
}
Plugin.getMethodManager().invite(caller, arg);
return;
}
caller.sendMessage(HELP);
}

View File

@ -200,7 +200,7 @@ public class PartyRedisManager
{
publish(server, PARTY_INFO, GSON.toJson(party));
List<String> members = party.getMembers();
party.getMembersByUUID().stream().forEach(uuid -> _plugin.getMethodManager().removeForTransfer(uuid));
party.getMembersByUUID().forEach(uuid -> _plugin.getMethodManager().removeForTransfer(uuid));
members.stream().map(Bukkit::getPlayer).forEach(player1 ->
{
player1.leaveVehicle();

View File

@ -2,6 +2,7 @@ package mineplex.core.party.ui.button.tools;
import mineplex.core.common.util.C;
import mineplex.core.itemstack.ItemBuilder;
import mineplex.core.party.PartyManager;
import mineplex.core.party.ui.Button;
import org.bukkit.Material;
import org.bukkit.entity.Player;
@ -19,9 +20,9 @@ public class LeavePartyButton extends Button
.setLore(" ", C.cRed + "Shift-Left-Click" + C.cGray + " to leave your party.")
.build();
public LeavePartyButton()
public LeavePartyButton(PartyManager plugin)
{
super(ITEM, null);
super(ITEM, plugin);
}
@Override

View File

@ -54,7 +54,7 @@ public class PartyOwnerMenu extends Menu
//Go to server
_buttons[SELECT_SERVER_BUTTON_SLOT] = new SelectServerButton(_party);
//Leave party
_buttons[LEAVE_PARTY_BUTTON_SLOT] = new LeavePartyButton();
_buttons[LEAVE_PARTY_BUTTON_SLOT] = new LeavePartyButton(_plugin);
//Disband
_buttons[DISBAND_PARTY_BUTTON_SLOW] = new DisbandPartyButton(_plugin);

View File

@ -33,7 +33,7 @@ public class PartyViewMenu extends Menu
protected Button[] setUp(Player player)
{
//Tools
_buttons[LEAVE_PARTY_BUTTON_SLOT] = new LeavePartyButton();
_buttons[LEAVE_PARTY_BUTTON_SLOT] = new LeavePartyButton(_plugin);
//Suggest Player
_buttons[SUGGEST_PLAYER_BUTTON_SLOT] = new SuggestPlayerButton(_party, _plugin);