Skip to content

Commit 6029c05

Browse files
author
m2en
committed
chore: bypassを追加
1 parent ce53ee3 commit 6029c05

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/main/java/net/azisaba/afnw/afnwcore2/listeners/player/AFKListener.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ public record AFKListener(JavaPlugin plugin) implements Listener {
1919
@EventHandler(priority = EventPriority.HIGHEST)
2020
public void onAFK(AfkStatusChangeEvent e) {
2121
Player p = e.getAffected().getBase();
22+
if(p.hasPermission("afnw.bypass.afk")) {
23+
return;
24+
}
2225

2326
FileConfiguration config = plugin.getConfig();
2427
World afkWorld = Bukkit.getWorld(config.getString("afk.afk_world_name", "afk"));

src/main/resources/plugin.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ permissions:
1616
default: op
1717
afnw.bypass.break.arable:
1818
default: op
19+
afnw.bypass.afk:
20+
default: op
1921
afnw.command.afnw:
2022
default: false
2123
afnw.command.vote:

0 commit comments

Comments
 (0)