mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-28 13:45:32 +01:00
Only subtract progress from place block objs if same type, fixes #866
This commit is contained in:
parent
742d6252c1
commit
0dfe461b71
@ -461,7 +461,7 @@ public class PlayerListener implements Listener {
|
|||||||
}
|
}
|
||||||
if (quester.containsObjective(quest, "placeBlock")) {
|
if (quester.containsObjective(quest, "placeBlock")) {
|
||||||
for (ItemStack is : quester.getQuestData(quest).blocksPlaced) {
|
for (ItemStack is : quester.getQuestData(quest).blocksPlaced) {
|
||||||
if (is.getAmount() > 0) {
|
if (evt.getBlock().getType().equals(is.getType()) && is.getAmount() > 0) {
|
||||||
int index = quester.getQuestData(quest).blocksPlaced.indexOf(is);
|
int index = quester.getQuestData(quest).blocksPlaced.indexOf(is);
|
||||||
is.setAmount(is.getAmount() - 1);
|
is.setAmount(is.getAmount() - 1);
|
||||||
quester.getQuestData(quest).blocksPlaced.set(index, is);
|
quester.getQuestData(quest).blocksPlaced.set(index, is);
|
||||||
|
Loading…
Reference in New Issue
Block a user