Refresh MidnightControlsFeature state on config change

This commit is contained in:
Motschen
2022-05-03 12:59:08 +02:00
parent 24288b3ebd
commit 78c858b753
2 changed files with 11 additions and 0 deletions

View File

@@ -98,6 +98,15 @@ public class MidnightControlsFeature implements Nameable {
this.enabled = enabled;
}
/**
* Refreshes the enabled values from the config.
*/
public static void refreshEnabled() {
MidnightControlsFeature.VERTICAL_REACHAROUND.setEnabled(MidnightControlsConfig.verticalReacharound);
MidnightControlsFeature.FAST_BLOCK_PLACING.setEnabled(MidnightControlsConfig.fastBlockPlacing);
MidnightControlsFeature.HORIZONTAL_REACHAROUND.setEnabled(MidnightControlsConfig.horizontalReacharound);
}
/**
* Returns whether this feature is available or not.
*