Is it possible to see perform command with some mod?

Discussion in 'Spigot Discussion' started by iTweakz, Jun 5, 2017.

Thread Status:
Not open for further replies.
  1. So I perform some command in game with out that I know that like I press compass and then I perform some command. So is it possible to see the command with some mod like some 5 zig mod add on? I hope so that is it not :D
  2. I don't understand what you are trying to say. Do you want to see if a command is executed by a mod and not by the player ? If so, I am afraid that this is not possible.
  3. Here is example
    by clicking compass player execute some command exemple /test
    so can player see with some mod not ( moderator just mod ) like 5 zig that command what the compass executed
  4. I don't think that a player will be able to see the command that was executed. The plugin sends the command directly to bukkit/spigot and not via the player.
  5. Why would some player be able to see what commands some other player executes without the use of plugins? Commands are sent to the server. A client cannot intercept this.
  6. You can see even plugins with some client so I wanted to make sure that players can not see commands
    #6 iTweakz, Jun 5, 2017
    Last edited: Jun 5, 2017
  7. Basically no. The player won't be able to see the command in such a situation. It's completely server side.

    Code (Text):
    public void onPlayerInteract(PlayerInteractEvent e) {
        if (e.getHand() == EquipmentSlot.HAND && e.getPlayer().getInventory().getItemInMainHand().getType() == Material.COMPASS) {
            // The client won't even know that it "performed" the "aSecretCommand" command, because it's completely server side.
    However, if the command is sent to the player as a clickable chat message, it is technically possible for the client to see that command, because the command that should be executed by the player upon clicking the chat message is sent to the client with the chat packet.

    Code (Text):
    TextComponent component = new TextComponent("Click this chat message!");
    component.setClickEvent(new ClickEvent(Action.RUN_COMMAND, "/aSecretCommand"));
    // The player could possibly see this command because it's being sent to the client with the chat message and it's up to the client to decide when this command should be executed.
  8. Thanks I got it
Thread Status:
Not open for further replies.