RunAs
RunAs is a simple way to run commands as someone else.
Features:
- Run commands as someone else.
- Run commands as the console
Commands
Command | Description | Permission |
/sudo <player> <command> | Run <command> as <player> | 'runas.player' |
/sudo <console(Default "c") | Run <command> as console | 'runas.console' |
(There are two aliases for "/sudo" : /run <player/c> <command> & /runas <player/c> <command>)
Config
showUnknowCmdInSteadOfDontHavePerms # If true, "Unknow Command" will be shown, instead of "You don't have permission to do this" ConsoleAlias # the console alias
Examples
/sudo c /say test OR /sudo c say test |
The command "/kill" will be executed by the console |
/sudo abc123 /kill OR /sudo abc123 kill |
The command "/kill" will be executed by "abc123" |
I know, my english isn't so good and hopefully its possible to understand this site. If you have any problems with the plugin, just write me a PM. Source code: GitHub
Does anyone know the permission for this command? sudo?
-deleted-
just gonna get essentials instead of this...
not working for bungee cord commands
[+] Add the comand /sudo -o <player> <command> and the player you force to make that command will have all the permissions when it runs it. Like if I wanna do: /sudo -o Steve gamemode 1 but he's not OP or he doesn't have permissions.
@Karuso33:
I'm guessing this is a dead project since it's been over a year since the last update, but if you're still watching this thread at all it'd be awesome if you're able to put out a new/dev version with a config option to disable the "Your command will be run as console" or "Your command will be run a whatever_your_name_is" messages.
Ehm... Would it be possible to implement a safeguard for this to forbid my admins from using commands as me (an operator, basically the same as console)?
@Karuso33
Could you add the option to use a configured word instead of just sudo?
Really nice work, you are the best. Thank you so much !!!!!!!!!!!!!!!!!!!!!!!!!
The thing that I really want though is the ability to type commands through other plugins, so for example if some idiot spawns in 3000 of some entity that will lag everyone out, I want to be able to go into to the console, type sudo playerName removedrops 50
Im not sure if that is possible with the current CraftBukkit setup, but here's to hoping, right?
Thanks sooo much!
@Karuso33
Yay :D Nice work.
@Technius
Yeah, he PM'ed me and I sent him links to JD GUI and JAD
@falsevacuum
Fixed.(?)
@hawkfalcon
Most likely decompiled it. Many of us do that.
@falsevacuum
How did you find the source??
Hi,
Here are some notes I made:
Line 78: "Your command will be executet by " should be "Your command will be executed by "
Line 80: "This player does not exsists" should be "This player does not exist"
Line 72: "Your command will be executet by Console" should be "Your command will be executed by the console"
Line 35: You shouldn't cast sender to a player. All the things you want to do can be done on a CommandSender, and this line would throw a ClassCastException if you executed from the console.
On lines 42 and 46, you assume args has a length of 1 or more. (some people don't think and might just type /sudo) You should check that the number of arguments is at least 1.
Line 77: You should check that Bukkit.getServer().getPlayer(Executer) does not return null, because this could throw a null pointer exception.
Line ?: When do you use the global variable "muted"?
Good luck :D
Edit: you might want to change your state to "Alpha," "Beta," or "Release." ;)