diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientPlaySessionHandler.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientPlaySessionHandler.java index a76f054e72..f01796e1c3 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientPlaySessionHandler.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientPlaySessionHandler.java @@ -676,10 +676,14 @@ private boolean handleCommandTabComplete(TabCompleteRequestPacket packet) { for (Suggestion suggestion : suggestions.getList()) { String offer = suggestion.getText(); ComponentHolder tooltip = null; - if (suggestion.getTooltip() != null - && suggestion.getTooltip() instanceof VelocityBrigadierMessage) { - tooltip = new ComponentHolder(player.getProtocolVersion(), - ((VelocityBrigadierMessage) suggestion.getTooltip()).asComponent()); + if (suggestion.getTooltip() != null) { + if (suggestion.getTooltip() instanceof VelocityBrigadierMessage velocityMessage) { + tooltip = new ComponentHolder(player.getProtocolVersion(), + velocityMessage.asComponent()); + } else { + tooltip = new ComponentHolder(player.getProtocolVersion(), + Component.text(suggestion.getTooltip().getString())); + } } offers.add(new Offer(offer, tooltip)); }