3

After learning how to make signs that run commands when you click them, I have relied on them a lot with my Minecraft server. Most of the teleporting stuff and /say stuff use them. They were working for me and the other admins but when a non-OP player tries them, she said they weren't doing anything. Is there any way to fix this or will I just have to switch everything to pressure plates? On other servers that I've played on, teleporting signs work for non-OP players but I assume this is just some plugin.

I've looked up how to give non-op players permissions and how to make non-op players able to use teleporting signs. I found nothing useful. For both, I only found stuff about plugins which is something the other admin and I are struggling to get. Do you know how to do this WITHOUT plugins or are plugins required?

  • Have you made any attempt to solve this yourself? Arqade works better when askers show effort to solve their own problems; we see that you have a problem you've worked on, and answerers respond to that. You also get a more specific answer that's tailored exactly to the part you're stuck, and Arqade gets a very specific question. Everybody wins! – Frank Jan 13 '18 at 17:17
  • 1
    Really. This comment again!? I'm not stuck, I just have a question – hakalo Jan 13 '18 at 17:42
  • And again, what have you tried? You showing effort goes an extremely long way here. – Frank Jan 13 '18 at 17:55
  • Is it a vanilla server? Other servers might use CommandSigns or similar. – dly Jan 13 '18 at 17:57
  • 2
    Yes, it is a vanilla server. Sorry Frank, I really don't even know how to start to figure it out and I can't find anything useful on the internet. – hakalo Jan 13 '18 at 18:16
3

In vanilla minecraft, the use of scoreboard triggers can allow non OP players to trigger the execution of op level commands. Commands are Minecraft Java Edition is 1.12.2

Setup

Create a trigger objective one time manually:

scoreboard objectives add cmdTrigger trigger

Next you have to enable that trigger to allow players to use it. Create a command block and set it's options to RepeatUnconditionalAlways Active with command:

scoreboard players enable @a cmdTrigger


Command Setup

Now create a chain of two command blocks. This chain will need to be repeated for each command that you want non OP players to run but the scores in the commands will be different.

The first command block is where the OP level command is executed on the behalf of the player. This is accomplished by specifying the cmdTrigger score in the target selector. An example target selector is @a[score_cmdTrigger_min=1,score_cmdTrigger=1]. The first command block needs to check continuously so it is RepeatUnconditionalAlways Active

Some example commands are:

  • Teleport the player somewhere:

    • tp @a[score_cmdTrigger_min=1,score_cmdTrigger=1] <x> <y> <z>
  • Make the player say hello:

    • execute @a[score_cmdTrigger_min=1,score_cmdTrigger=1] ~ ~ ~ say Hello

The second command block resets the cmdTrigger score back to 0 so it will only execute the previous command one time. It is ChainConditionalAlways Active with command:

scoreboard players set @a[score_cmdTrigger_min=1,score_cmdTrigger=1] cmdTrigger 0

Use different cmdTrigger scores to trigger different commands. A second set of commands would use target selector:

@a[score_cmdTrigger_min=2,score_cmdTrigger=2]

Continue with as many chains as you want commands.


Command the player needs to execute

The actual command the player has to execute in order to trigger the OP level command:

/trigger cmdTrigger set <score>

Set the <score> based on the command that you want to execute. The player can manually enter this command in chat and it will succeed. This requires they know what command to type and what each score does.

In your case, this is where you use the command signs to run the trigger commands. You can use this Command Sign Generator to create these signs more easily. Here is an example command that will give you a sign that when placed and clicked, will trigger the first command you have setup:

/give @p sign 1 0 {BlockEntityTag:{Text1:"{\"text\":\"Run the\"}",Text2:"{\"text\":\"first command\"}",Text4:"{\"text\":\"Click the sign\",\"color\":\"aqua\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger cmdTrigger set 1\"}}"},display:{Name:"Example Sign"}}
  • BTW, I already use that generator, but thanks – hakalo Jan 16 '18 at 1:23
  • No problem. I mention the generator just in case. No need to thank me. In fact, stack exchange would rather you didn't use comments to say thank you. It's all covered in the help center on the page "What should I do when someone answers my question?". – IronAnvil Jan 16 '18 at 3:34
  • okay, got it. This is very complicated but I think I can figure it out – hakalo Jan 20 '18 at 15:43
  • Do you discord? I can hop on your server and help. – IronAnvil Jan 20 '18 at 15:48
  • what's discord? – hakalo Jan 20 '18 at 15:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.