9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-23 00:49:23 +00:00

Fix bytebuf api, fix #334 (#335)

This commit is contained in:
Lumine1909
2024-09-08 14:20:26 -04:00
committed by GitHub
parent 933845373c
commit 3436062db6
2 changed files with 8 additions and 5 deletions

View File

@@ -392,7 +392,7 @@ index 0000000000000000000000000000000000000000..707d784cf17926e869481c39b0da908e
+}
diff --git a/src/main/java/org/leavesmc/leaves/bytebuf/internal/InternalBytebufHandler.java b/src/main/java/org/leavesmc/leaves/bytebuf/internal/InternalBytebufHandler.java
new file mode 100644
index 0000000000000000000000000000000000000000..2c446d1657834324f015b1637221164ff61f04e1
index 0000000000000000000000000000000000000000..fb7625ce28d2d8c79aad680ff34d704ca8f9b426
--- /dev/null
+++ b/src/main/java/org/leavesmc/leaves/bytebuf/internal/InternalBytebufHandler.java
@@ -0,0 +1,225 @@
@@ -602,8 +602,8 @@ index 0000000000000000000000000000000000000000..2c446d1657834324f015b1637221164f
+ }
+ try {
+ return PacketType.valueOf(builder.toString());
+ } catch (IllegalArgumentException ignored) {
+ return null;
+ } catch (IllegalArgumentException e) {
+ throw new RuntimeException(e);
+ }
+ });
+ } catch (ExecutionException ignore) {