Minecraft Java Edition – How to Make Console Commands Disappear in Game

minecraft-bukkitminecraft-java-editionminecraft-java-edition-server

So, I am making a server and I am using skript. I am trying to make a command that brings you throughout dimensions. Here are my commands: /overworld /nether /end Here is the script:

command /overworld:
    description: go to the overworld
    aliases: earth
    usage: /overworld
    permission: skript.overworld
    trigger:
        make console execute "/gamerule sendCommandFeedback false"
        message "&6Teleporting..."
        make player execute "/execute in minecraft:overworld run tp ~ ~ ~"
        wait 2 ticks
        make console execute "/gamerule sendCommandFeedback true"

So basically whats happening is the console command is showing up on the chat: [Server: Gamerule sendCommandFeedback is set to true] And I don't want that there. I am a vanilla kind of guy so if theres an extremely easier way other than /execute in minecraft:overworld run tp ~ ~ ~ please tell me. Thank you!

Best Answer

I set up a Spigot server with Skript and added the script file you've provided. When the /overworld command is run it displays this:

Teleporting...
[Server: Gamerule sendCommandFeedback is now set to: true]

To remove the latter line, simply do this:

  1. Permanently set sendCommandFeedback to false. You can also not enable it in another script! As OP in Minecraft or with spigot command run:
/gamerule sendCommandFeedback false

It will not display anything, since you're turning it off.

  1. Use this script instead:
command /overworld:
    description: go to the overworld
    aliases: earth
    usage: /overworld
    permission: skript.overworld
    trigger:
        message "&6Teleporting..."
        make player execute "/execute in minecraft:overworld run tp ~ ~ ~"

Now it should only say 'Teleporting...', and that is only shown to the player running the command as per the documentation of Skript.

Obviously this method won't work if you ever need actual command feedback, but I haven't found any other workaround so far.