Removes duplicate payment

This commit is contained in:
Kristian Knarvik 2022-08-10 00:33:56 +02:00
parent ce249a93b3
commit 11108011a5

View File

@ -41,9 +41,6 @@ public class CommandCopy implements TabExecutor {
return false;
}
//TODO: Rewrite this so the resulting book becomes a COPY, or COPY OF COPY
try {
ItemStack heldBook = InventoryHelper.getHeldBook(player, true);
int copies = Integer.parseInt(args[0]);
@ -75,13 +72,6 @@ public class CommandCopy implements TabExecutor {
}
}
//Make sure the player can pay for the copying
if (BooksWithoutBordersConfig.booksHavePrice() &&
!player.hasPermission("bookswithoutborders.bypassBookPrice") &&
EconomyHelper.cannotPayForBookPrinting(player, copies)) {
return false;
}
BookMeta bookMeta = (BookMeta) heldBook.getItemMeta();
if (BooksWithoutBordersConfig.changeGenerationOnCopy() && bookMeta != null && bookMeta.hasGeneration()) {
return copyNextGenerationBook(bookMeta, player, copies);