When handling TabCompleteResponse, check if we have a command.

Fixes #154
This commit is contained in:
Andrew Steinborn
2018-11-30 19:14:51 -05:00
parent d3d683dfc0
commit 6e37fa5f33

View File

@@ -386,7 +386,8 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler {
public void handleTabCompleteResponse(TabCompleteResponse response) {
if (outstandingTabComplete != null) {
if (!outstandingTabComplete.isAssumeCommand()) {
if (!outstandingTabComplete.isAssumeCommand()
&& outstandingTabComplete.getCommand().startsWith("/")) {
String command = outstandingTabComplete.getCommand().substring(1);
try {
response.getOffers().addAll(server.getCommandManager().offerSuggestions(player, command));