Waterfall/BungeeCord-Patches/0007-Fixup-ProtocolConstants.patch
Shane Freeder dc0595653d
Updated Upstream (BungeeCord)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

BungeeCord Changes:
c92581d0 #3556: Deserialize arrays to single components
e442c3da #3546: Add string length checks to isValidName
f903c54d #3554: Bump org.apache.maven.plugins:maven-checkstyle-plugin
0d453789 #3540: Add TextComponent#fromLegacy() as an array-free alternative to #fromLegacyText()
0f5f09b6 Minecraft 23w43b support
e5c80d00 Fix code formatting
9cdb2ba3 Deprecate exposed scoreboard API
d0e5cf7c #3549: Bump io.netty:netty-bom from 4.1.99.Final to 4.1.100.Final
c8568764 Fix writing non-compound root NBT tags
2023-10-29 16:02:58 +00:00

31 lines
946 B
Diff

From 6420147c00011f92af85e62463d3a88048b96d32 Mon Sep 17 00:00:00 2001
From: Troy Frew <fuzzy_bot@arenaga.me>
Date: Tue, 15 Nov 2016 09:07:51 -0500
Subject: [PATCH] Fixup ProtocolConstants
diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/ProtocolConstants.java b/protocol/src/main/java/net/md_5/bungee/protocol/ProtocolConstants.java
index d92a66d9..fedf6e99 100644
--- a/protocol/src/main/java/net/md_5/bungee/protocol/ProtocolConstants.java
+++ b/protocol/src/main/java/net/md_5/bungee/protocol/ProtocolConstants.java
@@ -115,6 +115,16 @@ public class ProtocolConstants
SUPPORTED_VERSION_IDS = supportedVersionIds.build();
}
+ public static final boolean isBeforeOrEq(int before, int other)
+ {
+ return before <= other;
+ }
+
+ public static final boolean isAfterOrEq(int after, int other)
+ {
+ return after >= other;
+ }
+
public enum Direction
{
--
2.42.0