mirror of
https://github.com/HibiscusMC/HMCCosmetics.git
synced 2025-12-30 04:19:28 +00:00
fix: cosmetic null showing error
This commit is contained in:
@@ -62,8 +62,9 @@ public class HMCPlaceholderExpansion extends PlaceholderExpansion {
|
||||
}
|
||||
if (placeholderArgs.get(1) != null) {
|
||||
Cosmetic cosmetic = Cosmetics.getCosmetic(placeholderArgs.get(1));
|
||||
if (cosmetic == null) return "INVALID_COSMETIC";
|
||||
Cosmetic currentCosmetic = user.getCosmetic(cosmetic.getSlot());
|
||||
if (cosmetic == null || currentCosmetic == null) return "false";
|
||||
if (currentCosmetic == null) return "false";
|
||||
if (currentCosmetic.getId() == cosmetic.getId()) return "true";
|
||||
return "false";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user