Fixed NullPointerException when processing transactions for dyed armor
This commit is contained in:
parent
7e49c95832
commit
7825f61e45
1 changed files with 2 additions and 1 deletions
|
|
@ -6,6 +6,7 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Color;
|
import org.bukkit.Color;
|
||||||
import org.bukkit.FireworkEffect;
|
import org.bukkit.FireworkEffect;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
|
@ -131,7 +132,7 @@ public class ItemMetaHandler {
|
||||||
LeatherArmorMeta meta = (LeatherArmorMeta) itemMeta;
|
LeatherArmorMeta meta = (LeatherArmorMeta) itemMeta;
|
||||||
LeatherArmorMeta subMeta = meta.clone();
|
LeatherArmorMeta subMeta = meta.clone();
|
||||||
|
|
||||||
meta.setColor(null);
|
meta.setColor(Bukkit.getServer().getItemFactory().getDefaultLeatherColor());
|
||||||
list.add(meta.serialize());
|
list.add(meta.serialize());
|
||||||
metadata.add(list);
|
metadata.add(list);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue