mirror of
https://github.com/Aizistral-Studios/No-Chat-Restrictions.git
synced 2026-02-04 05:38:24 +00:00
Update mixins and code for 1.19.4
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user