WorldEdit

WorldEdit

44M Downloads

Perf Command Data Should Be Persistent On Server Restart

RitzKid76 opened this issue ยท 1 comments

commented

The Problem

The command //perf settings are reset to default every time the server is restarted. The user may not expect their settings to be reverted to default. Reverted settings create undesired outcomes other than what the user may have expected.

A Solution

Any setting changed under //perf should be stored in the persistent storage for world edit data. This would prevent players from constantly reminding themselves that their settings before the server restart may not be the same, which causes undesired behavior.

Alternatives

One alternative would be accessing these command settings through the API. Server admins could just implement their solutions to the problem instead. The self-implementation fix is not preferred because the developer may not even be aware of the issue in the first place.

Anything Else?

No response

commented

If you want to implement this yourself, you can do this:

session.setSideEffectSet(session.getSideEffectSet().with(SideEffect.VALIDATION, SideEffect.State.ON));

On the matter of persisting it, by the looks of it, that should be as simple as removing the transient qualifier on the sideEffectSet field in the LocalSession class.
That should make the library WE uses for saving pick it up and persist it.
So if you want to change that in your personal fork, go ahead.

I can't say I'm in favor of doing that in WorldEdit itself, though.
Persisting //perf would probably lead to an increase in spurious bug reports and other noise.
But I don't have a dog in that fight, the devs might have other opinions.