Removes duplicate payment
This commit is contained in:
parent
ce249a93b3
commit
11108011a5
@ -41,9 +41,6 @@ public class CommandCopy implements TabExecutor {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: Rewrite this so the resulting book becomes a COPY, or COPY OF COPY
|
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
ItemStack heldBook = InventoryHelper.getHeldBook(player, true);
|
ItemStack heldBook = InventoryHelper.getHeldBook(player, true);
|
||||||
int copies = Integer.parseInt(args[0]);
|
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();
|
BookMeta bookMeta = (BookMeta) heldBook.getItemMeta();
|
||||||
if (BooksWithoutBordersConfig.changeGenerationOnCopy() && bookMeta != null && bookMeta.hasGeneration()) {
|
if (BooksWithoutBordersConfig.changeGenerationOnCopy() && bookMeta != null && bookMeta.hasGeneration()) {
|
||||||
return copyNextGenerationBook(bookMeta, player, copies);
|
return copyNextGenerationBook(bookMeta, player, copies);
|
||||||
|
Loading…
Reference in New Issue
Block a user