From 6031511c811d5e3fa99536605ca7b07178081a80 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Fri, 20 Jul 2018 06:17:40 +0100 Subject: [PATCH] Fix support for 1.7 scoreboard objectives --- .../0005-1.7.x-Protocol-Patch.patch | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/Waterfall-Proxy-Patches/0005-1.7.x-Protocol-Patch.patch b/Waterfall-Proxy-Patches/0005-1.7.x-Protocol-Patch.patch index 063237e..8f86d92 100644 --- a/Waterfall-Proxy-Patches/0005-1.7.x-Protocol-Patch.patch +++ b/Waterfall-Proxy-Patches/0005-1.7.x-Protocol-Patch.patch @@ -1,4 +1,4 @@ -From b91bff82ac6a3902a3f8a27987da26d926cd2aa5 Mon Sep 17 00:00:00 2001 +From 9c0293a309e204e93ec5e41702ff5bab4f59f53d Mon Sep 17 00:00:00 2001 From: Troy Frew Date: Tue, 15 Nov 2016 10:31:04 -0500 Subject: [PATCH] 1.7.x Protocol Patch @@ -1646,10 +1646,29 @@ index ef12a019..4a1c3638 100644 { this.compressionThreshold = compressionThreshold; diff --git a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java -index 287a42bd..89eb3ba4 100644 +index 287a42bd..43617375 100644 --- a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java +++ b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java -@@ -251,16 +251,28 @@ public class DownstreamBridge extends PacketHandler +@@ -144,8 +144,7 @@ public class DownstreamBridge extends PacketHandler + switch ( objective.getAction() ) + { + case 0: +- serverScoreboard.addObjective( new Objective( objective.getName(), objective.getValue(), objective.getType().toString() ) ); +- break; ++ serverScoreboard.addObjective( new Objective( objective.getName(), objective.getValue(), objective.getType() != null ? objective.getType().toString() : null) ); // Travertine - 1.7 protocol support + case 1: + serverScoreboard.removeObjective( objective.getName() ); + break; +@@ -154,7 +153,7 @@ public class DownstreamBridge extends PacketHandler + if ( oldObjective != null ) + { + oldObjective.setValue( objective.getValue() ); +- oldObjective.setType( objective.getType().toString() ); ++ oldObjective.setType( objective.getType() != null ? objective.getType().toString() : null ); // Travertine - 1.7 protocol support + } + break; + default: +@@ -251,16 +250,28 @@ public class DownstreamBridge extends PacketHandler if ( pluginMessage.getTag().equals( con.getPendingConnection().getVersion() >= ProtocolConstants.MINECRAFT_1_13 ? "minecraft:brand" : "MC|Brand" ) ) {