Skip to content
This repository was archived by the owner on Feb 7, 2022. It is now read-only.

Commit 4c974ac

Browse files
committed
Fix "Display-Messages" setting being ignored when the "Give-Books-Every-Join" setting was enabled.
1 parent f65c9e8 commit 4c974ac

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/main/java/com/mstiles92/plugins/bookrules/util/GiveBookRunnable.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ public GiveBookRunnable(Player player) {
5050
public void run() {
5151
if (Config.shouldGiveBooksEveryJoin()) {
5252
int num = BookUtils.givePlayerAllBooks(player);
53-
player.sendMessage(String.format(Strings.PLUGIN_TAG + Localization.getString(Strings.PLAYER_JOIN_MESSAGE), String.valueOf(num)));
53+
54+
if (Config.shouldNotifyPlayers()) {
55+
player.sendMessage(String.format(Strings.PLUGIN_TAG + Localization.getString(Strings.PLAYER_JOIN_MESSAGE), String.valueOf(num)));
56+
}
5457
} else {
5558
int num = BookUtils.givePlayerAllUngivenBooks(player);
5659
Log.verbose(String.format(Localization.getString(Strings.PLAYER_GIVEN_BOOKS), player.getName(), String.valueOf(num)));

0 commit comments

Comments
 (0)