mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-23 01:27:37 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
0c6d90e653
@ -63,14 +63,13 @@ public class PlayerListener extends PlexListener
|
||||
PlexLog.debug("New IP address detected for player: " + player.getName() + ". Adding " + currentIP + " to the database.");
|
||||
ips.add(currentIP);
|
||||
plexPlayer.setIps(ips);
|
||||
if (mongoPlayerData != null) //back to mongo checking
|
||||
{
|
||||
mongoPlayerData.update(plexPlayer); //update the player's document
|
||||
DataUtils.update(plexPlayer);
|
||||
}
|
||||
else if (sqlPlayerData != null) //sql checking
|
||||
if (!plexPlayer.getName().equals(player.getName()))
|
||||
{
|
||||
sqlPlayerData.update(plexPlayer);
|
||||
}
|
||||
PlexLog.log(plexPlayer.getName() + " has a new name. Changing it to " + player.getName());
|
||||
plexPlayer.setName(player.getName());
|
||||
DataUtils.update(plexPlayer);
|
||||
}
|
||||
}
|
||||
|
||||
@ -101,15 +100,7 @@ public class PlayerListener extends PlexListener
|
||||
plugin.getAdminList().removeFromCache(UUID.fromString(plexPlayer.getUuid()));
|
||||
}
|
||||
|
||||
if (mongoPlayerData != null) //back to mongo checking
|
||||
{
|
||||
mongoPlayerData.update(plexPlayer); //update the player's document
|
||||
}
|
||||
else if (sqlPlayerData != null) //sql checking
|
||||
{
|
||||
sqlPlayerData.update(plexPlayer);
|
||||
}
|
||||
|
||||
DataUtils.update(plexPlayer);
|
||||
PlayerCache.getPlexPlayerMap().remove(event.getPlayer().getUniqueId()); //remove them from cache
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user