mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-12-26 02:57:59 +01:00
Merge pull request #259 from BentoBoxWorld/fix-unknown
Fixed players considered "unknown" until they create an island
This commit is contained in:
commit
c039b9e13c
@ -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))
|
||||
|
@ -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()));
|
||||
|
Loading…
Reference in New Issue
Block a user