fix: cme on potion effect syncing (#354)

* Started impl for mongo

* fix silly mistake with postgresql

* fix: race condition
feat/data-edit-commands
Preva1l 4 months ago committed by GitHub
parent c949c976d6
commit 32ac57e2a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -269,7 +269,8 @@ public abstract class FabricData implements Data {
@Override @Override
public void apply(@NotNull FabricUser user, @NotNull FabricHuskSync plugin) throws IllegalStateException { public void apply(@NotNull FabricUser user, @NotNull FabricHuskSync plugin) throws IllegalStateException {
final ServerPlayerEntity player = user.getPlayer(); final ServerPlayerEntity player = user.getPlayer();
player.getActiveStatusEffects().forEach((effect, instance) -> player.removeStatusEffect(effect)); List<StatusEffect> effectsToRemove = new ArrayList<>(player.getActiveStatusEffects().keySet());
effectsToRemove.forEach(player::removeStatusEffect);
getEffects().forEach(player::addStatusEffect); getEffects().forEach(player::addStatusEffect);
} }

Loading…
Cancel
Save