From 924f79e36514e450f0c4d6290ca34ca6e41f8d05 Mon Sep 17 00:00:00 2001 From: windcolor-dev <79166388+windcolor-dev@users.noreply.github.com> Date: Wed, 3 Aug 2022 12:26:29 -0700 Subject: [PATCH] Bug fixes (#108) * Fix sign issue * Disable the "faster cannon tracker" option by default * Also update the comment for this option. * Remove the corresponding FlamePaper patch from README.md --- README.md | 1 - .../java/ga/windpvp/windspigot/config/WindSpigotConfig.java | 4 ++-- .../java/org/bukkit/craftbukkit/util/CraftChatMessage.java | 5 ----- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index f6e01d9a..749627c8 100644 --- a/README.md +++ b/README.md @@ -196,7 +196,6 @@ See the patches list below. [FlamePaper-0033] Dont check occluding hoppers [FlamePaper-0034] Hopper item lookup optimizations [FlamePaper-0102] Fixed chunk memory leak -[FlamePaper-0103] Limit CraftChatMessage iterations [FlamePaper-0104] Return last slot by default [FlamePaper-0105] Fix memory leaks by Minetick [FlamePaper-0106] Fix sending irrelevant block updates to the client diff --git a/WindSpigot-Server/src/main/java/ga/windpvp/windspigot/config/WindSpigotConfig.java b/WindSpigot-Server/src/main/java/ga/windpvp/windspigot/config/WindSpigotConfig.java index 324cc083..452ef2ba 100644 --- a/WindSpigot-Server/src/main/java/ga/windpvp/windspigot/config/WindSpigotConfig.java +++ b/WindSpigot-Server/src/main/java/ga/windpvp/windspigot/config/WindSpigotConfig.java @@ -188,7 +188,7 @@ static void loadComments() { c.addComment("settings.chunk.threads", "The amount of threads used for chunks."); c.addComment("settings.chunk.players-per-thread", "The amount of players for each thread."); c.addComment("settings.use-tcp-nodelay", "Enables the TCP_NODELAY socket option."); - c.addComment("settings.faster-cannon-tracker", "Enables a faster cannon entity tracker."); + c.addComment("settings.faster-cannon-tracker", "Enables a faster cannon entity tracker. Please note that this can cause some incompatibilities with name tags for cannon entities."); c.addComment("settings.fix-eat-while-running", "Fixes the eating while running bug."); c.addComment("settings.hide-projectiles-from-hidden-players", "Hides projectiles from hidden players."); c.addComment("settings.lag-compensated-potions", "Enables lag compesation for thrown potions."); @@ -585,7 +585,7 @@ private static void enableTCPNODELAY() { public static boolean useFasterCannonTracker; private static void useFasterCannonTracker() { - useFasterCannonTracker = getBoolean("settings.faster-cannon-tracker", true); + useFasterCannonTracker = getBoolean("settings.faster-cannon-tracker", false); } public static boolean fixEatWhileRunning; diff --git a/WindSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java b/WindSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java index 6eea3765..3a2a9f62 100644 --- a/WindSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java +++ b/WindSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java @@ -155,15 +155,10 @@ public static String fromComponent(IChatBaseComponent component, EnumChatFormat return ""; } StringBuilder out = new StringBuilder(); - // FlamePaper - Limit iterations to 2 - int iterations = 0; long start = System.currentTimeMillis(); for (IChatBaseComponent c : component) { - if (++iterations > 2) { - break; - } ChatModifier modifier = c.getChatModifier(); out.append(modifier.getColor() == null ? defaultColor : modifier.getColor()); if (modifier.isBold()) {