9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2025-12-19 15:09:19 +00:00

fix: improper call to getEntity when not needed

This commit is contained in:
LoJoSho
2025-05-23 13:22:29 -05:00
parent 7a6475c467
commit ef665e7e83

View File

@@ -144,7 +144,7 @@ public class CosmeticUser implements CosmeticHolder {
showCosmetics(HiddenReason.GAMEMODE);
}
if (bukkitPlayer != null && Settings.getDisabledWorlds().contains(getEntity().getLocation().getWorld().getName())) {
if (bukkitPlayer != null && Settings.getDisabledWorlds().contains(bukkitPlayer.getLocation().getWorld().getName())) {
MessagesUtil.sendDebugMessages("Hiding Cosmetics due to world");
hideCosmetics(CosmeticUser.HiddenReason.WORLD);
} else if (this.isHidden(HiddenReason.WORLD)) {