diff options
| author | Aizistral | 2026-01-27 22:01:20 +0100 |
|---|---|---|
| committer | Aizistral | 2026-01-27 22:01:20 +0100 |
| commit | 7ffc1b0339c56a5e80e13d5ba2708ff70937f669 (patch) | |
| tree | 995ad58e87f11fba9862f3b62d37cb65b05a670b /Fabric/src/main | |
| parent | 6dd040f5afb3e95909fdf3324245e8fdf6720fa6 (diff) | |
Update mixins and code for 1.19.4
Diffstat (limited to 'Fabric/src/main')
| -rw-r--r-- | Fabric/src/main/java/com/aizistral/nochatrestrictions/core/WrappedUserApiService.java | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/Fabric/src/main/java/com/aizistral/nochatrestrictions/core/WrappedUserApiService.java b/Fabric/src/main/java/com/aizistral/nochatrestrictions/core/WrappedUserApiService.java index 6ca55cf..73ae2c1 100644 --- a/Fabric/src/main/java/com/aizistral/nochatrestrictions/core/WrappedUserApiService.java +++ b/Fabric/src/main/java/com/aizistral/nochatrestrictions/core/WrappedUserApiService.java @@ -1,11 +1,14 @@ package com.aizistral.nochatrestrictions.core; +import java.util.Map; import java.util.UUID; import java.util.concurrent.Executor; import com.google.common.collect.ImmutableSet; import com.mojang.authlib.minecraft.TelemetrySession; import com.mojang.authlib.minecraft.UserApiService; +import com.mojang.authlib.minecraft.report.AbuseReportLimits; +import com.mojang.authlib.yggdrasil.request.AbuseReportRequest; import com.mojang.authlib.yggdrasil.response.KeyPairResponse; public class WrappedUserApiService implements UserApiService { @@ -18,9 +21,10 @@ public class WrappedUserApiService implements UserApiService { flags.add(UserFlag.SERVERS_ALLOWED); // always let the player open multiplayer menu flags.add(UserFlag.REALMS_ALLOWED); // always let the player open Realms menu // flags.add(UserFlag.TELEMETRY_ENABLED); // not adding this for obvious reasons + // flags.add(UserFlag.OPTIONAL_TELEMETRY_AVAILABLE); // thanks but no thanks // flags.add(UserFlag.PROFANITY_FILTER_ENABLED) // not adding this one either - FORCED_PROPERTIES = new UserProperties(flags.build()); + FORCED_PROPERTIES = new UserProperties(flags.build(), Map.of()); } private final UserApiService service; @@ -49,10 +53,27 @@ public class WrappedUserApiService implements UserApiService { return TelemetrySession.DISABLED; } + // Methods below primarily concern chat reporting. Not doing anything with them + // here as that's out of scope for this mod, it's more of a No Chat Reports thing + @Override public KeyPairResponse getKeyPair() { - // Not doing anything with this as that's more of a No Chat Reports thing return this.service.getKeyPair(); } + @Override + public void reportAbuse(AbuseReportRequest request) { + this.service.reportAbuse(request); + } + + @Override + public boolean canSendReports() { + return this.service.canSendReports(); + } + + @Override + public AbuseReportLimits getAbuseReportLimits() { + return this.service.getAbuseReportLimits(); + } + } |
