mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-24 11:38:42 +01:00
Remove-items by Material rather than ItemStack, fixes #48
This commit is contained in:
parent
a5ba267f11
commit
71f5496c64
@ -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);
|
||||
|
@ -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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user