Fix AbstractItemDb#getMatching improper block filtering (#3691)

Co-authored-by: JRoy <joshroy126@gmail.com>
This commit is contained in:
Luuk 2021-01-03 18:45:32 +01:00 committed by GitHub
parent 5528b5b92c
commit 01987a0374
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -160,7 +160,7 @@ public abstract class AbstractItemDb implements IConf, net.ess3.api.IItemDb {
}
} else if (args[0].equalsIgnoreCase("blocks")) {
for (final ItemStack stack : user.getBase().getInventory().getContents()) {
if (stack == null || stack.getType() == Material.AIR) {
if (stack == null || stack.getType() == Material.AIR || !stack.getType().isBlock()) {
continue;
}
is.add(stack.clone());