Class TextFilterer

java.lang.Object
net.minecraft.server.filter.TextFilterer
All Implemented Interfaces:
AutoCloseable

public class TextFilterer extends Object implements AutoCloseable
Mappings:
Namespace Name
official agn
intermediary net/minecraft/class_5514
named net/minecraft/server/filter/TextFilterer
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      official a Lagn;a:Lorg/slf4j/Logger;
      intermediary field_26823 Lnet/minecraft/class_5514;field_26823:Lorg/slf4j/Logger;
      named LOGGER Lnet/minecraft/server/filter/TextFilterer;LOGGER:Lorg/slf4j/Logger;
    • NEXT_WORKER_ID

      private static final AtomicInteger NEXT_WORKER_ID
      Mappings:
      Namespace Name Mixin selector
      official b Lagn;b:Ljava/util/concurrent/atomic/AtomicInteger;
      intermediary field_26824 Lnet/minecraft/class_5514;field_26824:Ljava/util/concurrent/atomic/AtomicInteger;
      named NEXT_WORKER_ID Lnet/minecraft/server/filter/TextFilterer;NEXT_WORKER_ID:Ljava/util/concurrent/atomic/AtomicInteger;
    • THREAD_FACTORY

      private static final ThreadFactory THREAD_FACTORY
      Mappings:
      Namespace Name Mixin selector
      official c Lagn;c:Ljava/util/concurrent/ThreadFactory;
      intermediary field_26825 Lnet/minecraft/class_5514;field_26825:Ljava/util/concurrent/ThreadFactory;
      named THREAD_FACTORY Lnet/minecraft/server/filter/TextFilterer;THREAD_FACTORY:Ljava/util/concurrent/ThreadFactory;
    • CHAT_ENDPOINT

      private static final String CHAT_ENDPOINT
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official d Lagn;d:Ljava/lang/String;
      intermediary field_38055 Lnet/minecraft/class_5514;field_38055:Ljava/lang/String;
      named CHAT_ENDPOINT Lnet/minecraft/server/filter/TextFilterer;CHAT_ENDPOINT:Ljava/lang/String;
    • chatEndpoint

      private final URL chatEndpoint
      Mappings:
      Namespace Name Mixin selector
      official e Lagn;e:Ljava/net/URL;
      intermediary field_26826 Lnet/minecraft/class_5514;field_26826:Ljava/net/URL;
      named chatEndpoint Lnet/minecraft/server/filter/TextFilterer;chatEndpoint:Ljava/net/URL;
    • messageEncoder

      private final TextFilterer.MessageEncoder messageEncoder
      Mappings:
      Namespace Name Mixin selector
      official f Lagn;f:Lagn$c;
      intermediary field_38056 Lnet/minecraft/class_5514;field_38056:Lnet/minecraft/class_5514$class_7242;
      named messageEncoder Lnet/minecraft/server/filter/TextFilterer;messageEncoder:Lnet/minecraft/server/filter/TextFilterer$MessageEncoder;
    • joinEndpoint

      final URL joinEndpoint
      Mappings:
      Namespace Name Mixin selector
      official g Lagn;g:Ljava/net/URL;
      intermediary field_26827 Lnet/minecraft/class_5514;field_26827:Ljava/net/URL;
      named joinEndpoint Lnet/minecraft/server/filter/TextFilterer;joinEndpoint:Ljava/net/URL;
    • joinEncoder

      final TextFilterer.ProfileEncoder joinEncoder
      Mappings:
      Namespace Name Mixin selector
      official h Lagn;h:Lagn$b;
      intermediary field_38057 Lnet/minecraft/class_5514;field_38057:Lnet/minecraft/class_5514$class_7241;
      named joinEncoder Lnet/minecraft/server/filter/TextFilterer;joinEncoder:Lnet/minecraft/server/filter/TextFilterer$ProfileEncoder;
    • leaveEndpoint

      final URL leaveEndpoint
      Mappings:
      Namespace Name Mixin selector
      official i Lagn;i:Ljava/net/URL;
      intermediary field_26828 Lnet/minecraft/class_5514;field_26828:Ljava/net/URL;
      named leaveEndpoint Lnet/minecraft/server/filter/TextFilterer;leaveEndpoint:Ljava/net/URL;
    • leaveEncoder

      final TextFilterer.ProfileEncoder leaveEncoder
      Mappings:
      Namespace Name Mixin selector
      official j Lagn;j:Lagn$b;
      intermediary field_38058 Lnet/minecraft/class_5514;field_38058:Lnet/minecraft/class_5514$class_7241;
      named leaveEncoder Lnet/minecraft/server/filter/TextFilterer;leaveEncoder:Lnet/minecraft/server/filter/TextFilterer$ProfileEncoder;
    • apiKey

      private final String apiKey
      Mappings:
      Namespace Name Mixin selector
      official k Lagn;k:Ljava/lang/String;
      intermediary field_26829 Lnet/minecraft/class_5514;field_26829:Ljava/lang/String;
      named apiKey Lnet/minecraft/server/filter/TextFilterer;apiKey:Ljava/lang/String;
    • ignorer

      final TextFilterer.HashIgnorer ignorer
      Mappings:
      Namespace Name Mixin selector
      official l Lagn;l:Lagn$a;
      intermediary field_26832 Lnet/minecraft/class_5514;field_26832:Lnet/minecraft/class_5514$class_5515;
      named ignorer Lnet/minecraft/server/filter/TextFilterer;ignorer:Lnet/minecraft/server/filter/TextFilterer$HashIgnorer;
    • executor

      final ExecutorService executor
      Mappings:
      Namespace Name Mixin selector
      official m Lagn;m:Ljava/util/concurrent/ExecutorService;
      intermediary field_26833 Lnet/minecraft/class_5514;field_26833:Ljava/util/concurrent/ExecutorService;
      named executor Lnet/minecraft/server/filter/TextFilterer;executor: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
      official <init> Lagn;<init>(Ljava/net/URL;Lagn$c;Ljava/net/URL;Lagn$b;Ljava/net/URL;Lagn$b;Ljava/lang/String;Lagn$a;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
      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
  • 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
      official a Lagn;a(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;
      named getEndpoint Lnet/minecraft/server/filter/TextFilterer;getEndpoint(Ljava/net/URI;Lcom/google/gson/JsonObject;Ljava/lang/String;Ljava/lang/String;)Ljava/net/URL;
    • getValue

      private static String getValue(@Nullable @Nullable JsonObject json, String key, String fallback)
      Mappings:
      Namespace Name Mixin selector
      official a Lagn;a(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;
      named getValue Lnet/minecraft/server/filter/TextFilterer;getValue(Lcom/google/gson/JsonObject;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    • load

      @Nullable public static @Nullable TextFilterer load(String config)
      Mappings:
      Namespace Name Mixin selector
      official a Lagn;a(Ljava/lang/String;)Lagn;
      intermediary method_33805 Lnet/minecraft/class_5514;method_33805(Ljava/lang/String;)Lnet/minecraft/class_5514;
      named load Lnet/minecraft/server/filter/TextFilterer;load(Ljava/lang/String;)Lnet/minecraft/server/filter/TextFilterer;
    • sendJoinOrLeaveRequest

      void sendJoinOrLeaveRequest(com.mojang.authlib.GameProfile gameProfile, URL endpoint, TextFilterer.ProfileEncoder profileEncoder, Executor executor)
      Mappings:
      Namespace Name Mixin selector
      official a Lagn;a(Lcom/mojang/authlib/GameProfile;Ljava/net/URL;Lagn$b;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
      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
    • filterMessage

      CompletableFuture<FilteredMessage<String>> filterMessage(com.mojang.authlib.GameProfile gameProfile, String message, TextFilterer.HashIgnorer ignorer, Executor executor)
      Mappings:
      Namespace Name Mixin selector
      official a Lagn;a(Lcom/mojang/authlib/GameProfile;Ljava/lang/String;Lagn$a;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;
      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;
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • consumeFully

      private void consumeFully(InputStream inputStream) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official a Lagn;a(Ljava/io/InputStream;)V
      intermediary method_31300 Lnet/minecraft/class_5514;method_31300(Ljava/io/InputStream;)V
      named consumeFully Lnet/minecraft/server/filter/TextFilterer;consumeFully(Ljava/io/InputStream;)V
    • sendJsonRequest

      private JsonObject sendJsonRequest(JsonObject payload, URL endpoint) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official a Lagn;a(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;
      named sendJsonRequest Lnet/minecraft/server/filter/TextFilterer;sendJsonRequest(Lcom/google/gson/JsonObject;Ljava/net/URL;)Lcom/google/gson/JsonObject;
    • sendRequest

      private void sendRequest(JsonObject payload, URL endpoint) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official b Lagn;b(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
      named sendRequest Lnet/minecraft/server/filter/TextFilterer;sendRequest(Lcom/google/gson/JsonObject;Ljava/net/URL;)V
    • createConnection

      private HttpURLConnection createConnection(JsonObject payload, URL endpoint) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official c Lagn;c(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;
      named createConnection Lnet/minecraft/server/filter/TextFilterer;createConnection(Lcom/google/gson/JsonObject;Ljava/net/URL;)Ljava/net/HttpURLConnection;
    • createFilterer

      public TextStream createFilterer(com.mojang.authlib.GameProfile gameProfile)
      Mappings:
      Namespace Name Mixin selector
      official a Lagn;a(Lcom/mojang/authlib/GameProfile;)Lagm;
      intermediary method_31297 Lnet/minecraft/class_5514;method_31297(Lcom/mojang/authlib/GameProfile;)Lnet/minecraft/class_5513;
      named createFilterer Lnet/minecraft/server/filter/TextFilterer;createFilterer(Lcom/mojang/authlib/GameProfile;)Lnet/minecraft/server/filter/TextStream;