mirror of
https://github.com/HibiscusMC/HMCCosmetics.git
synced 2025-12-31 04:46:42 +00:00
check if user is created on potion effect event
This commit is contained in:
@@ -206,6 +206,7 @@ public class PlayerGameListener implements Listener {
|
||||
if (!event.getEntityType().equals(EntityType.PLAYER)) return;
|
||||
Player player = (Player) event.getEntity();
|
||||
CosmeticUser user = CosmeticUsers.getUser(player);
|
||||
if (user == null) return;
|
||||
if (event.getAction().equals(EntityPotionEffectEvent.Action.ADDED)) {
|
||||
user.hideCosmetics(CosmeticUser.HiddenReason.POTION);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user