mirror of
https://github.com/HibiscusMC/HMCCosmetics.git
synced 2025-12-19 15:09:19 +00:00
perf: do not double call Map get (microoptimization)
This commit is contained in:
@@ -301,11 +301,10 @@ public class CosmeticUser implements CosmeticHolder {
|
||||
|
||||
@Override
|
||||
public void updateCosmetic(@NotNull CosmeticSlot slot) {
|
||||
if (getCosmetic(slot) == null) {
|
||||
return;
|
||||
Cosmetic cosmetic = playerCosmetics.get(slot);
|
||||
if (cosmetic != null) {
|
||||
cosmetic.update(this);
|
||||
}
|
||||
getCosmetic(slot).update(this);
|
||||
return;
|
||||
}
|
||||
|
||||
public void updateCosmetic(Cosmetic cosmetic) {
|
||||
|
||||
Reference in New Issue
Block a user