From 5a89fe707672d09f2f23263690a6959acca8e5fd Mon Sep 17 00:00:00 2001 From: grimmauld Date: Thu, 19 Nov 2020 18:17:30 +0100 Subject: [PATCH] Fix max schematic size warning --- .../create/content/schematics/ClientSchematicLoader.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/simibubi/create/content/schematics/ClientSchematicLoader.java b/src/main/java/com/simibubi/create/content/schematics/ClientSchematicLoader.java index e23e61d8b..1d37c5358 100644 --- a/src/main/java/com/simibubi/create/content/schematics/ClientSchematicLoader.java +++ b/src/main/java/com/simibubi/create/content/schematics/ClientSchematicLoader.java @@ -85,10 +85,10 @@ public class ClientSchematicLoader { Integer maxSize = AllConfigs.SERVER.schematics.maxTotalSchematicSize.get(); if (size > maxSize * 1000) { ClientPlayerEntity player = Minecraft.getInstance().player; - player.sendMessage(new StringTextComponent( - Lang.translate("schematics.uploadTooLarge") + " (" + size / 1000 + " KB)."), player.getUniqueID()); - player.sendMessage( - new StringTextComponent(Lang.translate("schematics.maxAllowedSize") + " " + maxSize + " KB"), player.getUniqueID()); + if (player != null) { + player.sendMessage(Lang.translate("schematics.uploadTooLarge").append(" (" + size / 1000 + " KB)."), player.getUniqueID()); + player.sendMessage(Lang.translate("schematics.maxAllowedSize").append(" " + maxSize + " KB"), player.getUniqueID()); + } return false; } return true;