From 10dd546c0962f0ca0b4ab39335b4c11b63f5af7d Mon Sep 17 00:00:00 2001 From: Telesphoreo Date: Sat, 9 Apr 2022 00:26:34 -0500 Subject: [PATCH] Quick fix --- src/main/java/dev/plex/listener/impl/AdminListener.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/dev/plex/listener/impl/AdminListener.java b/src/main/java/dev/plex/listener/impl/AdminListener.java index 9095084..5609761 100644 --- a/src/main/java/dev/plex/listener/impl/AdminListener.java +++ b/src/main/java/dev/plex/listener/impl/AdminListener.java @@ -18,7 +18,7 @@ public class AdminListener extends PlexListener { String userSender = event.getSender().getName(); PlexPlayer target = event.getPlexPlayer(); - if (!target.getRank().isEmpty()) + if (target.getRankFromString().isAtLeast(Rank.ADMIN)) { PlexUtils.broadcast(messageComponent("adminReadded", userSender, target.getName(), target.getRankFromString().getReadable())); } @@ -29,7 +29,6 @@ public class AdminListener extends PlexListener } target.setAdminActive(true); DataUtils.update(target); - } @EventHandler @@ -37,7 +36,6 @@ public class AdminListener extends PlexListener { String userSender = event.getSender().getName(); PlexPlayer target = event.getPlexPlayer(); -// target.setRank(""); target.setAdminActive(false); DataUtils.update(target); PlexUtils.broadcast(messageComponent("adminRemoved", userSender, target.getName()));