diff options
| author | Aizistral | 2022-07-09 16:06:44 +0200 |
|---|---|---|
| committer | Aizistral | 2022-07-09 16:06:44 +0200 |
| commit | 6d0d5410f95100fe9b811b7619b84066c591df22 (patch) | |
| tree | 320ab5ec1e8ee76140f9d6fe495009212939d4cc /src/main/java | |
| parent | b5cffd62dc649b54d318da07c57f822ddb963d15 (diff) | |
Remove `forceAllowMultiplayer`
Diffstat (limited to 'src/main/java')
| -rw-r--r-- | src/main/java/com/aizistral/nochatreports/core/NoReportsConfig.java | 6 | ||||
| -rw-r--r-- | src/main/java/com/aizistral/nochatreports/mixins/MixinMinecraft.java | 21 |
2 files changed, 1 insertions, 26 deletions
diff --git a/src/main/java/com/aizistral/nochatreports/core/NoReportsConfig.java b/src/main/java/com/aizistral/nochatreports/core/NoReportsConfig.java index 3bd8bfc..93b7a1c 100644 --- a/src/main/java/com/aizistral/nochatreports/core/NoReportsConfig.java +++ b/src/main/java/com/aizistral/nochatreports/core/NoReportsConfig.java @@ -27,7 +27,7 @@ public class NoReportsConfig { private static final Gson GSON = new GsonBuilder().setPrettyPrinting().create(); private static NoReportsConfig INSTANCE; private boolean demandOnClient, demandOnServer, enableDebugLog, convertToGameMessage = true, - forceAllowMultiplayer = true, showServerSafety = true, suppressMessageTrustIndicators = true, + showServerSafety = true, suppressMessageTrustIndicators = true, scrambleTimestamps = true, alwaysHideReportButton = false; private List<String> whitelistedServers; @@ -93,10 +93,6 @@ public class NoReportsConfig { return getInstance().convertToGameMessage; } - public static boolean forceAllowMultiplayer() { - return getInstance().forceAllowMultiplayer; - } - public static boolean showServerSafety() { return getInstance().showServerSafety; } diff --git a/src/main/java/com/aizistral/nochatreports/mixins/MixinMinecraft.java b/src/main/java/com/aizistral/nochatreports/mixins/MixinMinecraft.java index a4bc7a3..e1d986b 100644 --- a/src/main/java/com/aizistral/nochatreports/mixins/MixinMinecraft.java +++ b/src/main/java/com/aizistral/nochatreports/mixins/MixinMinecraft.java @@ -28,25 +28,4 @@ public class MixinMinecraft { } } - @Inject(method = "multiplayerBan", at = @At("HEAD"), cancellable = true) - private void onFetchBanDetails(CallbackInfoReturnable<BanDetails> info) { - if (NoReportsConfig.forceAllowMultiplayer()) { - info.setReturnValue(null); - } - } - - @Inject(method = "allowsMultiplayer", at = @At("HEAD"), cancellable = true) - private void onMultiplayerCheck(CallbackInfoReturnable<Boolean> info) { - if (NoReportsConfig.forceAllowMultiplayer()) { - info.setReturnValue(true); - } - } - - @Inject(method = "getChatStatus", at = @At("HEAD"), cancellable = true) - private void onChatStatusCheck(CallbackInfoReturnable<ChatStatus> info) { - if (NoReportsConfig.forceAllowMultiplayer()) { - info.setReturnValue(ChatStatus.ENABLED); - } - } - } |
