mirror of
https://github.com/HibiscusMC/HMCCosmetics.git
synced 2025-12-20 15:39:16 +00:00
fix: check if item is null
This commit is contained in:
@@ -218,15 +218,15 @@ public class CosmeticUser {
|
|||||||
item = cosmetic.getItem();
|
item = cosmetic.getItem();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (item == null) {
|
|
||||||
MessagesUtil.sendDebugMessages("GetUserCosemticUser Item is null");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return getUserCosmeticItem(cosmetic, item);
|
return getUserCosmeticItem(cosmetic, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public ItemStack getUserCosmeticItem(Cosmetic cosmetic, ItemStack item) {
|
public ItemStack getUserCosmeticItem(Cosmetic cosmetic, ItemStack item) {
|
||||||
|
if (item == null) {
|
||||||
|
MessagesUtil.sendDebugMessages("GetUserCosemticUser Item is null");
|
||||||
|
return new ItemStack(Material.AIR);
|
||||||
|
}
|
||||||
if (item.hasItemMeta()) {
|
if (item.hasItemMeta()) {
|
||||||
ItemMeta itemMeta = item.getItemMeta();
|
ItemMeta itemMeta = item.getItemMeta();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user