Fix mute not having a permissions check

This commit is contained in:
Telesphoreo 2022-05-19 21:12:52 -05:00
parent ff16347981
commit 0bbe2d06f6
1 changed files with 3 additions and 10 deletions

View File

@ -38,17 +38,10 @@ public class MuteCMD extends PlexCommand
return messageComponent("playerMuted");
}
if (isAdmin(getPlexPlayer(player)))
if (silentCheckRank(player, Rank.ADMIN, "plex.mute"))
{
if (!isConsole(sender))
{
assert playerSender != null;
PlexPlayer plexPlayer1 = getPlexPlayer(playerSender);
if (!plexPlayer1.getRankFromString().isAtLeast(getPlexPlayer(player).getRankFromString()))
{
return messageComponent("higherRankThanYou");
}
}
send(sender, messageComponent("higherRankThanYou"));
return null;
}
Punishment punishment = new Punishment(punishedPlayer.getUuid(), getUUID(sender));