Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-20 06:50:09 +01:00
Ensure executor service isn't null by accessing it via the getter (#4328)
Dieser Commit ist enthalten in:
Ursprung
94a1cbeb83
Commit
9d6dd58fd8
@ -134,7 +134,7 @@ public class FakeHeadProvider {
|
||||
|
||||
session.getPlayerWithCustomHeads().add(entity.getUuid());
|
||||
String texturesProperty = entity.getTexturesProperty();
|
||||
SkinProvider.EXECUTOR_SERVICE.execute(() -> {
|
||||
SkinProvider.getExecutorService().execute(() -> {
|
||||
try {
|
||||
SkinProvider.SkinData mergedSkinData = MERGED_SKINS_LOADING_CACHE.get(new FakeHeadEntry(texturesProperty, fakeHeadSkinUrl, entity));
|
||||
SkinManager.sendSkinPacket(session, entity, mergedSkinData);
|
||||
|
@ -58,7 +58,7 @@ import java.util.function.Predicate;
|
||||
|
||||
public class SkinProvider {
|
||||
private static final boolean ALLOW_THIRD_PARTY_CAPES = GeyserImpl.getInstance().getConfig().isAllowThirdPartyCapes();
|
||||
static ExecutorService EXECUTOR_SERVICE;
|
||||
private static ExecutorService EXECUTOR_SERVICE;
|
||||
|
||||
static final Skin EMPTY_SKIN;
|
||||
static final Cape EMPTY_CAPE = new Cape("", "no-cape", ByteArrays.EMPTY_ARRAY, -1, true);
|
||||
@ -133,7 +133,7 @@ public class SkinProvider {
|
||||
WEARING_CUSTOM_SKULL_SLIM = new SkinGeometry("{\"geometry\" :{\"default\" :\"geometry.humanoid.wearingCustomSkullSlim\"}}", wearingCustomSkullSlim, false);
|
||||
}
|
||||
|
||||
private static ExecutorService getExecutorService() {
|
||||
public static ExecutorService getExecutorService() {
|
||||
if (EXECUTOR_SERVICE == null) {
|
||||
EXECUTOR_SERVICE = Executors.newFixedThreadPool(ALLOW_THIRD_PARTY_CAPES ? 21 : 14);
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren