mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Ensure executor service isn't null by accessing it via the getter (#4328)
This commit is contained in:
parent
94a1cbeb83
commit
9d6dd58fd8
2 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue