Fixes an error not differentiating between the two command variations
All checks were successful
EpicKnarvik97/Books-Without-Borders/pipeline/head This commit looks good
All checks were successful
EpicKnarvik97/Books-Without-Borders/pipeline/head This commit looks good
This commit is contained in:
@@ -125,8 +125,8 @@ public class CommandSave implements TabExecutor {
|
|||||||
//Skip duplicate book
|
//Skip duplicate book
|
||||||
if (!fileName.contains("Untitled" + getTitleAuthorSeparator()) && !overwrite) {
|
if (!fileName.contains("Untitled" + getTitleAuthorSeparator()) && !overwrite) {
|
||||||
BooksWithoutBorders.sendErrorMessage(player, "Book is already saved!");
|
BooksWithoutBorders.sendErrorMessage(player, "Book is already saved!");
|
||||||
BooksWithoutBorders.sendErrorMessage(player, "Use " + getCommandColor() + "/savebook true " +
|
BooksWithoutBorders.sendErrorMessage(player, "Use " + getCommandColor() + (saveToPublicFolder ?
|
||||||
getErrorColor() + "to overwrite!");
|
"/savepublicbook" : "/savebook") + "true " + getErrorColor() + "to overwrite!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,7 +134,8 @@ public class CommandSave implements TabExecutor {
|
|||||||
if (foundDuplicates > BooksWithoutBordersConfig.getBookDuplicateLimit()) {
|
if (foundDuplicates > BooksWithoutBordersConfig.getBookDuplicateLimit()) {
|
||||||
BooksWithoutBorders.sendErrorMessage(player, "Maximum amount of " + fileName +
|
BooksWithoutBorders.sendErrorMessage(player, "Maximum amount of " + fileName +
|
||||||
" duplicates reached!");
|
" duplicates reached!");
|
||||||
BooksWithoutBorders.sendErrorMessage(player, "Use " + getCommandColor() + "/savebook true " +
|
BooksWithoutBorders.sendErrorMessage(player, "Use " + getCommandColor() + (saveToPublicFolder ?
|
||||||
|
"/savepublicbook" : "/savebook") + "true " +
|
||||||
getErrorColor() + "to overwrite!");
|
getErrorColor() + "to overwrite!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user