-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to run "role assign @s[type=minecraft:player] (rolename)" from a command block #48
Comments
The For general command block use, this bug still should be fixed, though. |
@s works just fine in command blocks, when the command starts with "execute as" (which they already did in the sources where I got them) @s alone does not work while manually running /role assign @s (role) for example, but /role assign @s[type=minecraft:player] does. The mod doesn't like @s because it can include entities, but with @s[type=minecraft:player] it works fine. Command blocks just cant run "role assign" at all, even with a specific username, so @s isn't the issue when used as @s[type=minecraft:player] |
I just finished setting up discord integration, which let me run /role assign in the console thru discord, and I thought "well, discord can do it, its a shame the command block can't, why not just give it another shot?" and lo and behold, it now works! Turns out this issue is tied into the config file for Player Roles not being loaded on startup until running /role reload: #45 Having /role reload executed fixes this issue where command blocks cannot execute /role assign. I also went overboard making sure command blocks could use the command (made up some permissions that may or may not exist lol):
edit: command blocks can run basic /role assign (playername/selector) (rolename) but as soon as it uses the execute command and has conditions it doesn't work. These commands work fine being manually executed, and have no issue being executed by a python script that connects using RCON, which is going to be my solution for the moment. Command blocks would be better in case my script crashes (which it does if it can't connect to the server thru RCON) |
Hello!
I'm not sure why I can't run it, but I would be ecstatic if we were able to run the command "role assign @s[type=minecraft:player] (rolename)" from a command block. or just /role assign in general (it doesn't work even if I substitute in a player's name)
I've already got scoreboard and command blocks tracking playtimes in minutes. I have ranks set up, and want to promote players once they hit milestones of playtime minutes. I know the command blocks work fine, they trigger "say test" for example when they hit the right number of minutes. "role assign" just refuses to run. I've already created a command_block role to give them access to every possible command, which has allowed command blocks to run "role reload."
running 1.18.1
fabric loader 0.12.12
mod list: https://pastebin.com/yixz32aU
The text was updated successfully, but these errors were encountered: