Skip to content

Commit

Permalink
Only set supported and exposed side effects with //perf on and `//p…
Browse files Browse the repository at this point in the history
…erf off`. Fixes #2428
  • Loading branch information
me4502 committed Oct 26, 2023
1 parent cd0f107 commit 98d396f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,10 @@ void perf(Actor actor, LocalSession session,
}
} else if (newState != null) {
SideEffectSet applier = session.getSideEffectSet();
for (SideEffect sideEffectEntry : SideEffect.values()) {
applier = applier.with(sideEffectEntry, newState);
for (SideEffect sideEffectEntry : WorldEdit.getInstance().getPlatformManager().getSupportedSideEffects()) {
if (sideEffectEntry.isExposed()) {
applier = applier.with(sideEffectEntry, newState);
}
}
session.setSideEffectSet(applier);
if (!showInfoBox) {
Expand Down

0 comments on commit 98d396f

Please sign in to comment.