From db5510cc4e6ef457627fa1e44732214771af235c Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 17 Sep 2013 10:28:51 +1000 Subject: [PATCH] Only interrupt tab completion if we have things to complete! --- .../java/net/md_5/bungee/connection/UpstreamBridge.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java b/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java index ef58cc05..b69748e0 100644 --- a/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java +++ b/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java @@ -99,8 +99,12 @@ public class UpstreamBridge extends PacketHandler { List results = new ArrayList<>(); bungee.getPluginManager().dispatchCommand( con, tabComplete.getCursor().substring( 1, tabComplete.getCursor().length() ), results ); - con.unsafe().sendPacket( new PacketCBTabComplete( results.toArray( new String[ results.size() ] ) ) ); - throw new CancelSendSignal(); + + if ( !results.isEmpty() ) + { + con.unsafe().sendPacket( new PacketCBTabComplete( results.toArray( new String[ results.size() ] ) ) ); + throw new CancelSendSignal(); + } } }