From b2d611e24cbf0f7bf6e1fcb44d6025121d9e765a Mon Sep 17 00:00:00 2001 From: RednedEpic Date: Thu, 5 Mar 2020 20:53:58 -0600 Subject: [PATCH] Fix some problems brought from merge conflicts --- .github/workflows/pullrequest.yml | 2 ++ .../geysermc/connector/network/session/GeyserSession.java | 6 +++--- .../java/org/geysermc/connector/utils/MessageUtils.java | 8 ++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index a5c1dab80..ce6d76461 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -19,6 +19,8 @@ jobs: uses: actions/setup-java@v1 with: java-version: 1.8 + - name: submodules-init + uses: snickerbockers/submodules-init@v4 - name: Build with Maven run: mvn -B package - name: Archive artifacts diff --git a/connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java b/connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java index dfe4b4586..acad78eaf 100644 --- a/connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java +++ b/connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java @@ -165,9 +165,9 @@ public class GeyserSession implements CommandSender { ChunkUtils.sendEmptyChunks(this, playerEntity.getPosition().toInt(), 0, false); - BiomeDefinitionListPacket biomePacket = new BiomeDefinitionListPacket(); - biomePacket.setTag(CompoundTag.EMPTY); - upstream.sendPacket(biomePacket); + BiomeDefinitionListPacket biomeDefinitionListPacket = new BiomeDefinitionListPacket(); + biomeDefinitionListPacket.setTag(Toolbox.BIOMES); + upstream.sendPacket(biomeDefinitionListPacket); AvailableEntityIdentifiersPacket entityPacket = new AvailableEntityIdentifiersPacket(); entityPacket.setTag(CompoundTag.EMPTY); diff --git a/connector/src/main/java/org/geysermc/connector/utils/MessageUtils.java b/connector/src/main/java/org/geysermc/connector/utils/MessageUtils.java index 44d222657..604d4efa5 100644 --- a/connector/src/main/java/org/geysermc/connector/utils/MessageUtils.java +++ b/connector/src/main/java/org/geysermc/connector/utils/MessageUtils.java @@ -157,14 +157,14 @@ public class MessageUtils { base += "r"; break; default: - return ""; + break; } return base; } private static String getFormat(List formats) { - String str = ""; + StringBuilder str = new StringBuilder(); for (ChatFormat cf : formats) { String base = "\u00a7"; switch (cf) { @@ -187,10 +187,10 @@ public class MessageUtils { break; } - str += base; + str.append(base); } - return str; + return str.toString(); } public static boolean isMessage(String text) {