Apply empty pattern list instead of bare null
This commit is contained in:
parent
65656c1ac9
commit
d7d9166eab
@ -25,6 +25,10 @@ public class Shield {
|
|||||||
ItemMeta shieldMeta = shieldStack.getItemMeta();
|
ItemMeta shieldMeta = shieldStack.getItemMeta();
|
||||||
BlockStateMeta shieldbMeta = (BlockStateMeta)shieldMeta;
|
BlockStateMeta shieldbMeta = (BlockStateMeta)shieldMeta;
|
||||||
|
|
||||||
|
// Create empty pattern list if null is supplied
|
||||||
|
if(patternList == null)
|
||||||
|
patternList = new ArrayList<>();
|
||||||
|
|
||||||
Banner banner = (Banner)shieldbMeta.getBlockState();
|
Banner banner = (Banner)shieldbMeta.getBlockState();
|
||||||
banner.setPatterns(patternList);
|
banner.setPatterns(patternList);
|
||||||
banner.update(); // TODO: find out if it is needed
|
banner.update(); // TODO: find out if it is needed
|
||||||
|
Loading…
Reference in New Issue
Block a user