mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-23 01:27:40 +01: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:
parent
0d6bca2080
commit
4ecb6b5fdb
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user