What I would like is pretty much a plugin in which you can run a command as an OP, for example, let's say that you cannot use the command /test in the console, only as a player. I would like it so that I could, with a command, have a NPC OP run /test, the reason /sudo jojodmo2010 test will not work is because, what if that player is not online. I would like to use this for BuyCraft, so that I can run a command which does not work in console as a NPC OP, I would have it do /sudo jojodmo2010 <command>, but what happens if I'm not online? The player would not receive what they bought. It shouldn't be an NPC, but just something that runs a command as an OP, and to control it, you should only be able to use the console. Thanks
No, that would run it as the console. Let me be clear - I want to be able to run a command as an opped player in the console. Doesn't allow you to run a command as an OP, though, only as the console.
Quote from here: http://wiki.sk89q.com/wiki/CommandHelper/Staged/API/sudo runas can perform commands from console:
So I could do something like this in my console.txt: Code: /cmanuaddall (.*) (.*)/ ==> ruans~op manuaddall $1 $2 It really didn't explain it very well on the wiki. I would like this to be able to work in console.
Honestly, based on your original post, I would say you want to contact BuyCraft for help on this issue and not request a separate plugin just to make it work. You might want to check out Enjin too.
This is what I'm going to use it mainly for, theres no doubt I'm going to use it for tons of other things, though Okay, great! My only problem is that now any user can run the command, I would like it to be only be able to be run as the console, or make them have to have a permission to run the command. If you can't do this i'll just change the command to something like /command-5XY781-GWSB-881GUIV3D or something like that. EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Don't give them the CommandHelper permissions. (In fact, if you have your perms set properly, you should be running as an admin, not op.) You can set up permissions per alias like this: Code: commandhelper.alias.<label> #allow a player/group to use this alias -commandhelper.* #deny anything else Check here for the CommandHelper permission settings.
Got it. Yet for some reason this always returns 'world' where build, pvp, and kpvp are: Code: manuaddallpermission:/manuaddall $user $rank $world = runas('~op', /manuadd $user $rank spawn) \ runas('~op', /manuadd $user $rank build) \ runas('~op', /manuadd $user $rank PvP) \ runas('~op', /manuadd $user $rank KPvP) \ So basically, where spawn, build, pvp, and kpvp are, it desides to replace with 'world' so I get this: Code: jojodmo2010 was moved to group owner in world. jojodmo2010 was moved to group owner in world. jojodmo2010 was moved to group owner in world. jojodmo2010 was moved to group owner in world. when what should happen is this: Code: jojodmo2010 was moved to group owner in spawn. jojodmo2010 was moved to group owner in PvP. jojodmo2010 was moved to group owner in KPvP. jojodmo2010 was moved to group owner in build. I'm using the correct command in commandhelper... Any ideas?
jojodmo2010 Try this code: Code: manuaddallpermission:/manuaddall $user $rank = >>> sudo(/manuadd $user $rank spawn) sudo(/manuadd $user $rank PvP) sudo(/manuadd $user $rank KPvP) sudo(/manuadd $user $rank build) msg('Player added') <<< Removed the world variable in the command