mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-22 15:22:56 +01:00
Return AIR if the amount is 0 or below
This commit is contained in:
parent
adfb487140
commit
0fea9b39a2
@ -99,6 +99,9 @@ public class ItemStackBuilder {
|
||||
|
||||
@Contract(value = "-> new", pure = true)
|
||||
public @NotNull ItemStack build() {
|
||||
if (amount <= 0)
|
||||
return ItemStack.AIR;
|
||||
|
||||
return new ItemStack(material, amount, metaBuilder.build());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user