From d1a5d8dd82383867902a5e20d2364ed24f1902b1 Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Sun, 21 Jun 2020 13:38:05 -0400 Subject: [PATCH] Fix compile on JDK 8 and bad merge --- .../proxy/connection/client/ClientPlaySessionHandler.java | 1 - .../proxy/connection/registry/DimensionData.java | 7 +++---- .../proxy/connection/registry/DimensionInfo.java | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientPlaySessionHandler.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientPlaySessionHandler.java index 2a03e4c2d..d33ad1ed7 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientPlaySessionHandler.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientPlaySessionHandler.java @@ -299,7 +299,6 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler { if (!spawned) { // Nothing special to do with regards to spawning the player spawned = true; - player.getConnection().delayedWrite(joinGame); destination.setActiveDimensionRegistry(joinGame.getDimensionRegistry()); // 1.16 player.getConnection().delayedWrite(joinGame); diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/registry/DimensionData.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/registry/DimensionData.java index ca1f8ed80..b5c7193c4 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/registry/DimensionData.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/registry/DimensionData.java @@ -48,14 +48,13 @@ public final class DimensionData { @Nullable Long fixedTime, @Nullable Boolean createDragonFight) { Preconditions.checkNotNull( registryIdentifier, "registryIdentifier cannot be null"); - Preconditions.checkArgument(registryIdentifier.length() > 0 && !registryIdentifier.isBlank(), + Preconditions.checkArgument(registryIdentifier.length() > 0, "registryIdentifier cannot be empty"); Preconditions.checkArgument(logicalHeight >= 0, "localHeight must be >= 0"); Preconditions.checkNotNull( burningBehaviourIdentifier, "burningBehaviourIdentifier cannot be null"); - Preconditions.checkArgument(burningBehaviourIdentifier.length() > 0 - && !burningBehaviourIdentifier.isBlank(), - "burningBehaviourIdentifier cannot be empty"); + Preconditions.checkArgument(burningBehaviourIdentifier.length() > 0, + "burningBehaviourIdentifier cannot be empty"); this.registryIdentifier = registryIdentifier; this.isNatural = isNatural; this.ambientLight = ambientLight; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/registry/DimensionInfo.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/registry/DimensionInfo.java index fdfc3dc5d..a06426cce 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/registry/DimensionInfo.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/registry/DimensionInfo.java @@ -21,12 +21,12 @@ public final class DimensionInfo { this.registryIdentifier = Preconditions.checkNotNull( registryIdentifier, "registryIdentifier cannot be null"); Preconditions.checkArgument( - registryIdentifier.length() > 0 && !registryIdentifier.isBlank(), + registryIdentifier.length() > 0, "registryIdentifier cannot be empty"); this.levelName = Preconditions.checkNotNull( levelName, "levelName cannot be null"); Preconditions.checkArgument( - levelName.length() > 0 && !levelName.isBlank(), + levelName.length() > 0, "registryIdentifier cannot be empty"); this.isFlat = isFlat; this.isDebugType = isDebugType;