Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Commit

Permalink
AfkTimeout: add option to disable message
Browse files Browse the repository at this point in the history
  • Loading branch information
TheFaser committed Nov 9, 2023
1 parent bd1600c commit b8766ee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,12 @@ public void setAfk(@NotNull Player player, boolean isAfk, @NotNull String takeOu

fPlayer.setAfkSuffix(MessageUtil.formatAll(player, afkSuffix));

fPlayer.playSound(player, player, this.toString());

if (!config.getVaultBoolean(player, this + ".message.enable")) return;

String afkMessage = locale.getVaultString(player, "commands.afk." + isAfk + "-message");
player.sendMessage(MessageUtil.formatAll(player, MessageUtil.formatPlayerString(player, afkMessage)));

fPlayer.playSound(player, player, this.toString());
}

public void checkAfk(@NotNull Player player) {
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ default:

time: 3000

message:
enable: true

take-out-actions:
- /afk
- commands
Expand Down

0 comments on commit b8766ee

Please sign in to comment.