Waterfall/Waterfall-Proxy-Patches/0004-Fixup-ProtocolConstants.patch
Shane Freeder 869569b212 Update for 1.12.2 (#57)
Wow, saved by @electronicboy yet again! 👏
2017-10-29 10:12:12 -07:00

41 lines
1.4 KiB
Diff

From 2d5662b851b99d412b9675c75301ac484041515a 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 ac9adf33..a9398eef 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
@@ -24,7 +24,8 @@ public class ProtocolConstants
"1.11.x",
"1.12.x"
);
- public static final List<Integer> SUPPORTED_VERSION_IDS = Arrays.asList( ProtocolConstants.MINECRAFT_1_8,
+ public static final List<Integer> SUPPORTED_VERSION_IDS = Arrays.asList(
+ ProtocolConstants.MINECRAFT_1_8,
ProtocolConstants.MINECRAFT_1_9,
ProtocolConstants.MINECRAFT_1_9_1,
ProtocolConstants.MINECRAFT_1_9_2,
@@ -37,6 +38,16 @@ public class ProtocolConstants
ProtocolConstants.MINECRAFT_1_12_2
);
+ 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.14.2