Remove-items by Material rather than ItemStack, fixes #48

This commit is contained in:
HappyPikachu 2017-07-17 23:48:05 -04:00
parent a5ba267f11
commit 71f5496c64
2 changed files with 1 additions and 2 deletions

View File

@ -1868,7 +1868,6 @@ public class Quester {
for (String s : completedTimes.keySet()) {
questTimeNames.add(s);
questTimes.add(completedTimes.get(s));
System.out.println("Saving = " + s + " " + completedTimes.get(s));
}
data.set("completedRedoableQuests", questTimeNames);
data.set("completedQuestTimes", questTimes);

View File

@ -3614,7 +3614,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
public static boolean removeItem(Inventory inventory, ItemStack is) {
int amount = is.getAmount();
HashMap<Integer, ? extends ItemStack> allItems = inventory.all(is);
HashMap<Integer, ? extends ItemStack> allItems = inventory.all(is.getType());
HashMap<Integer, Integer> removeFrom = new HashMap<Integer, Integer>();
int foundAmount = 0;
for (Map.Entry<Integer, ? extends ItemStack> item : allItems.entrySet()) {