mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-29 19:41:24 +01:00
Fix banner parsing issue
This commit is contained in:
parent
9f3e4e22dc
commit
4245ebaa33
@ -132,11 +132,11 @@ public class ItemParser {
|
||||
if (part.length == 2) {
|
||||
return new ItemStack(Material.BANNER, Integer.parseInt(part[1]));
|
||||
}
|
||||
if (part.length > 3) {
|
||||
if (part.length >= 3) {
|
||||
int reqAmount = Integer.parseInt(part[1]);
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
ItemStack result = new ItemStack(Material.BANNER, reqAmount, (short) DyeColor.valueOf(part[2]).getDyeData());
|
||||
ItemStack result = new ItemStack(Material.BANNER, reqAmount, DyeColor.valueOf(part[2]).getDyeData());
|
||||
|
||||
BannerMeta meta = (BannerMeta) result.getItemMeta();
|
||||
for (int i = 3; i < part.length; i += 2) {
|
||||
|
Loading…
Reference in New Issue
Block a user