Skip to content

Commit

Permalink
Fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreeam-qwq committed Jul 27, 2024
1 parent b628d81 commit 339a519
Showing 1 changed file with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -297,24 +293,23 @@ 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;
-import java.util.Enumeration;
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<Method> RELOAD_SERVER = new ArrayList<>();
private static final Map<LeavesProtocol, Map<ProtocolHandler.MinecraftRegister, Method>> MINECRAFT_REGISTER = new HashMap<>();
Expand All @@ -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<Method> methods;
Expand Down

0 comments on commit 339a519

Please sign in to comment.