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

Commit

Permalink
CommandMsg: fix dispatch mail command from msg
Browse files Browse the repository at this point in the history
  • Loading branch information
TheFaser committed Sep 3, 2023
1 parent 3772bd0 commit e2e76d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/net/flectone/commands/CommandMsg.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import java.util.Collections;
import java.util.List;

import static net.flectone.managers.FileManager.config;
import static net.flectone.managers.FileManager.locale;

public class CommandMsg implements FTabCompleter {
Expand Down Expand Up @@ -48,7 +49,7 @@ private void command(@NotNull CommandSender commandSender, @NotNull Command comm

String message = ObjectUtil.toString(strings, 1);

if (!secondFPlayer.isOnline()) {
if (!secondFPlayer.isOnline() && config.getBoolean("command.mail.enable") && secondFPlayer.getChatInfo().getOption("mail")) {
fCommand.dispatchCommand("mail " + playerName + " " + message);
return;
}
Expand Down

0 comments on commit e2e76d4

Please sign in to comment.