EssentialsX

EssentialsX

2M Downloads

/sudo command not executing commands when entered via in-game GUI

NomadicNom opened this issue ยท 4 comments

commented

Information

Full output of /ess version: https://gist.github.com/NomadMC/ede2809e3f3a8ab9e4764b8732efce35#file-ess-version-output

Server startup log: https://gist.github.com/NomadMC/ede2809e3f3a8ab9e4764b8732efce35#file-serverstartuplog

EssentialsX config: https://gist.github.com/NomadMC/ede2809e3f3a8ab9e4764b8732efce35#file-config-yml

Details

Description
In brief, on 1.13.2 on the experimental version indicated in the log above, the /sudo command appears to work only when fired by the console or by a command block. It has no effect when run by a user, despite this having worked in previous versions (as far as I can recall).

Steps to reproduce
Simply attempt to execute a /sudo command (e.g., /sudo [yourname] fly) in-game. The result will be a chat message informing you that the sudo command was run, but no other result will occur in-game. The command that was supposed to be executed via /sudo will not be executed.

Expected behavior
Using "/sudo [name] [command]" in-game (or anywhere else) should result in the target user being forced to execute that command.

commented

Thanks for filing a bug report!

No changes have been made in experimental builds to /sudo that I can recall.

Could you try replicating this with either PEX 1.23.4 or LuckPerms? We can't guarantee consistent behaviour on the PEX version you're using.

In addition, does this occur on release builds on 1.13.2?


#2166 may affect this, but it seems unlikely.

commented

Updated PEX to 1.23.4; tested with latest release builds. Behavior is same.

I could just be wrong about how sudo works in the first place; is /sudo simply not intended to work on the person executing the command?

I could've sworn that sudo worked on oneself in past versions of ESX. Maybe I'm wrong, though.

commented

I could just be wrong about how sudo works in the first place; is /sudo simply not intended to work on the person executing the command?

if (user.getName().equals(sender.getSender().getName())) {
return; // Silently don't do anything.
}

Correct - /sudo skips over the current user.

I could've sworn that sudo worked on oneself in past versions of ESX. Maybe I'm wrong, though.

20f79f1#diff-2cf68a186617c97010b7865fc4714478R39

It's possible that you used an incredibly early version of EssentialsX from the first three weeks of its existence...? Or you might be thinking of the original Essentials ๐Ÿ˜›

commented

Likely the original Essentials. I probably haven't used it on myself in awhile and just figured it had remained that way when ESX came around.

Anyway, figure that about closes this then.