From cf57ddf52d76deff0fa2682ab2d219b39262598e Mon Sep 17 00:00:00 2001 From: Pug <81167232+MerchantPug@users.noreply.github.com> Date: Wed, 13 Mar 2024 18:41:40 +1100 Subject: [PATCH] Origins: Move code out of ifPresent check. --- .../origins/common/capabilities/OriginContainer.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/io/github/edwinmindcraft/origins/common/capabilities/OriginContainer.java b/src/main/java/io/github/edwinmindcraft/origins/common/capabilities/OriginContainer.java index f216ff9b..a6357809 100644 --- a/src/main/java/io/github/edwinmindcraft/origins/common/capabilities/OriginContainer.java +++ b/src/main/java/io/github/edwinmindcraft/origins/common/capabilities/OriginContainer.java @@ -69,11 +69,11 @@ public void setOriginInternal(@NotNull OriginLayer layer, @NotNull Origin origin this.grantPowers(container, origin); if (previous != null) container.removeAllPowersFromSource(OriginsAPI.getPowerSource(previous)); - if (this.hasAllOrigins()) - this.hadAllOrigins.set(true); - if (this.player instanceof ServerPlayer sp) - ChoseOriginCriterion.INSTANCE.trigger(sp, origin); }); + if (this.hasAllOrigins()) + this.hadAllOrigins.set(true); + if (this.player instanceof ServerPlayer sp) + ChoseOriginCriterion.INSTANCE.trigger(sp, origin); } this.synchronize(); }