mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-22 17:17:37 +00:00
Fix mute not having a permissions check
This commit is contained in:
parent
ff16347981
commit
0bbe2d06f6
@ -38,17 +38,10 @@ public class MuteCMD extends PlexCommand
|
|||||||
return messageComponent("playerMuted");
|
return messageComponent("playerMuted");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isAdmin(getPlexPlayer(player)))
|
if (silentCheckRank(player, Rank.ADMIN, "plex.mute"))
|
||||||
{
|
{
|
||||||
if (!isConsole(sender))
|
send(sender, messageComponent("higherRankThanYou"));
|
||||||
{
|
return null;
|
||||||
assert playerSender != null;
|
|
||||||
PlexPlayer plexPlayer1 = getPlexPlayer(playerSender);
|
|
||||||
if (!plexPlayer1.getRankFromString().isAtLeast(getPlexPlayer(player).getRankFromString()))
|
|
||||||
{
|
|
||||||
return messageComponent("higherRankThanYou");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Punishment punishment = new Punishment(punishedPlayer.getUuid(), getUUID(sender));
|
Punishment punishment = new Punishment(punishedPlayer.getUuid(), getUUID(sender));
|
||||||
|
Loading…
Reference in New Issue
Block a user