Compare commits

...

5 Commits

Author SHA1 Message Date
dependabot[bot] 6320c72961
Merge 72fce754ae into 75191a83f7 2025-08-31 15:09:58 +00:00
LOOHP 75191a83f7
Update pom.xml 2025-08-31 16:09:55 +01:00
LOOHP 04ed353ab9
Merge pull request #92 from danbka4z/fix/declarecommands-null
Fix: Send minimal DeclareCommands packet when no Limbo commands available
2025-08-31 16:09:27 +01:00
Danbka4Z 502aa78c3b
Fix: Send minimal DeclareCommands packet when no Limbo commands available
Previously, when the command list was empty, the server returned null and did not send a DeclareCommands packet.  
This caused the client to lose the slash UI and tab completion entirely.  

Now, when there are no available commands, the server sends a minimal valid tree (only a root node with no children).  
This keeps the client UI functional while still reflecting the fact that no commands are available.
2025-08-31 17:49:37 +03:00
dependabot[bot] 72fce754ae
Bump org.apache.commons:commons-lang3 from 3.14.0 to 3.18.0
Bumps org.apache.commons:commons-lang3 from 3.14.0 to 3.18.0.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-lang3
  dependency-version: 3.18.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-12 01:29:53 +00:00
2 changed files with 12 additions and 6 deletions

View File

@ -24,7 +24,7 @@
<groupId>com.loohp</groupId>
<artifactId>Limbo</artifactId>
<name>Limbo</name>
<version>0.7.15-ALPHA</version>
<version>0.7.16-ALPHA</version>
<description>Standalone Limbo Minecraft Server.</description>
<url>https://github.com/LOOHP/Limbo</url>
@ -229,7 +229,7 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.14.0</version>
<version>3.18.0</version>
</dependency>
<dependency>
<groupId>com.github.Querz</groupId>

View File

@ -34,13 +34,19 @@ public class DeclareCommands {
public static PacketPlayOutDeclareCommands getDeclareCommandsPacket(CommandSender sender) throws IOException {
List<String> commands = Limbo.getInstance().getPluginManager().getTabOptions(sender, new String[0]);
if (commands.isEmpty()) {
return null;
}
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
DataOutputStream output = new DataOutputStream(buffer);
if (commands.isEmpty()) {
DataTypeIO.writeVarInt(output, 1);
output.writeByte(0);
DataTypeIO.writeVarInt(output, 0);
DataTypeIO.writeVarInt(output, 0);
return new PacketPlayOutDeclareCommands(buffer.toByteArray());
}
DataTypeIO.writeVarInt(output, commands.size() * 2 + 1);
output.writeByte(0);