mirror of
https://github.com/songoda/SongodaCore.git
synced 2024-11-23 18:45:34 +01:00
Added the ability to specify an amount for getItem.
This commit is contained in:
parent
9d10a730d9
commit
a6e725497a
@ -1250,10 +1250,18 @@ public enum CompatibleMaterial {
|
||||
* @return an item that resembles this material for the current server version
|
||||
*/
|
||||
public ItemStack getItem() {
|
||||
return getItem(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param amount the amount to return
|
||||
* @return an item that resembles this material for the current server version
|
||||
*/
|
||||
public ItemStack getItem(int amount) {
|
||||
if (usesCompatibility()) {
|
||||
return compatibleMaterial.getItem();
|
||||
}
|
||||
return data != null ? new ItemStack(material, 1, data) : new ItemStack(material);
|
||||
return data != null ? new ItemStack(material, amount, data) : new ItemStack(material);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user