Bug fixes.
This commit is contained in:
parent
0ebddf9f45
commit
978ee0055a
@ -21,6 +21,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
@ -146,7 +147,8 @@ public class PartyManager extends MiniPlugin
|
||||
|
||||
public void disbandParty(Party party)
|
||||
{
|
||||
party.getMembers().stream().map(Bukkit::getPlayer).forEach(player -> removeFromParty(player.getUniqueId(), PartyRemoveReason.KICKED));
|
||||
List<String> members = party.getMembers();
|
||||
members.stream().map(Bukkit::getPlayer).forEach(player -> removeFromParty(player.getUniqueId(), PartyRemoveReason.LEFT));
|
||||
removeParty(party);
|
||||
}
|
||||
|
||||
|
@ -29,6 +29,6 @@ public class InvitePlayerButton extends Button
|
||||
@Override
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
new PartyInvitePlayerMenu(getPlugin(), player).openInventory();
|
||||
new PartyInvitePlayerMenu(getPlugin(), player, null).openInventory();
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ public class AddPlayerButton extends PartyButton
|
||||
@Override
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
new PartyInvitePlayerMenu(getPlugin(), player).openInventory();
|
||||
new PartyInvitePlayerMenu(getPlugin(), player, getParty()).openInventory();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package mineplex.core.party.ui.menus.input;
|
||||
|
||||
import mineplex.core.anvilMenu.player.PlayerNameMenu;
|
||||
import mineplex.core.party.Party;
|
||||
import mineplex.core.party.PartyManager;
|
||||
import mineplex.core.party.ui.menus.PartyOwnerMenu;
|
||||
import mineplex.core.anvilMenu.PlayerInputActionMenu;
|
||||
@ -15,9 +16,9 @@ public class PartyInvitePlayerMenu extends PlayerNameMenu
|
||||
|
||||
private PartyManager _partyManager;
|
||||
|
||||
public PartyInvitePlayerMenu(PartyManager partyManager, Player player)
|
||||
public PartyInvitePlayerMenu(PartyManager partyManager, Player player, Party party)
|
||||
{
|
||||
super(partyManager, partyManager.getClientManager(), player, null);
|
||||
super(partyManager, partyManager.getClientManager(), player, party);
|
||||
_partyManager = partyManager;
|
||||
}
|
||||
|
||||
@ -27,7 +28,7 @@ public class PartyInvitePlayerMenu extends PlayerNameMenu
|
||||
_player.chat("/party invite " + name);
|
||||
_player.playSound(_player.getLocation(), Sound.NOTE_PLING, 1, 1.6f);
|
||||
_player.closeInventory();
|
||||
if (_partyManager.getParty(_player) == null)
|
||||
if (_party == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user