Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get console output message #3443

Open
4 tasks done
zemise opened this issue Mar 14, 2023 · 4 comments
Open
4 tasks done

get console output message #3443

zemise opened this issue Mar 14, 2023 · 4 comments

Comments

@zemise
Copy link

zemise commented Mar 14, 2023

Feature description

in Bukkit, after send command to console ,could get console output message.

public static @NotNull CommandSender createCommandSender(@NotNull Consumer<? super Component> feedback) {
return server.createCommandSender(feedback);
}

Is it possible to obtain command feedback messages from the BungeeCord console?

Or, there is a way, but I just haven't found it?

Goal of the feature

obtain command feedback messages from the BungeeCord console

Unfitting alternatives

sorry, dont know

Checking

  • This is not a question or plugin creation help request.
  • This is a feature or improvement request.
  • I have not read these checkboxes and therefore I just ticked them all.
  • I did not use this form to report a bug.
@Janmm14
Copy link
Contributor

Janmm14 commented Mar 14, 2023

Its sad you don't take the time to read checkboxes.

Afaik bungeecord does not have any API to execute a command as console, therefore making this feature useless.

@zemise
Copy link
Author

zemise commented Mar 14, 2023

sorry,It may be that my statement is not accurate, such as Bungee javadoc, the following code can be implemented:

CommandSender consoleSender = ProxyServer.getInstance().getConsole();
consoleSender.sendMessage(new TextComponent("command from plugin:" + CommandString));
ProxyServer.getInstance().getPluginManager().dispatchCommand(consoleSender, CommandString);

According to the above code, the command can be sent to the console for execution.
I wonder if it is possible to get the feedback message after the console is executed.
For example,Command “glist” can list the number of people currently online on the BungeeCord server, which is output on the BungeeCord console.

@Janmm14
Copy link
Contributor

Janmm14 commented Mar 14, 2023

My bad, forgot that api exists

@Outfluencer
Copy link
Collaborator

I dont think you can do this with the console but you could implement the CommandSender yourself with all permissions and override the sendmessage method, so you could read the output their

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants