3

Giving everyone OP status using command blocks.

3 emeralds6 replies62 views
VicsterB started 02/23/2021 9:30 am
RighteousHound replied 03/02/2021 4:09 pm
So I wanna start a server where everyone has OP for an experiment. So I thought it would be the easiest to use command blocks, but no matter what I did it didn't work.

I have enabled command blocks on the server and it still doesn't work.

Any help appreciated.


Thank you in advance, VicsterB
Posted by avatar
VicsterB
Level 1 : New Miner
0

6 replies

1
03/02/2021 4:09 pm
Level 11 : Journeyman Pokemon
RighteousHound
RighteousHound avatar
I mean you could just have a permissions plugin that makes the default player have "permissions.*" which is basically like being an OP..
1
02/23/2021 10:12 pmhistory
Level 1 : New Miner
Centural_Us
Centural_Us avatar
So I think it MIGHT be possible within a datapack, but I do not think you can do this inside a command block due to command block restrictions. (It wont run the command "/op @a" due to how the game is programmed)



So within a Datapack there is a way to increase the permissions a datapack (By default I beleive they are 4 which is same as regular player OP on server) has, so perhaps try writing in the same command I mentioned into the datapack and if that works vulala!



I will try this out myself and let you know ASAP what I find out.

The last option is to wrap you server.jar in something that can detect when a player logs in (Monitor the console output from the server) and add them to the list by piping in the op command. (This approach is NOT considered vanilla though)



Currently what I do is I just have a monitor script running that detect if a player has joined, It plays a Loud Sound and I click two buttons to stop the sound and to manually op them without typing the command.
1
02/23/2021 10:18 pmhistory
Level 1 : New Miner
Centural_Us
Centural_Us avatar
execute as @a[​tag=!ignore] run tellraw @a[​tag=monitor] ["",{"text":"---------------Click Here Make Operator!---------------","color":"red","insertion":"Discord Link","clickEvent":{"action":"run_command","value":"/op @a"}},{"text":"\n"},{"text":"---------------Click Here Make Operator!---------------","color":"red","insertion":"Discord Link","clickEvent":{"action":"run_command","value":"/op @a"}},{"text":"\n"},{"text":"---------------Click Here Make Operator!---------------","color":"red","insertion":"Discord Link","clickEvent":{"action":"run_command","value":"/op @a"}},{"text":"\n"},{"text":"---------------Click Here Stop Sound!---------------","color":"gold","clickEvent":{"action":"run_command","value":"/tag @a[​tag=!ignore] add ignore"}},{"text":"\n"},{"text":"---------------Click Here Stop Sound!---------------","color":"gold","clickEvent":{"action":"run_command","value":"/tag @a[​tag=!ignore] add ignore"}},{"text":"\n"},{"text":"---------------Click Here Stop Sound!---------------","color":"gold","clickEvent":{"action":"run_command","value":"/tag @a[​tag=!ignore] add ignore"}}]

execute as @a[​tag=!ignore] run playsound minecraft:block.beacon.ambient master @p[​tag=monitor] ~ ~ ~ 64 1

The first command runs in Repeat (Unconditional, Always On) the second command is attached to the first one and runs in Chain (Conditional Always On)



That will give you a noise until you click the buttons in chat.



Ill let you know about the Auto OP Datapack option in a bit.

These two commands are the ones I use



PS: type /tag @s add monitor

OR /tag PLAYERNAME add monitor



anyone with the monitor tag hears the sounds and gets the messages. in theory you could make this auto tag everyone monitor and than ALL players would get this annoying sound when a player logs in and have to click to stop it (And if they are op and click the other button that would OP the new player as well)



I tend to only add me as the monitor, but you can add any player to that and it will send them the sound and the tellraw clickable message.
1
02/23/2021 9:42 am
Level 23 : Expert uwu
Owul
Owul avatar
Or do /op @e or /op @a or /op @r
1
02/23/2021 9:42 am
Level 23 : Expert uwu
Owul
Owul avatar
Set the permissions for average players to op
1
02/23/2021 9:33 am
Level 2 : Apprentice Warrior
the voidkiller
the voidkiller avatar
you cannot use an op command block you will have to op each individual player or tell staff to do so
Planet Minecraft Logo

Website

© 2010 - 2021
www.planetminecraft.com

Welcome