Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Is it possible to log all executed server commands including json clicked messages or forced commands / messages (For example /sudo with the Essentials Plugin)?

Edited by HussNuss

  • Author

If you type /sudo [Player] [Command] with e.g. Essentials Plugin you force the player to execute the given command

  • Author
1 hour ago, diesieben07 said:

CommandEvent should cover all commands.

I don't understand why, but I tried:   
 

@SubscribeEvent
    public void onCommand(CommandEvent e) {
        String cmd = e.command.getCommandName();
        System.out.println("Cmd: " + cmd);
    }



and nothing is printed to the console when I execute a command.

  • Author
1 minute ago, diesieben07 said:

Do you do this on the server? Did you register your event handler?

Yes, to both.

  • Author
5 minutes ago, diesieben07 said:

What command did you execute?
Please show more of your code.

Okay, I forgot to test it on a singleplayer world and as I tried it, it actually shows the command, but only if it is a registered existing command. But if I try it on a server, it still doesn't work

I would like to be able to see the command I executed like the message "Player issued server command: /cmd" in a minecraft server console

Edited by HussNuss

  • Author
9 minutes ago, diesieben07 said:

Did you install the mod on the server? 

Please clarify how you actually want this to work.

I don't think it will work, but I want to get every executed command like if you click on any json message with a click event to execute a certain command or if someone lets you execute a command. Is there any event or packet to achieve this? And I have not installed any mod on the server, it's just a regular spigot server.

Edited by HussNuss

  • Author
6 minutes ago, diesieben07 said:

Okay. So, why did you say "yes" when I asked if you did this on the server? Clearly your code only runs client-side if you did not install the mod on the server.

On the client you can use ClientChatEvent to catch any outgoing chat message or command.

I don't know if I'm just stupid, but the event ClientChatEvent can't be resolved, at least at game version 1.8.9. And if I try ClientChatReceivedEvent it shows just every message that's displayed to me on the server.

  • Author
1 minute ago, diesieben07 said:

This event did not exist in 1.8.9.

Update to 1.12.2 or 1.13.2.

Okay, maybe I'll try to make an additional mod for this feature, but thanks anyway ?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.