mirror of
https://github.com/songoda/UltimateKits.git
synced 2024-11-07 19:20:39 +01:00
Fix shield color nullpointer
This commit is contained in:
parent
1dbf31a223
commit
f4e1f8fb32
@ -219,7 +219,10 @@ public class Methods {
|
||||
case SHIELD:
|
||||
BlockStateMeta shieldMeta = (BlockStateMeta) item.getItemMeta();
|
||||
Banner shieldBannerMeta = (Banner) shieldMeta.getBlockState();
|
||||
int basecolor = shieldBannerMeta.getBaseColor().getColor().asRGB();
|
||||
int basecolor = 0;
|
||||
if (shieldBannerMeta.getBaseColor() != null) {
|
||||
basecolor = shieldBannerMeta.getBaseColor().getColor().asRGB();
|
||||
}
|
||||
str.append("basecolor:").append(basecolor).append(" ");
|
||||
for (org.bukkit.block.banner.Pattern p : shieldBannerMeta.getPatterns()) {
|
||||
String type = p.getPattern().getIdentifier();
|
||||
|
Loading…
Reference in New Issue
Block a user