From 2146f0001464446098910a566b7a57f5bcd606cb Mon Sep 17 00:00:00 2001 From: EpicKnarvik97 Date: Wed, 6 Aug 2025 00:00:50 +0200 Subject: [PATCH] Fixes an error not differentiating between the two command variations --- .../knarcraft/bookswithoutborders/command/CommandSave.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/knarcraft/bookswithoutborders/command/CommandSave.java b/src/main/java/net/knarcraft/bookswithoutborders/command/CommandSave.java index 400ca62..fa69866 100644 --- a/src/main/java/net/knarcraft/bookswithoutborders/command/CommandSave.java +++ b/src/main/java/net/knarcraft/bookswithoutborders/command/CommandSave.java @@ -125,8 +125,8 @@ public class CommandSave implements TabExecutor { //Skip duplicate book if (!fileName.contains("Untitled" + getTitleAuthorSeparator()) && !overwrite) { BooksWithoutBorders.sendErrorMessage(player, "Book is already saved!"); - BooksWithoutBorders.sendErrorMessage(player, "Use " + getCommandColor() + "/savebook true " + - getErrorColor() + "to overwrite!"); + BooksWithoutBorders.sendErrorMessage(player, "Use " + getCommandColor() + (saveToPublicFolder ? + "/savepublicbook" : "/savebook") + "true " + getErrorColor() + "to overwrite!"); return; } @@ -134,7 +134,8 @@ public class CommandSave implements TabExecutor { if (foundDuplicates > BooksWithoutBordersConfig.getBookDuplicateLimit()) { BooksWithoutBorders.sendErrorMessage(player, "Maximum amount of " + fileName + " duplicates reached!"); - BooksWithoutBorders.sendErrorMessage(player, "Use " + getCommandColor() + "/savebook true " + + BooksWithoutBorders.sendErrorMessage(player, "Use " + getCommandColor() + (saveToPublicFolder ? + "/savepublicbook" : "/savebook") + "true " + getErrorColor() + "to overwrite!"); return; }