RemoteCommand
This plugin allows you to execute commands as someone else. It is an "out-of-need-creation" and was coded in less than 30 minutes. I thought I might as well release it, since it's so simple and apparently does not yet exist in this shape.
Features
- Provides a command to let you execute a command as a different player or the console.
- The command can also be executed from the console or from a command block.
- Has various permission nodes to protect you from unwanted commands.
- You can also send chat messages as that player if you wish.
- As simple as you would expect it to be.
- No pointless console outputs that flood your log.
Source code
This plugin is open source on GitHub.
Usage
Command syntax is:
/as <who> <command|message>
(If the alias "/as
" is occupied on your server, use "/remotecmd
" )
- <who>
- Either a name of an online player (may be partial), or
console
- <command|message>
- The command to execute. If it doesn't start with a
/
, it is considered a chat message (unless <who> is the console).
Note that the command is executed exactly as if the specified player executed it. That means that the checked permissions will be those of the remote player, and any notification or error message of the command will be sent to the remote player.
Permission nodes
- remotecommand.*
- Gives access to all permissions of this plugin. (default: false)
- remotecommand.use
- Allows the usage of the "
/as
" command. (default: op)
- remotecommand.console
- Allows executing commands as the console. (default: op)
- remotecommand.protected
- Blocks others without this node to execute commands as the player with this node. You don't want anyone to do nasty stuff as you, the super powerful monster admin, right? ... Right?! (default: op)
That's it. No config, no dependencies, nothing complicated.
If you want to declare your love to me, please put it in the comments. You monster.
Nice plugin :) There is a similar function in Essentials (/sudo <player> <command>)
@Bone008
Commands from other plugins that haven't been registered. I.e. - custom commands from Skript. =)
@Simon150999
Technically impossible if it should work with any command, since permission nodes are usually the responsibility by the plugin owning the command. By making another player the "owner" of the command, there is no longer any association with you.
Any plugin commands that already support a "target player" option don't need this plugin anyway.
Only possible way would be to manually provide a permission node that is temporarily given to the player.
@TheBlackBeltPanda
What do you mean, "unregistered commands"?
Can you add support for unregistered commands in-game and in the console?
Enable a permission override option, where the command isnt affected by any permissions the target does (not) have.
@smooglerpl
Get Talkas plugin.. Then you cant talk as players that are offline...
Hi! Cool plugin but it doesn't work if the player is offline. Could you add that ability ? Please, it's important for me and I can't find sth like this anywhere :(
Cool plugin, usefull in combination with the ChangePlayerName plugin :D
I was wondering if you could possibly make it so that by typing a different command you go into their perspective, reading all chat as they see it, and seeing all commands they type?
So if i wanted to troll myself then could i do (as a player):
START OF CODE: /as console as bearbear12345 /as console as bearbear12345 /me says I Am A TROLL END OF CODE
Loove the plugin man, helped me out lot.. :D
U need a bot.. a fake player with op perm (always online)
So if i need a command to run every half our and that cmd doesnt work within console. i need it to run as the fake player who say it.. :D
If you get wht i mean.. :D
@AkiraShirou Yes, that is right.
so to run a command on the console in-game: '/as console <command>' is this right?
and /sudo in essentials only work on players as far I know. and there is plugin called sudo to run commands from console.
This looks more interesting and useful because /sudo is already used by essentials and i'm trying to make signs for players to use commands from console from clicking the sign.
@ananddavis692
Oh, Essentials did that? Didn't know that, I didn't use Essentials since about bukkit build #500 over a year ago ;)
Does "sudo" support performing as console? From console? Chat messages as other players?
Anyway, I'll see it as an enhancement or alternative for people without Essentials.
@Unpluggeddk
That's exactly what this plugin does. The "as" command is also available from the console. I'll add that to the description.
You can for example type "
as bone008 /<some command>
" from the console and it'll work.You could just use the "sudo" command in essentials
Im looking for a plugin where i can
Type something in the console and let it be executed as a player ingame..
It is not all plugins that works in the console, and theres no plugin like that yet.
example.
pcmd "player" heal