Skip to content

Commit

Permalink
Add constant for permission.
Browse files Browse the repository at this point in the history
  • Loading branch information
vLuckyyy committed Feb 12, 2025
1 parent b7097d4 commit 3ca9dff
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
)
class AfkCommand {

private static final String AFK_BYPASS_PERMISSION = "eternalcore.afk.bypass";

private final NoticeService noticeService;
private final PluginConfiguration pluginConfiguration;
private final AfkService afkService;
Expand All @@ -42,7 +44,7 @@ class AfkCommand {
void execute(@Context Player player) {
UUID uuid = player.getUniqueId();

if (player.hasPermission("eternalcore.afk.bypass")) {
if (player.hasPermission(AFK_BYPASS_PERMISSION)) {
this.afkService.switchAfk(uuid, AfkReason.COMMAND);
return;
}
Expand Down

0 comments on commit 3ca9dff

Please sign in to comment.