Skip to content

Commit

Permalink
Fix lang
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexProgrammerDE committed Nov 4, 2024
1 parent 856c9d1 commit 5b2ef57
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ public boolean onCommand(CommandSender sender, Command command, String label, St
return true;
}

plugin.getTempDataTool().setChatEnabled(player, !plugin.getTempDataTool().isChatEnabled(player));
boolean chatNowEnabled = !plugin.getTempDataTool().isChatEnabled(player);
plugin.getTempDataTool().setChatEnabled(player, chatNowEnabled);

if (plugin.getTempDataTool().isChatEnabled(player)) {
if (chatNowEnabled) {
plugin.getCommonTool().sendLanguageMessage(player, "chaton");
} else {
plugin.getCommonTool().sendLanguageMessage(player, "chatoff");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ public boolean onCommand(CommandSender sender, Command command, String label, St
return true;
}

plugin.getTempDataTool().setWhisperingEnabled(player, !plugin.getTempDataTool().isWhisperingEnabled(player));
boolean whisperingNowEnabled = !plugin.getTempDataTool().isWhisperingEnabled(player);
plugin.getTempDataTool().setWhisperingEnabled(player, whisperingNowEnabled);

if (plugin.getTempDataTool().isWhisperingEnabled(player)) {
if (whisperingNowEnabled) {
plugin.getCommonTool().sendLanguageMessage(player, "pmson");
} else {
plugin.getCommonTool().sendLanguageMessage(player, "pmsoff");
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/language.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ notonline: "This player is not online."
nooneignored: "No players ignored."
chaton: "Chat messages unhidden."
chatoff: "Chat messages hidden."
pmson: "Private messages hidden."
pmsoff: "Private messages unhidden."
pmself: "Please do not pm yourself."
pmson: "Private messages unhidden."
pmsoff: "Private messages hidden."
pmself: "Please do not private message yourself."
chatisoff: "You have toggled off chat"
source-ignored: "This person ignores you!"
target-ignored: "You ignore this person!"
Expand Down

0 comments on commit 5b2ef57

Please sign in to comment.