mirror of
https://github.com/PaperMC/Waterfall.git
synced 2024-11-28 13:15:31 +01:00
Merge upstream
This commit is contained in:
parent
20067373f3
commit
4ea50d7023
@ -1 +1 @@
|
||||
Subproject commit d600c9a526ba9234e84150aad959079ac278f635
|
||||
Subproject commit ca8f31bdc70a2ec626274b4659b99732ec602969
|
@ -1,31 +1,14 @@
|
||||
From e2fcb32f71ba30705a7b4ee18b4d72986ddde9a1 Mon Sep 17 00:00:00 2001
|
||||
From 857e3805f85d667bd0a28beb0eec81fa41c0a38e Mon Sep 17 00:00:00 2001
|
||||
From: Tux <write@imaginarycode.com>
|
||||
Date: Thu, 19 May 2016 17:36:31 -0600
|
||||
Subject: [PATCH] Better unit tests for Chat API
|
||||
|
||||
|
||||
diff --git a/chat/src/test/java/net/md_5/bungee/api/chat/TranslatableComponentTest.java b/chat/src/test/java/net/md_5/bungee/api/chat/TranslatableComponentTest.java
|
||||
index 0837c672..38147e2a 100644
|
||||
--- a/chat/src/test/java/net/md_5/bungee/api/chat/TranslatableComponentTest.java
|
||||
+++ b/chat/src/test/java/net/md_5/bungee/api/chat/TranslatableComponentTest.java
|
||||
@@ -13,4 +13,12 @@ public class TranslatableComponentTest
|
||||
assertEquals( "Test string with 2 placeholders: aoeu", testComponent.toPlainText() );
|
||||
assertEquals( "§fTest string with §f2§f placeholders: §faoeu", testComponent.toLegacyText() );
|
||||
}
|
||||
+
|
||||
+ @Test
|
||||
+ public void testEscapedPercentInPlainText()
|
||||
+ {
|
||||
+ TranslatableComponent testComponent = new TranslatableComponent( "Test string with %% sign" );
|
||||
+ assertEquals( "Test string with % sign", testComponent.toPlainText() );
|
||||
+ assertEquals( "§fTest string with §f%§f sign", testComponent.toLegacyText() );
|
||||
+ }
|
||||
}
|
||||
diff --git a/proxy/src/test/java/net/md_5/bungee/chat/ComponentsTest.java b/proxy/src/test/java/net/md_5/bungee/chat/ComponentsTest.java
|
||||
index 3d9396d3..c1afa6da 100644
|
||||
--- a/proxy/src/test/java/net/md_5/bungee/chat/ComponentsTest.java
|
||||
+++ b/proxy/src/test/java/net/md_5/bungee/chat/ComponentsTest.java
|
||||
@@ -149,6 +149,26 @@ public class ComponentsTest
|
||||
diff --git a/chat/src/test/java/net/md_5/bungee/api/chat/ComponentsTest.java b/chat/src/test/java/net/md_5/bungee/api/chat/ComponentsTest.java
|
||||
index 43420f2b..42d724eb 100644
|
||||
--- a/chat/src/test/java/net/md_5/bungee/api/chat/ComponentsTest.java
|
||||
+++ b/chat/src/test/java/net/md_5/bungee/api/chat/ComponentsTest.java
|
||||
@@ -144,6 +144,26 @@ public class ComponentsTest
|
||||
Assert.assertEquals( eventRetention[1].getClickEvent(), testClickEvent );
|
||||
}
|
||||
|
||||
@ -52,6 +35,23 @@ index 3d9396d3..c1afa6da 100644
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testLoopSimple()
|
||||
{
|
||||
diff --git a/chat/src/test/java/net/md_5/bungee/api/chat/TranslatableComponentTest.java b/chat/src/test/java/net/md_5/bungee/api/chat/TranslatableComponentTest.java
|
||||
index 0837c672..38147e2a 100644
|
||||
--- a/chat/src/test/java/net/md_5/bungee/api/chat/TranslatableComponentTest.java
|
||||
+++ b/chat/src/test/java/net/md_5/bungee/api/chat/TranslatableComponentTest.java
|
||||
@@ -13,4 +13,12 @@ public class TranslatableComponentTest
|
||||
assertEquals( "Test string with 2 placeholders: aoeu", testComponent.toPlainText() );
|
||||
assertEquals( "§fTest string with §f2§f placeholders: §faoeu", testComponent.toLegacyText() );
|
||||
}
|
||||
+
|
||||
+ @Test
|
||||
+ public void testEscapedPercentInPlainText()
|
||||
+ {
|
||||
+ TranslatableComponent testComponent = new TranslatableComponent( "Test string with %% sign" );
|
||||
+ assertEquals( "Test string with % sign", testComponent.toPlainText() );
|
||||
+ assertEquals( "§fTest string with §f%§f sign", testComponent.toLegacyText() );
|
||||
+ }
|
||||
}
|
||||
--
|
||||
2.14.3
|
||||
2.16.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From fbb85275392056b77e760a8e0936c02d0252a620 Mon Sep 17 00:00:00 2001
|
||||
From 4911849bf46ae1005c2c9efbf0de31ef2a6869d0 Mon Sep 17 00:00:00 2001
|
||||
From: Techcable <Techcable@techcable.net>
|
||||
Date: Thu, 19 May 2016 17:09:22 -0600
|
||||
Subject: [PATCH] Allow invalid packet ids for forge servers
|
||||
@ -37,10 +37,10 @@ index e7cb3803..447eaae7 100644
|
||||
{
|
||||
packet.read( in, prot.getDirection(), protocolVersion );
|
||||
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 f06aa95a..8e142323 100644
|
||||
index cd065631..3f6b1766 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
|
||||
@@ -355,14 +355,23 @@ public enum Protocol
|
||||
@@ -360,14 +360,23 @@ public enum Protocol
|
||||
return protocol;
|
||||
}
|
||||
|
||||
@ -56,7 +56,7 @@ index f06aa95a..8e142323 100644
|
||||
+ public final DefinedPacket createPacket(int id, int version, boolean supportsForge)
|
||||
{
|
||||
ProtocolData protocolData = getProtocolData( version );
|
||||
if (protocolData == null)
|
||||
if ( protocolData == null )
|
||||
{
|
||||
throw new BadPacketException( "Unsupported protocol version" );
|
||||
}
|
||||
@ -93,7 +93,7 @@ index 61c53b30..b29ee7c5 100644
|
||||
|
||||
ch.write( BungeeCord.getInstance().registerChannels() );
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/UserConnection.java b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
|
||||
index 28e79933..ccb6b6ca 100644
|
||||
index d1ec66c1..158dfb18 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
|
||||
@@ -70,6 +70,7 @@ public final class UserConnection implements ProxiedPlayer
|
||||
@ -122,5 +122,5 @@ index 847a3eca..27ee21f2 100644
|
||||
{
|
||||
rewriteInt( packet, oldId, newId, readerIndex + packetIdLength );
|
||||
--
|
||||
2.14.1
|
||||
2.16.1
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
From 181583243693c944086d1c18709c55d116b2c300 Mon Sep 17 00:00:00 2001
|
||||
From 0e83cd9e923f0b05a17feab69dd80b244ee84373 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
|
||||
index 3f6b1766..a568d472 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
|
||||
@@ -433,7 +433,7 @@ public enum Protocol
|
||||
{
|
||||
throw new BadPacketException( "Unsupported protocol version" );
|
||||
}
|
||||
@ -18,5 +18,5 @@ index 8e142323..7ff5411b 100644
|
||||
return protocolData.packetMap.get( packet );
|
||||
}
|
||||
--
|
||||
2.14.1
|
||||
2.16.1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user