diff options
Diffstat (limited to 'Fabric')
| -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(); + } + } |
