mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-27 13:15:28 +01:00
Fixes coop and trust invites when team invites are not allowed
If a member or sub-owner has coop or trust invite capability and not team invite rank, and confirm invites is on, then the invites were not working. Fixes https://github.com/BentoBoxWorld/BentoBox/issues/1452
This commit is contained in:
parent
0f7ca6ac60
commit
23522a297f
@ -50,6 +50,8 @@ public class IslandTeamInviteAcceptCommand extends ConfirmableCommand {
|
||||
user.sendMessage("commands.island.team.invite.errors.invalid-invite");
|
||||
return false;
|
||||
}
|
||||
Invite invite = itc.getInvite(playerUUID);
|
||||
if (invite.getType().equals(Type.TEAM)) {
|
||||
// Check rank to of inviter
|
||||
Island island = getIslands().getIsland(getWorld(), prospectiveOwnerUUID);
|
||||
String inviteUsage = getParent().getSubCommand("invite").map(CompositeCommand::getUsage).orElse("");
|
||||
@ -58,8 +60,7 @@ public class IslandTeamInviteAcceptCommand extends ConfirmableCommand {
|
||||
itc.removeInvite(playerUUID);
|
||||
return false;
|
||||
}
|
||||
Invite invite = itc.getInvite(playerUUID);
|
||||
if (invite.getType().equals(Type.TEAM)) {
|
||||
|
||||
// Check if player is already in a team
|
||||
if (getIslands().inTeam(getWorld(), playerUUID)) {
|
||||
user.sendMessage("commands.island.team.invite.errors.you-already-are-in-team");
|
||||
|
Loading…
Reference in New Issue
Block a user