Fix disguises prevent join, join rank check bugs
This commit is contained in:
parent
c18d771715
commit
d09b27bfe1
@ -161,6 +161,9 @@ public class PlayerDisguiseManager extends MiniPlugin implements IPacketHandler
|
|||||||
{
|
{
|
||||||
CoreClient client = _clients.Get(event.getPlayer());
|
CoreClient client = _clients.Get(event.getPlayer());
|
||||||
|
|
||||||
|
if (!client.GetRank().has(event.getPlayer(), Rank.ADMIN, new Rank[] {Rank.YOUTUBE, Rank.TWITCH}, false))
|
||||||
|
return;
|
||||||
|
|
||||||
if (_redis.elementExists(client.getAccountId() + client.getName()))
|
if (_redis.elementExists(client.getAccountId() + client.getName()))
|
||||||
{
|
{
|
||||||
DisguisePlayerBean bean = _redis.getElement(client.getAccountId() + client.getName());
|
DisguisePlayerBean bean = _redis.getElement(client.getAccountId() + client.getName());
|
||||||
@ -263,11 +266,6 @@ public class PlayerDisguiseManager extends MiniPlugin implements IPacketHandler
|
|||||||
return this._punish;
|
return this._punish;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CosmeticManager getCostmeticManager()
|
|
||||||
{
|
|
||||||
return this._cosmetics;
|
|
||||||
}
|
|
||||||
|
|
||||||
public PreferencesManager getPreferencesManager()
|
public PreferencesManager getPreferencesManager()
|
||||||
{
|
{
|
||||||
return this._prefs;
|
return this._prefs;
|
||||||
@ -439,6 +437,7 @@ public class PlayerDisguiseManager extends MiniPlugin implements IPacketHandler
|
|||||||
if (other.getName().equalsIgnoreCase(requestedUsername))
|
if (other.getName().equalsIgnoreCase(requestedUsername))
|
||||||
{
|
{
|
||||||
UtilPlayer.message(caller, C.cRed + F.main("Disguise", "This name is already in use!"));
|
UtilPlayer.message(caller, C.cRed + F.main("Disguise", "This name is already in use!"));
|
||||||
|
_cannotJoin.remove(requestedUsername.toLowerCase());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user