Fix max schematic size warning

This commit is contained in:
grimmauld 2020-11-19 18:17:30 +01:00
parent a2e28db761
commit 5a89fe7076

View file

@ -85,10 +85,10 @@ public class ClientSchematicLoader {
Integer maxSize = AllConfigs.SERVER.schematics.maxTotalSchematicSize.get(); Integer maxSize = AllConfigs.SERVER.schematics.maxTotalSchematicSize.get();
if (size > maxSize * 1000) { if (size > maxSize * 1000) {
ClientPlayerEntity player = Minecraft.getInstance().player; ClientPlayerEntity player = Minecraft.getInstance().player;
player.sendMessage(new StringTextComponent( if (player != null) {
Lang.translate("schematics.uploadTooLarge") + " (" + size / 1000 + " KB)."), player.getUniqueID()); player.sendMessage(Lang.translate("schematics.uploadTooLarge").append(" (" + size / 1000 + " KB)."), player.getUniqueID());
player.sendMessage( player.sendMessage(Lang.translate("schematics.maxAllowedSize").append(" " + maxSize + " KB"), player.getUniqueID());
new StringTextComponent(Lang.translate("schematics.maxAllowedSize") + " " + maxSize + " KB"), player.getUniqueID()); }
return false; return false;
} }
return true; return true;