Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,20 @@ public void register(BukkitService bukkitService) {
}

private boolean shouldHideInventory(String playerName) {
return !playerCache.isAuthenticated(playerName) && dataSource.isAuthAvailable(playerName);
if (playerCache.isAuthenticated(playerName)) {
// fully logged in - no need to protect it
return false;
}

if (dataSource.isCached()) {
// load from cache or only request once
return dataSource.isAuthAvailable(playerName);
}

// data source is not cached - this means queries would run blocking
// Assume the player is registered would mean the inventory will be protected
// and any potential information leak can be prevented
return true;
}

public void unregister() {
Expand Down