We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1c38357 commit 2f2813cCopy full SHA for 2f2813c
AdvancedCore/src/com/bencodez/advancedcore/api/item/ItemBuilder.java
@@ -159,6 +159,17 @@ public ItemBuilder(ConfigurationSection data) {
159
} else {
160
is = new ItemStack(Material.STONE);
161
}
162
+ int amount = data.getInt("Amount");
163
+ int minAmount = data.getInt("MinAmount");
164
+ int maxAmount = data.getInt("MaxAmount");
165
+
166
+ int currentAmount = 0;
167
+ if (amount > 0) {
168
+ currentAmount = amount;
169
+ } else {
170
+ currentAmount = ThreadLocalRandom.current().nextInt(minAmount, maxAmount + 1);
171
+ }
172
+ is.setAmount(currentAmount);
173
174
175
Material material = null;
0 commit comments