mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-11 17:15:07 +02:00
If Bukkit doesn't know who a player is, but we do, substitute the last known nickname when ban checking.
This commit is contained in:
@@ -1481,12 +1481,27 @@ public class OfflinePlayer implements Player
|
||||
@Override
|
||||
public boolean isBanned()
|
||||
{
|
||||
if (base.getName() == null && getName() != null)
|
||||
{
|
||||
return server.getBanList(BanList.Type.NAME).isBanned(getName());
|
||||
}
|
||||
return base.isBanned();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBanned(boolean banned)
|
||||
{
|
||||
if (base.getName() == null && getName() != null)
|
||||
{
|
||||
if (banned)
|
||||
{
|
||||
server.getBanList(BanList.Type.NAME).addBan(getName(), null, null, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
server.getBanList(BanList.Type.NAME).pardon(getName());
|
||||
}
|
||||
}
|
||||
base.setBanned(banned);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user