Waterfall/Waterfall-Proxy-Patches/0004-Fixup-ProtocolConstants.patch

41 lines
1.4 KiB
Diff
Raw Normal View History

2017-01-05 02:07:36 +01:00
From 3d537fc71f3aa927a3d42fbf96a6d549cab60627 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
2017-01-05 02:07:36 +01:00
index 9929ef4..af80c95 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
2017-01-05 02:07:36 +01:00
@@ -20,7 +20,8 @@ public class ProtocolConstants
"1.10.x",
"1.11.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,
2017-01-05 02:07:36 +01:00
@@ -30,6 +31,16 @@ public class ProtocolConstants
ProtocolConstants.MINECRAFT_1_11_1
);
+ 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
{
--
2017-01-05 02:07:36 +01:00
2.7.4