mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-13 19:51:27 +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;
|
return;
|
||||||
}
|
}
|
||||||
UUID playerUUID = user.getUniqueId();
|
UUID playerUUID = user.getUniqueId();
|
||||||
|
// Load player
|
||||||
|
players.addPlayer(playerUUID);
|
||||||
if (plugin.getPlayers().isKnown(playerUUID)) {
|
if (plugin.getPlayers().isKnown(playerUUID)) {
|
||||||
// Load player
|
|
||||||
players.addPlayer(playerUUID);
|
|
||||||
// Reset island resets if required
|
// Reset island resets if required
|
||||||
plugin.getIWM().getOverWorlds().stream()
|
plugin.getIWM().getOverWorlds().stream()
|
||||||
.filter(w -> event.getPlayer().getLastPlayed() < plugin.getIWM().getResetEpoch(w))
|
.filter(w -> event.getPlayer().getLastPlayed() < plugin.getIWM().getResetEpoch(w))
|
||||||
|
@ -122,7 +122,7 @@ public class PlayersManager {
|
|||||||
* in the database too.
|
* in the database too.
|
||||||
*
|
*
|
||||||
* @param uniqueID - unique ID
|
* @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) {
|
public boolean isKnown(UUID uniqueID) {
|
||||||
return uniqueID != null && (playerCache.containsKey(uniqueID) || handler.objectExists(uniqueID.toString()));
|
return uniqueID != null && (playerCache.containsKey(uniqueID) || handler.objectExists(uniqueID.toString()));
|
||||||
|
Loading…
Reference in New Issue
Block a user