From 5c6a9ea879a4355fc657f6c8b5371f26fd35513f Mon Sep 17 00:00:00 2001 From: Spencer Date: Sat, 6 Jan 2018 16:47:21 -0500 Subject: [PATCH] Don't allow support to set ranks for admin+ or content users --- .../mineplex/staffServer/ui/rank/SupportRankListPage.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/ui/rank/SupportRankListPage.java b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/ui/rank/SupportRankListPage.java index c293b5cf9..c207fe8bb 100644 --- a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/ui/rank/SupportRankListPage.java +++ b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/ui/rank/SupportRankListPage.java @@ -101,6 +101,12 @@ public class SupportRankListPage extends SupportPage private void handleGroupSet(PermissionGroup group) { + if (_target.inheritsFrom(PermissionGroup.ADMIN) || _target.inheritsFrom(PermissionGroup.CONTENT)) + { + message("You can't set this user's rank!"); + return; + } + getPlugin().getClientManager().setPrimaryGroup(_target.getAccountId(), group, () -> { message("You have applied the rank " + group.getDisplay(true, true, true, true).toUpperCase() + C.mBody + " to " + C.cYellow + _target.getName()); _target.setPrimaryGroup(group);