Skip to content

Commit 3ca9dff

Browse files
committed
Add constant for permission.
1 parent b7097d4 commit 3ca9dff

File tree

1 file changed

+3
-1
lines changed
  • eternalcore-core/src/main/java/com/eternalcode/core/feature/afk

1 file changed

+3
-1
lines changed

eternalcore-core/src/main/java/com/eternalcode/core/feature/afk/AfkCommand.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
)
2525
class AfkCommand {
2626

27+
private static final String AFK_BYPASS_PERMISSION = "eternalcore.afk.bypass";
28+
2729
private final NoticeService noticeService;
2830
private final PluginConfiguration pluginConfiguration;
2931
private final AfkService afkService;
@@ -42,7 +44,7 @@ class AfkCommand {
4244
void execute(@Context Player player) {
4345
UUID uuid = player.getUniqueId();
4446

45-
if (player.hasPermission("eternalcore.afk.bypass")) {
47+
if (player.hasPermission(AFK_BYPASS_PERMISSION)) {
4648
this.afkService.switchAfk(uuid, AfkReason.COMMAND);
4749
return;
4850
}

0 commit comments

Comments
 (0)