Removes duplicate payment
This commit is contained in:
		@@ -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);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user