Waterfall/BungeeCord-Patches/0008-Fixup-ProtocolConstants.patch

31 lines
947 B
Diff
Raw Normal View History

2019-05-14 04:41:14 +02:00
From 05d1cb48cf1187bb0690f7f9b4761919963ec1bd 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
2019-05-14 04:41:14 +02:00
index 67e212e2..eea7ed98 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
2019-05-14 04:41:14 +02:00
@@ -50,6 +50,16 @@ public class ProtocolConstants
ProtocolConstants.MINECRAFT_1_14_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
{
--
2019-05-14 04:41:14 +02:00
2.20.1 (Apple Git-117)