Package net.minecraft.server.filter
Class TextFilterer
java.lang.Object
net.minecraft.server.filter.TextFilterer
- All Implemented Interfaces:
AutoCloseable
public class TextFilterer extends Object implements AutoCloseable
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTextFilterer.FailedHttpRequestExceptionstatic interfaceTextFilterer.HashIgnorer(package private) classTextFilterer.Impl -
Field Summary
Fields Modifier and Type Field Description private StringapiKeyprivate URLchatEndpointprivate ExecutorServiceexecutorprivate TextFilterer.HashIgnorerignorerprivate URLjoinEndpointprivate URLleaveEndpointprivate static LoggerLOGGERprivate static AtomicIntegerNEXT_WORKER_IDprivate intruleIdprivate StringserverIdprivate static ThreadFactoryTHREAD_FACTORY -
Constructor Summary
Constructors Constructor Description TextFilterer() -
Method Summary
Modifier and Type Method Description voidclose()private voidconsumeFully(InputStream inputStream)private HttpURLConnectioncreateConnection(JsonObject payload, URL endpoint)TextStreamcreateFilterer(com.mojang.authlib.GameProfile gameProfile)private CompletableFuture<Optional<String>>filterMessage(com.mojang.authlib.GameProfile gameProfile, String message, TextFilterer.HashIgnorer ignorer, Executor executor)private voidsendJoinOrLeaveRequest(com.mojang.authlib.GameProfile gameProfile, URL endpoint, Executor executor)private JsonObjectsendJsonRequest(JsonObject payload, URL endpoint)private voidsendRequest(JsonObject payload, URL endpoint)
-
Field Details
-
LOGGER
-
NEXT_WORKER_ID
-
THREAD_FACTORY
-
chatEndpoint
-
joinEndpoint
-
leaveEndpoint
-
apiKey
-
ruleId
private final int ruleId -
serverId
-
ignorer
-
executor
-
-
Constructor Details
-
TextFilterer
public TextFilterer()
-
-
Method Details
-
sendJoinOrLeaveRequest
-
filterMessage
private CompletableFuture<Optional<String>> filterMessage(com.mojang.authlib.GameProfile gameProfile, String message, TextFilterer.HashIgnorer ignorer, Executor executor) -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
consumeFully
- Throws:
IOException
-
sendJsonRequest
- Throws:
IOException
-
sendRequest
- Throws:
IOException
-
createConnection
- Throws:
IOException
-
createFilterer
-