Waterfall/BungeeCord-Patches/0027-Better-debug-checks.patch
Jamie Mansfield b5d048b57a
Revert to BungeeCord behaviour for the 'not direct byte buf' business
Not worth the time wasted on closing invalid bug reports.
2017-10-23 19:53:51 +01:00

23 lines
1014 B
Diff

From 181583243693c944086d1c18709c55d116b2c300 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@techcable.net>
Date: Wed, 6 Apr 2016 23:46:00 -0700
Subject: [PATCH] Better debug checks
diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java b/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java
index 8e142323..7ff5411b 100644
--- a/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java
+++ b/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java
@@ -428,7 +428,7 @@ public enum Protocol
{
throw new BadPacketException( "Unsupported protocol version" );
}
- Preconditions.checkArgument( protocolData.packetMap.containsKey( packet ), "Cannot get ID for packet " + packet );
+ Preconditions.checkArgument( protocolData.packetMap.containsKey( packet ), "Cannot get ID for packet %s in state %s", packet, protocolPhase);
return protocolData.packetMap.get( packet );
}
--
2.14.1