@@ -24,13 +24,9 @@ public class Configs {
24
24
@ Config (readOnly = true , temporary = true )
25
25
public static PlayerRandCracker .CrackState playerCrackState = PlayerRandCracker .CrackState .UNCRACKED ;
26
26
27
- @ Config (setter = @ Config .Setter ("setEnchantingPrediction" ), temporary = true )
28
- private static boolean enchantingPrediction = false ;
29
- public static boolean getEnchantingPrediction () {
30
- return enchantingPrediction ;
31
- }
32
- public static void setEnchantingPrediction (boolean enchantingPrediction ) {
33
- Configs .enchantingPrediction = enchantingPrediction ;
27
+ @ Config (onChange = "onChangeEnchantingPrediction" , temporary = true )
28
+ public static boolean enchantingPrediction = false ;
29
+ private static void onChangeEnchantingPrediction (boolean oldEnchantingPrediction , boolean enchantingPrediction ) {
34
30
if (enchantingPrediction ) {
35
31
ServerBrandManager .rngWarning ();
36
32
} else {
@@ -53,13 +49,9 @@ public boolean isEnabled() {
53
49
}
54
50
}
55
51
56
- @ Config (setter = @ Config .Setter ("setFishingManipulation" ), temporary = true , condition = "conditionLessThan1_20" )
57
- private static FishingManipulation fishingManipulation = FishingManipulation .OFF ;
58
- public static FishingManipulation getFishingManipulation () {
59
- return fishingManipulation ;
60
- }
61
- public static void setFishingManipulation (FishingManipulation fishingManipulation ) {
62
- Configs .fishingManipulation = fishingManipulation ;
52
+ @ Config (onChange = "onChangeFishingManipulation" , temporary = true , condition = "conditionLessThan1_20" )
53
+ public static FishingManipulation fishingManipulation = FishingManipulation .OFF ;
54
+ private static void onChangeFishingManipulation (FishingManipulation oldFishingManipulation , FishingManipulation fishingManipulation ) {
63
55
if (fishingManipulation .isEnabled ()) {
64
56
ServerBrandManager .rngWarning ();
65
57
} else {
@@ -122,13 +114,9 @@ public static void setMaxEnchantLevels(int maxEnchantLevels) {
122
114
Configs .minEnchantLevels = Math .min (Configs .minEnchantLevels , Configs .maxEnchantLevels );
123
115
}
124
116
125
- @ Config (setter = @ Config .Setter ("setChorusManipulation" ), temporary = true )
126
- private static boolean chorusManipulation = false ;
127
- public static boolean getChorusManipulation () {
128
- return chorusManipulation ;
129
- }
130
- public static void setChorusManipulation (boolean chorusManipulation ) {
131
- Configs .chorusManipulation = chorusManipulation ;
117
+ @ Config (onChange = "onChangeChorusManipulation" , temporary = true )
118
+ public static boolean chorusManipulation = false ;
119
+ public static void onChangeChorusManipulation (boolean oldChorusManipulation , boolean chorusManipulation ) {
132
120
if (chorusManipulation ) {
133
121
ServerBrandManager .rngWarning ();
134
122
ChorusManipulation .onChorusManipEnabled ();
0 commit comments