Adds permission to bypass author only save

This commit is contained in:
Kristian Knarvik 2022-08-11 01:14:50 +02:00
parent 8b47aeb8f2
commit c6c018ee88
2 changed files with 5 additions and 1 deletions

View File

@ -78,7 +78,8 @@ public class CommandSave implements TabExecutor {
//Only allow saving of own books if enabled //Only allow saving of own books if enabled
if (BooksWithoutBordersConfig.getAuthorOnlySave() && !saveToPublicFolder && if (BooksWithoutBordersConfig.getAuthorOnlySave() && !saveToPublicFolder &&
BookHelper.isNotAuthor(player, book)) { (!player.hasPermission("bookswithoutborders.bypassAuthorOnlySave") &&
BookHelper.isNotAuthor(player, book))) {
return; return;
} }

View File

@ -116,6 +116,7 @@ permissions:
bookswithoutborders.givepublic: true bookswithoutborders.givepublic: true
bookswithoutborders.bypassauthoronlycopy: true bookswithoutborders.bypassauthoronlycopy: true
bookswithoutborders.bypassauthoronlyunsign: true bookswithoutborders.bypassauthoronlyunsign: true
bookswithoutborders.bypassauthoronlysave: true
bookswithoutborders.bypassbookprice: true bookswithoutborders.bypassbookprice: true
bookswithoutborders.setbookprice: true bookswithoutborders.setbookprice: true
bookswithoutborders.reload: true bookswithoutborders.reload: true
@ -173,6 +174,8 @@ permissions:
description: Allows player to ignore Author_Only_Copy config setting description: Allows player to ignore Author_Only_Copy config setting
bookswithoutborders.bypassauthoronlyunsign: bookswithoutborders.bypassauthoronlyunsign:
description: Allows player to ignore Author_Only_Unsign config setting description: Allows player to ignore Author_Only_Unsign config setting
bookswithoutborders.bypassauthoronlysave:
description: Allows player to ignore Author_Only_Save config setting
bookswithoutborders.bypassbookprice: bookswithoutborders.bypassbookprice:
description: Allows player to ignore Price_to_create_book config setting description: Allows player to ignore Price_to_create_book config setting
bookswithoutborders.setbookprice: bookswithoutborders.setbookprice: