API Change: Added setter for CustomBlockMineEvent drops

If issues arise with MMOCore Block Regen Drops @Monzter :D
This commit is contained in:
Dancull47 2021-10-25 03:44:08 -04:00
parent c5b661e3e2
commit 3014cc0a72
2 changed files with 7 additions and 1 deletions

View File

@ -14,7 +14,7 @@ public class CustomBlockMineEvent extends PlayerDataEvent implements Cancellable
private final Block block; private final Block block;
private final BlockInfo info; private final BlockInfo info;
private final List<ItemStack> drops; private List<ItemStack> drops;
private boolean cancelled; private boolean cancelled;
@ -39,6 +39,10 @@ public class CustomBlockMineEvent extends PlayerDataEvent implements Cancellable
return info; return info;
} }
public void setDrops(List<ItemStack> list) {
this.drops = list;
}
@Override @Override
public boolean isCancelled() { public boolean isCancelled() {
return cancelled; return cancelled;

View File

@ -102,6 +102,8 @@ public class BlockListener implements Listener {
return; return;
} }
drops = called.getDrops();
/* /*
* Remove vanilla drops if needed and * Remove vanilla drops if needed and
* decreases the durability of the item * decreases the durability of the item