Fix team invites

This commit is contained in:
tastybento 2024-08-31 17:40:50 -07:00
parent 82a77d70ac
commit e87cd7e4d2

View File

@ -150,7 +150,7 @@ public class IslandTeamCommand extends CompositeCommand {
if (handler.objectExists(invitee.toString())) { if (handler.objectExists(invitee.toString())) {
@Nullable @Nullable
TeamInvite invite = getInvite(invitee); TeamInvite invite = getInvite(invitee);
valid = getIslands().getIslandById(invite.getUniqueId()).map(island -> island.isOwned() // Still owned by someone valid = getIslands().getIslandById(invite.getIslandID()).map(island -> island.isOwned() // Still owned by someone
&& !island.isDeleted() // Not deleted && !island.isDeleted() // Not deleted
&& island.getMemberSet().contains(invite.getInviter()) // the inviter is still a member of the island && island.getMemberSet().contains(invite.getInviter()) // the inviter is still a member of the island
).orElse(false); ).orElse(false);