Package net.minecraft.server.filter
Class TextFilterer
java.lang.Object
net.minecraft.server.filter.TextFilterer
- All Implemented Interfaces:
AutoCloseable
- Mappings:
Namespace Name named net/minecraft/server/filter/TextFilterer
intermediary net/minecraft/class_5514
official ars
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static interface
private class
private static interface
private static interface
-
Field Summary
Modifier and TypeFieldDescriptionprivate final String
private static final String
private final URL
(package private) final ExecutorService
(package private) final TextFilterer.HashIgnorer
(package private) final TextFilterer.ProfileEncoder
(package private) final URL
(package private) final TextFilterer.ProfileEncoder
(package private) final URL
private static final Logger
private final TextFilterer.MessageEncoder
private static final AtomicInteger
private static final ThreadFactory
-
Constructor Summary
ModifierConstructorDescriptionprivate
TextFilterer
(URL chatEndpoint, TextFilterer.MessageEncoder messageEncoder, URL joinEndpoint, TextFilterer.ProfileEncoder joinEncoder, URL leaveEndpoint, TextFilterer.ProfileEncoder leaveEncoder, String apiKey, TextFilterer.HashIgnorer ignorer, int parallelism) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
private void
consumeFully
(InputStream inputStream) private HttpURLConnection
createConnection
(JsonObject payload, URL endpoint) createFilterer
(com.mojang.authlib.GameProfile gameProfile) (package private) CompletableFuture
<FilteredMessage> filterMessage
(com.mojang.authlib.GameProfile gameProfile, String message, TextFilterer.HashIgnorer ignorer, Executor executor) private static URL
getEndpoint
(URI root, @Nullable JsonObject endpoints, String key, String fallback) private FilterMask
getMask
(String message, JsonArray mask, TextFilterer.HashIgnorer ignorer) private static String
getValue
(@Nullable JsonObject json, String key, String fallback) static @Nullable TextFilterer
(package private) void
sendJoinOrLeaveRequest
(com.mojang.authlib.GameProfile gameProfile, URL endpoint, TextFilterer.ProfileEncoder profileEncoder, Executor executor) private JsonObject
sendJsonRequest
(JsonObject payload, URL endpoint) private void
sendRequest
(JsonObject payload, URL endpoint)
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector named LOGGER
Lnet/minecraft/server/filter/TextFilterer;LOGGER:Lorg/slf4j/Logger;
intermediary field_26823
Lnet/minecraft/class_5514;field_26823:Lorg/slf4j/Logger;
official a
Lars;a:Lorg/slf4j/Logger;
-
NEXT_WORKER_ID
- Mappings:
Namespace Name Mixin selector named NEXT_WORKER_ID
Lnet/minecraft/server/filter/TextFilterer;NEXT_WORKER_ID:Ljava/util/concurrent/atomic/AtomicInteger;
intermediary field_26824
Lnet/minecraft/class_5514;field_26824:Ljava/util/concurrent/atomic/AtomicInteger;
official b
Lars;b:Ljava/util/concurrent/atomic/AtomicInteger;
-
THREAD_FACTORY
- Mappings:
Namespace Name Mixin selector named THREAD_FACTORY
Lnet/minecraft/server/filter/TextFilterer;THREAD_FACTORY:Ljava/util/concurrent/ThreadFactory;
intermediary field_26825
Lnet/minecraft/class_5514;field_26825:Ljava/util/concurrent/ThreadFactory;
official c
Lars;c:Ljava/util/concurrent/ThreadFactory;
-
CHAT_ENDPOINT
- See Also:
- Mappings:
Namespace Name Mixin selector named CHAT_ENDPOINT
Lnet/minecraft/server/filter/TextFilterer;CHAT_ENDPOINT:Ljava/lang/String;
intermediary field_38055
Lnet/minecraft/class_5514;field_38055:Ljava/lang/String;
official d
Lars;d:Ljava/lang/String;
-
chatEndpoint
- Mappings:
Namespace Name Mixin selector named chatEndpoint
Lnet/minecraft/server/filter/TextFilterer;chatEndpoint:Ljava/net/URL;
intermediary field_26826
Lnet/minecraft/class_5514;field_26826:Ljava/net/URL;
official e
Lars;e:Ljava/net/URL;
-
messageEncoder
- Mappings:
Namespace Name Mixin selector named messageEncoder
Lnet/minecraft/server/filter/TextFilterer;messageEncoder:Lnet/minecraft/server/filter/TextFilterer$MessageEncoder;
intermediary field_38056
Lnet/minecraft/class_5514;field_38056:Lnet/minecraft/class_5514$class_7242;
official f
Lars;f:Lars$c;
-
joinEndpoint
- Mappings:
Namespace Name Mixin selector named joinEndpoint
Lnet/minecraft/server/filter/TextFilterer;joinEndpoint:Ljava/net/URL;
intermediary field_26827
Lnet/minecraft/class_5514;field_26827:Ljava/net/URL;
official g
Lars;g:Ljava/net/URL;
-
joinEncoder
- Mappings:
Namespace Name Mixin selector named joinEncoder
Lnet/minecraft/server/filter/TextFilterer;joinEncoder:Lnet/minecraft/server/filter/TextFilterer$ProfileEncoder;
intermediary field_38057
Lnet/minecraft/class_5514;field_38057:Lnet/minecraft/class_5514$class_7241;
official h
Lars;h:Lars$b;
-
leaveEndpoint
- Mappings:
Namespace Name Mixin selector named leaveEndpoint
Lnet/minecraft/server/filter/TextFilterer;leaveEndpoint:Ljava/net/URL;
intermediary field_26828
Lnet/minecraft/class_5514;field_26828:Ljava/net/URL;
official i
Lars;i:Ljava/net/URL;
-
leaveEncoder
- Mappings:
Namespace Name Mixin selector named leaveEncoder
Lnet/minecraft/server/filter/TextFilterer;leaveEncoder:Lnet/minecraft/server/filter/TextFilterer$ProfileEncoder;
intermediary field_38058
Lnet/minecraft/class_5514;field_38058:Lnet/minecraft/class_5514$class_7241;
official j
Lars;j:Lars$b;
-
apiKey
- Mappings:
Namespace Name Mixin selector named apiKey
Lnet/minecraft/server/filter/TextFilterer;apiKey:Ljava/lang/String;
intermediary field_26829
Lnet/minecraft/class_5514;field_26829:Ljava/lang/String;
official k
Lars;k:Ljava/lang/String;
-
ignorer
- Mappings:
Namespace Name Mixin selector named ignorer
Lnet/minecraft/server/filter/TextFilterer;ignorer:Lnet/minecraft/server/filter/TextFilterer$HashIgnorer;
intermediary field_26832
Lnet/minecraft/class_5514;field_26832:Lnet/minecraft/class_5514$class_5515;
official l
Lars;l:Lars$a;
-
executor
- Mappings:
Namespace Name Mixin selector named executor
Lnet/minecraft/server/filter/TextFilterer;executor:Ljava/util/concurrent/ExecutorService;
intermediary field_26833
Lnet/minecraft/class_5514;field_26833:Ljava/util/concurrent/ExecutorService;
official m
Lars;m:Ljava/util/concurrent/ExecutorService;
-
-
Constructor Details
-
TextFilterer
private TextFilterer(URL chatEndpoint, TextFilterer.MessageEncoder messageEncoder, URL joinEndpoint, TextFilterer.ProfileEncoder joinEncoder, URL leaveEndpoint, TextFilterer.ProfileEncoder leaveEncoder, String apiKey, TextFilterer.HashIgnorer ignorer, int parallelism) - Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/server/filter/TextFilterer;<init>(Ljava/net/URL;Lnet/minecraft/server/filter/TextFilterer$MessageEncoder;Ljava/net/URL;Lnet/minecraft/server/filter/TextFilterer$ProfileEncoder;Ljava/net/URL;Lnet/minecraft/server/filter/TextFilterer$ProfileEncoder;Ljava/lang/String;Lnet/minecraft/server/filter/TextFilterer$HashIgnorer;I)V
intermediary <init>
Lnet/minecraft/class_5514;<init>(Ljava/net/URL;Lnet/minecraft/class_5514$class_7242;Ljava/net/URL;Lnet/minecraft/class_5514$class_7241;Ljava/net/URL;Lnet/minecraft/class_5514$class_7241;Ljava/lang/String;Lnet/minecraft/class_5514$class_5515;I)V
official <init>
Lars;<init>(Ljava/net/URL;Lars$c;Ljava/net/URL;Lars$b;Ljava/net/URL;Lars$b;Ljava/lang/String;Lars$a;I)V
-
-
Method Details
-
getEndpoint
private static URL getEndpoint(URI root, @Nullable @Nullable JsonObject endpoints, String key, String fallback) throws MalformedURLException - Throws:
MalformedURLException
- Mappings:
Namespace Name Mixin selector named getEndpoint
Lnet/minecraft/server/filter/TextFilterer;getEndpoint(Ljava/net/URI;Lcom/google/gson/JsonObject;Ljava/lang/String;Ljava/lang/String;)Ljava/net/URL;
intermediary method_41206
Lnet/minecraft/class_5514;method_41206(Ljava/net/URI;Lcom/google/gson/JsonObject;Ljava/lang/String;Ljava/lang/String;)Ljava/net/URL;
official a
Lars;a(Ljava/net/URI;Lcom/google/gson/JsonObject;Ljava/lang/String;Ljava/lang/String;)Ljava/net/URL;
-
getValue
- Mappings:
Namespace Name Mixin selector named getValue
Lnet/minecraft/server/filter/TextFilterer;getValue(Lcom/google/gson/JsonObject;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
intermediary method_42111
Lnet/minecraft/class_5514;method_42111(Lcom/google/gson/JsonObject;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
official a
Lars;a(Lcom/google/gson/JsonObject;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
-
load
- Mappings:
Namespace Name Mixin selector named load
Lnet/minecraft/server/filter/TextFilterer;load(Ljava/lang/String;)Lnet/minecraft/server/filter/TextFilterer;
intermediary method_33805
Lnet/minecraft/class_5514;method_33805(Ljava/lang/String;)Lnet/minecraft/class_5514;
official a
Lars;a(Ljava/lang/String;)Lars;
-
sendJoinOrLeaveRequest
void sendJoinOrLeaveRequest(com.mojang.authlib.GameProfile gameProfile, URL endpoint, TextFilterer.ProfileEncoder profileEncoder, Executor executor) - Mappings:
Namespace Name Mixin selector named sendJoinOrLeaveRequest
Lnet/minecraft/server/filter/TextFilterer;sendJoinOrLeaveRequest(Lcom/mojang/authlib/GameProfile;Ljava/net/URL;Lnet/minecraft/server/filter/TextFilterer$ProfileEncoder;Ljava/util/concurrent/Executor;)V
intermediary method_31299
Lnet/minecraft/class_5514;method_31299(Lcom/mojang/authlib/GameProfile;Ljava/net/URL;Lnet/minecraft/class_5514$class_7241;Ljava/util/concurrent/Executor;)V
official a
Lars;a(Lcom/mojang/authlib/GameProfile;Ljava/net/URL;Lars$b;Ljava/util/concurrent/Executor;)V
-
filterMessage
CompletableFuture<FilteredMessage> filterMessage(com.mojang.authlib.GameProfile gameProfile, String message, TextFilterer.HashIgnorer ignorer, Executor executor) - Mappings:
Namespace Name Mixin selector named filterMessage
Lnet/minecraft/server/filter/TextFilterer;filterMessage(Lcom/mojang/authlib/GameProfile;Ljava/lang/String;Lnet/minecraft/server/filter/TextFilterer$HashIgnorer;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
intermediary method_31298
Lnet/minecraft/class_5514;method_31298(Lcom/mojang/authlib/GameProfile;Ljava/lang/String;Lnet/minecraft/class_5514$class_5515;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
official a
Lars;a(Lcom/mojang/authlib/GameProfile;Ljava/lang/String;Lars$a;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
-
getMask
- Mappings:
Namespace Name Mixin selector named getMask
Lnet/minecraft/server/filter/TextFilterer;getMask(Ljava/lang/String;Lcom/google/gson/JsonArray;Lnet/minecraft/server/filter/TextFilterer$HashIgnorer;)Lnet/minecraft/network/message/FilterMask;
intermediary method_45066
Lnet/minecraft/class_5514;method_45066(Ljava/lang/String;Lcom/google/gson/JsonArray;Lnet/minecraft/class_5514$class_5515;)Lnet/minecraft/class_7649;
official a
Lars;a(Ljava/lang/String;Lcom/google/gson/JsonArray;Lars$a;)Lwy;
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
consumeFully
- Throws:
IOException
- Mappings:
Namespace Name Mixin selector named consumeFully
Lnet/minecraft/server/filter/TextFilterer;consumeFully(Ljava/io/InputStream;)V
intermediary method_31300
Lnet/minecraft/class_5514;method_31300(Ljava/io/InputStream;)V
official a
Lars;a(Ljava/io/InputStream;)V
-
sendJsonRequest
- Throws:
IOException
- Mappings:
Namespace Name Mixin selector named sendJsonRequest
Lnet/minecraft/server/filter/TextFilterer;sendJsonRequest(Lcom/google/gson/JsonObject;Ljava/net/URL;)Lcom/google/gson/JsonObject;
intermediary method_31295
Lnet/minecraft/class_5514;method_31295(Lcom/google/gson/JsonObject;Ljava/net/URL;)Lcom/google/gson/JsonObject;
official a
Lars;a(Lcom/google/gson/JsonObject;Ljava/net/URL;)Lcom/google/gson/JsonObject;
-
sendRequest
- Throws:
IOException
- Mappings:
Namespace Name Mixin selector named sendRequest
Lnet/minecraft/server/filter/TextFilterer;sendRequest(Lcom/google/gson/JsonObject;Ljava/net/URL;)V
intermediary method_31304
Lnet/minecraft/class_5514;method_31304(Lcom/google/gson/JsonObject;Ljava/net/URL;)V
official b
Lars;b(Lcom/google/gson/JsonObject;Ljava/net/URL;)V
-
createConnection
- Throws:
IOException
- Mappings:
Namespace Name Mixin selector named createConnection
Lnet/minecraft/server/filter/TextFilterer;createConnection(Lcom/google/gson/JsonObject;Ljava/net/URL;)Ljava/net/HttpURLConnection;
intermediary method_31306
Lnet/minecraft/class_5514;method_31306(Lcom/google/gson/JsonObject;Ljava/net/URL;)Ljava/net/HttpURLConnection;
official c
Lars;c(Lcom/google/gson/JsonObject;Ljava/net/URL;)Ljava/net/HttpURLConnection;
-
createFilterer
- Mappings:
Namespace Name Mixin selector named createFilterer
Lnet/minecraft/server/filter/TextFilterer;createFilterer(Lcom/mojang/authlib/GameProfile;)Lnet/minecraft/server/filter/TextStream;
intermediary method_31297
Lnet/minecraft/class_5514;method_31297(Lcom/mojang/authlib/GameProfile;)Lnet/minecraft/class_5513;
official a
Lars;a(Lcom/mojang/authlib/GameProfile;)Larr;
-