centralize all ModConfig.SERVER reads through SettingsAccessor
No more direct ModConfig.SERVER access outside SettingsAccessor. 32 new accessor methods, 21 consumer files rerouted.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.tiedup.remake.v2.bondage.network;
|
||||
|
||||
import com.tiedup.remake.core.SettingsAccessor;
|
||||
import com.tiedup.remake.items.base.IHasResistance;
|
||||
import com.tiedup.remake.items.base.ILockable;
|
||||
import com.tiedup.remake.minigame.ContinuousStruggleMiniGameState;
|
||||
@@ -76,7 +77,7 @@ public class PacketV2StruggleStart {
|
||||
|
||||
// RISK-002 fix: respect server config
|
||||
if (
|
||||
!com.tiedup.remake.core.ModConfig.SERVER.struggleMiniGameEnabled.get()
|
||||
!SettingsAccessor.isStruggleMiniGameEnabled()
|
||||
) return;
|
||||
|
||||
int resistance = resistanceItem.getCurrentResistance(stack, player);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.tiedup.remake.v2.furniture.network;
|
||||
|
||||
import com.tiedup.remake.core.SettingsAccessor;
|
||||
import com.tiedup.remake.core.TiedUpMod;
|
||||
import com.tiedup.remake.items.ItemLockpick;
|
||||
import com.tiedup.remake.minigame.ContinuousStruggleMiniGameState;
|
||||
@@ -203,7 +204,7 @@ public class PacketFurnitureEscape {
|
||||
|
||||
// Respect server config: if struggle minigame is disabled, skip
|
||||
if (
|
||||
!com.tiedup.remake.core.ModConfig.SERVER.struggleMiniGameEnabled.get()
|
||||
!SettingsAccessor.isStruggleMiniGameEnabled()
|
||||
) {
|
||||
TiedUpMod.LOGGER.debug(
|
||||
"[PacketFurnitureEscape] Struggle minigame disabled by server config"
|
||||
@@ -333,7 +334,7 @@ public class PacketFurnitureEscape {
|
||||
|
||||
// Respect server config: if lockpick minigame is disabled, skip
|
||||
if (
|
||||
!com.tiedup.remake.core.ModConfig.SERVER.lockpickMiniGameEnabled.get()
|
||||
!SettingsAccessor.isLockpickMiniGameEnabled()
|
||||
) {
|
||||
TiedUpMod.LOGGER.debug(
|
||||
"[PacketFurnitureEscape] Lockpick minigame disabled by server config"
|
||||
|
||||
Reference in New Issue
Block a user