Geyser icon indicating copy to clipboard operation
Geyser copied to clipboard

/help and /? on Bedrock always use the vanilla commands

Open Hypermoron opened this issue 3 years ago • 11 comments

Describe the bug

Running the /help or /? commands on a Bedrock client will always return the vanilla list of commands, regardless of permissions or aliases specified by the server.

To Reproduce

  1. Connect with the Java client and run /? and /help
  2. Connect with the Bedrock client and run /? and /help. Compare the outputs.

Expected behaviour

On the Java client, /help is correctly aliased to Essentials' /ehelp: image

Screenshots / Videos

On the Bedrock client, /help outputs the vanilla list of commands, as in singleplayer: image

Server Version and Plugins

Server is running Waterfall (see dump).

This server is running Purpur version git-Purpur-1402 (MC: 1.17.1) (Implementing API version 1.17.1-R0.1-SNAPSHOT) (Git: b1810bb on ver/1.17.1) Plugins (20): AsyncWorldEdit, AutomatedCrafting, Chunky, Essentials, ExtraContexts, HolographicDisplays, HopperFilter, IllegalStack, LuckPerms, PlaceholderAPI, PlotSquared, ProtocolLib, ServerUtils, TAB-BukkitBridge, Vault, VentureChat, WorldEdit, WorldGuard, floodgate and spark

Geyser Dump

https://dump.geysermc.org/EjeQ2c6QEfsFyzVH2swPoMXF2mUq8PCk

Geyser Version

1.4.3-SNAPSHOT (git-master-e108527)

Minecraft: Bedrock Edition Version

1.17.10 (Windows 10)

Additional Context

No response

Hypermoron avatar Oct 09 '21 09:10 Hypermoron

I'm sure this is fully client sided, nothing Geyser can do.

TheMonBonGH avatar Oct 17 '21 14:10 TheMonBonGH

It's not. On a vanilla server, its help menu appears correctly.

Camotoy avatar Oct 17 '21 14:10 Camotoy

It's not. On a vanilla server, its help menu appears correctly.

Is there something that is preventing this command from passing through to the java server?

YHDiamond avatar Nov 17 '21 13:11 YHDiamond

I found a fix for this. An extra help command needs to be added for bedrock players to use (for example /helpbedrock). My code uses the chat() method to force send /help to the server.

https://github.com/GeyserMC/Geyser/issues/4478#issuecomment-1979664116

package bedrockhelpgeyser.noscope420;

import org.bukkit.Bukkit;
import org.bukkit.Server;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

public class HelpBedrock implements CommandExecutor{

	@Override
	public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args)
	{
		if (sender instanceof Player) {
            Player player = (Player) sender;
            if(args.length == 0)
            {
            	player.chat("/help");
            }
            if(args.length == 1)
            {
            	player.chat("/help " + args[0]);
            }
        }
		
		 
		return true;
	}
	
}

420noscope-exe avatar Mar 05 '24 21:03 420noscope-exe

This should be retested on 1.20.70 given they have added changed some parts of how AvailableCommands works.

Kas-tle avatar Mar 17 '24 05:03 Kas-tle

The original issue still persists in 1.20.70/1.20.71 without the workaround.

My plugin was developed on 1.20.62, and has remained in use since. Seems to work fine on 1.20.70/1.20.71.

420noscope-exe avatar Mar 20 '24 00:03 420noscope-exe

Same issue here, thanks for linking me Camotoy. Will be great when this is fixed! :)

andrewkm avatar Aug 06 '24 22:08 andrewkm

There's a relatively simple workaround that I provided. Although it's a little silly to add an extra command for bedrock players, there isn't a way for geyser to capture the /help command because the bedrock client captures and responds to the command instead. Maybe I'll make a PR if have time.

420noscope-exe avatar Aug 06 '24 23:08 420noscope-exe

There's a relatively simple workaround that I provided. Although it's a little silly to add an extra command for bedrock players, there isn't a way for geyser to capture the /help command because the bedrock client captures and responds to the command instead. Maybe I'll make a PR if have time.

I believe @Camotoy does actually have a way to fix this, as he recently mentioned to me; unless I totally misunderstood.

andrewkm avatar Aug 07 '24 00:08 andrewkm

Latest commit should fix the issue without a workaround.

Camotoy avatar Aug 07 '24 20:08 Camotoy

Latest commit should fix the issue without a workaround.

Looks to still be broken for us and using the minecraft /help instead.

andrewkm avatar Aug 13 '24 17:08 andrewkm