Try to improve things

This commit is contained in:
2022-04-08 16:57:09 -05:00
parent 15b50ac8ae
commit 9297eb6703
5 changed files with 29 additions and 47 deletions

View File

@ -98,7 +98,7 @@ public class PlexPlayer
public Rank getRankFromString()
{
OfflinePlayer player = Bukkit.getOfflinePlayer(uuid);
if (rank.isEmpty())
if (rank.isEmpty() || !isAdminActive())
{
if (player.isOp())
{
@ -115,13 +115,6 @@ public class PlexPlayer
}
}
public Rank getRepresentedRank()
{
int representedLevel = this.getRankFromString().getLevel();
if (!this.adminActive) representedLevel = Math.min(Rank.OP.getLevel(), representedLevel);
return Rank.values()[representedLevel];
}
public void loadPunishments()
{
if (Plex.get().getStorageType() != StorageType.MONGODB)