-
-
Save JanTuck/1ebd5c4cff3b4b7db471be804a737937 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static void removeItem(Player p, Material mat, int removeAmount) { | |
ItemStack itemStack = new ItemStack(mat, removeAmount); | |
p.getInventory().removeItem(itemStack); | |
} | |
private static void removeItem(Player p, ItemStack item, int removeAmount) { | |
ItemStack clonedItem = item; | |
clonedItem.setAmount( removeAmount); | |
p.getInventory().removeItem(clonedItem); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment