From 339a5195f882f2f1ce86d498d774e58e39ca222a Mon Sep 17 00:00:00 2001 From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> Date: Sat, 27 Jul 2024 18:04:04 +0800 Subject: [PATCH] Fix imports --- ...ze-LeavesProtocolManager-init-protocol.patch | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/patches/server/0087-Optimize-LeavesProtocolManager-init-protocol.patch b/patches/server/0087-Optimize-LeavesProtocolManager-init-protocol.patch index 7ff6e4326..9ae5f2c4a 100644 --- a/patches/server/0087-Optimize-LeavesProtocolManager-init-protocol.patch +++ b/patches/server/0087-Optimize-LeavesProtocolManager-init-protocol.patch @@ -276,14 +276,10 @@ index 9e35dfaf8bb5511b4cd0a71175d7ecb6d835042f..5ef19098512ae8a070dea270a68c2769 buf.writeByte(0); buf.writeInt(org.dreeam.leaf.config.modules.network.ProtocolSupport.xaeroMapServerID); diff --git a/src/main/java/org/leavesmc/leaves/protocol/core/LeavesProtocolManager.java b/src/main/java/org/leavesmc/leaves/protocol/core/LeavesProtocolManager.java -index b76eb38942171d22dcd767ea353f012e5920f1f5..d79d69bc630b3bb73ca32bc1e80509df06954dad 100644 +index b76eb38942171d22dcd767ea353f012e5920f1f5..ec901ea7103ce5a3e1d6fa1efd8135ce020e18ce 100644 --- a/src/main/java/org/leavesmc/leaves/protocol/core/LeavesProtocolManager.java +++ b/src/main/java/org/leavesmc/leaves/protocol/core/LeavesProtocolManager.java -@@ -7,24 +7,18 @@ import net.minecraft.resources.ResourceLocation; - import net.minecraft.server.level.ServerPlayer; - import org.apache.commons.lang.ArrayUtils; - import org.bukkit.event.player.PlayerKickEvent; -+import org.dreeam.leaf.config.LeafConfig; +@@ -10,30 +10,21 @@ import org.bukkit.event.player.PlayerKickEvent; import org.jetbrains.annotations.NotNull; import org.leavesmc.leaves.LeavesLogger; @@ -297,7 +293,7 @@ index b76eb38942171d22dcd767ea353f012e5920f1f5..d79d69bc630b3bb73ca32bc1e80509df -import java.net.JarURLConnection; -import java.net.URL; -import java.net.URLDecoder; --import java.nio.charset.StandardCharsets; + import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -305,16 +301,15 @@ index b76eb38942171d22dcd767ea353f012e5920f1f5..d79d69bc630b3bb73ca32bc1e80509df import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; -@@ -32,9 +26,6 @@ import java.util.LinkedHashSet; +-import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; -import java.util.jar.JarEntry; -import java.util.jar.JarFile; -- + public class LeavesProtocolManager { - private static final Class[] PAYLOAD_PARAMETER_TYPES = {ResourceLocation.class, FriendlyByteBuf.class}; @@ -51,8 +42,16 @@ public class LeavesProtocolManager { private static final List RELOAD_SERVER = new ArrayList<>(); private static final Map> MINECRAFT_REGISTER = new HashMap<>(); @@ -329,7 +324,7 @@ index b76eb38942171d22dcd767ea353f012e5920f1f5..d79d69bc630b3bb73ca32bc1e80509df - for (Class clazz : getClasses("org.leavesmc.leaves.protocol")) { + boolean shouldEnable; + -+ for (Class clazz : LeafConfig.getClasses("org.leavesmc.leaves.protocol")) { ++ for (Class clazz : org.dreeam.leaf.config.LeafConfig.getClasses("org.leavesmc.leaves.protocol")) { final LeavesProtocol protocol = clazz.getAnnotation(LeavesProtocol.class); if (protocol != null) { Set methods;