Merge pull request #2495 from BentoBoxWorld/develop

Release 2.5.3 Bug Fix
This commit is contained in:
tastybento 2024-08-31 17:43:39 -07:00 committed by GitHub
commit c503ae6134
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -150,7 +150,7 @@ public class IslandTeamCommand extends CompositeCommand {
if (handler.objectExists(invitee.toString())) {
@Nullable
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.getMemberSet().contains(invite.getInviter()) // the inviter is still a member of the island
).orElse(false);

View File

@ -301,7 +301,7 @@ public class IslandCache {
* @since 2.4.0
*/
public Island loadIsland(String uniqueId) {
return handler.loadObject(uniqueId);
return handler.objectExists(uniqueId) ? handler.loadObject(uniqueId) : null;
}
/**