mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-07-24 13:15:06 +02:00
Security for the previous commit
This commit is contained in:
parent
6cfd3f0a0b
commit
469a56258d
|
@ -385,9 +385,14 @@ public class AuthMePlayerListener implements Listener {
|
|||
final String lowname = player.getName().toLowerCase();
|
||||
final String name = player.getName();
|
||||
|
||||
if (!lowname.equals(name))
|
||||
if (data.isAuthAvailable(lowname))
|
||||
data.updateName(lowname, name);
|
||||
if (!lowname.equals(name)) {
|
||||
// Little workaround to be sure registered player is the same as this
|
||||
if (player.hasPlayedBefore())
|
||||
// Make sure it's the correct player
|
||||
if (data.getAuth(lowname).getIp().equalsIgnoreCase(player.getAddress().getAddress().getHostAddress()))
|
||||
if (data.isAuthAvailable(lowname))
|
||||
data.updateName(lowname, name);
|
||||
}
|
||||
|
||||
if (plugin.getCitizensCommunicator().isNPC(player, plugin) || Utils.getInstance().isUnrestricted(player) || CombatTagComunicator.isNPC(player)) {
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue
Block a user