Merge pull request #259 from BentoBoxWorld/fix-unknown

Fixed players considered "unknown" until they create an island
This commit is contained in:
Florian CUNY 2018-09-02 21:39:29 +02:00 committed by GitHub
commit c039b9e13c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -36,9 +36,9 @@ public class JoinLeaveListener implements Listener {
return;
}
UUID playerUUID = user.getUniqueId();
// Load player
players.addPlayer(playerUUID);
if (plugin.getPlayers().isKnown(playerUUID)) {
// Load player
players.addPlayer(playerUUID);
// Reset island resets if required
plugin.getIWM().getOverWorlds().stream()
.filter(w -> event.getPlayer().getLastPlayed() < plugin.getIWM().getResetEpoch(w))

View File

@ -122,7 +122,7 @@ public class PlayersManager {
* in the database too.
*
* @param uniqueID - unique ID
* @return true if player is know, otherwise false
* @return true if player is known, otherwise false
*/
public boolean isKnown(UUID uniqueID) {
return uniqueID != null && (playerCache.containsKey(uniqueID) || handler.objectExists(uniqueID.toString()));