Skip to content

Commit

Permalink
Fix, code by baka
Browse files Browse the repository at this point in the history
  • Loading branch information
s-yh-china committed Jul 5, 2024
1 parent 82be6d5 commit 666248f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions patches/server/0007-Leaves-Protocol-Core.patch
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ index 0000000000000000000000000000000000000000..986d2a6641ff8017dddf3e5f2655adfc
+}
diff --git a/src/main/java/org/leavesmc/leaves/protocol/core/LeavesProtocolManager.java b/src/main/java/org/leavesmc/leaves/protocol/core/LeavesProtocolManager.java
new file mode 100644
index 0000000000000000000000000000000000000000..53b42f150d4bcca3bed444216d848fdf714102bf
index 0000000000000000000000000000000000000000..e7ce2e7a1686f1775c0a2e0cd731294025d2833b
--- /dev/null
+++ b/src/main/java/org/leavesmc/leaves/protocol/core/LeavesProtocolManager.java
@@ -0,0 +1,384 @@
Expand Down Expand Up @@ -273,7 +273,7 @@ index 0000000000000000000000000000000000000000..53b42f150d4bcca3bed444216d848fdf
+ boolean found = false;
+ for (Method payloadMethod : receiver.payload().getDeclaredMethods()) {
+ if (payloadMethod.isAnnotationPresent(LeavesCustomPayload.New.class)) {
+ if (payloadMethod.getParameterTypes() == PAYLOAD_PARAMETER_TYPES && payloadMethod.getReturnType() == receiver.payload() && Modifier.isStatic(payloadMethod.getModifiers())) {
+ if (Arrays.equals(payloadMethod.getParameterTypes(), PAYLOAD_PARAMETER_TYPES) && payloadMethod.getReturnType() == receiver.payload() && Modifier.isStatic(payloadMethod.getModifiers())) {
+ payloadMethod.setAccessible(true);
+ map.put(receiver, payloadMethod);
+ found = true;
Expand Down

0 comments on commit 666248f

Please sign in to comment.