VirtualPlayers
VirtualPlayers
This is a lightweight plugin for 1) debugging plugins or 2) doing commands for plugins that need players.
The virtualPlayers can take actions via commands and print out the events that are happening to them on the console. These players don't show up in game, but are just used for performing actions as if a player was there. Very useful if you don't even want to load up Minecraft, you just boot the server and debug as if you were players without even running the game.
The virtual players respond to the following commands.
Commands as Players
Commands: dc = do command, <virtual player> = the name of virtual player
- dc <virtual player> any command you would normally do as a player
- dc <virtual player> op : op virtual player
- dc <virtual player> deop : deop virtual player
- dc <virtual player> respawn : respawn the virtual player
- dc <virtual player> disconnect
- dc <virtual player> connect
- dc <virtual player> reconnect
- dc <virtual player> health <amount> : give the virtual player some health ( or kill them if 0 )
- dc <virtual player> inv : print out their inventory
- dc <virtual player> giveinv <item> : give them an item
- dc <virtual player> tp <location> : teleport them to the given location ( "world,3,3,3" )
- dc <virtual player> chat my message : have the virtual player talk in chat
- dc <virtual player> hit <player2> [damage] : attack other players, defaults to 5 damage
- dc <virtual player> interact <left | right> <location> : do a PlayerInteractEvent on the specified block location
- /dc <virtual player> bpe <block> <location> : do a BlockPlaceEvent of the given material at the given location
- /dc <virtual player> bbe <location> : do a BlockBreakEvent at the given location
Other Commands
- /virtualplayers hideMessages : hide messages from players
- /virtualplayers showMessages : show messages from players
Examples:
- dc p1 spawn
- dc p2 disconnect
- dc p1 chat Hello Server!
- dc p3 bpe iron_block world,310,65,700 : Place an iron_block at world,310,65,700
hideMessages
Virtual Players will print out to the console if they teleport, receive a message or tell, respawn, connect/reconnect
I usually have a text file where I type out the commands I want to do with the players then just paste all of the actions into the console
Latest updates:
https://dev.bukkit.org/projects/virtualplayers2
https://github.com/Europia79/VirtualPlayers
Not working for 1.8.8?
please update to 1.8
@BaccaWolf
To my knowledge, VirtualPlayers is mainly used for testing environments... Not so much production servers ? Me and some other developers use it to test our plugins.
Just out of curiosity, what are you using VirtualPlayers for ?
Also, I'm a huge fan of bigscary's GriefPrevention... /dc is an alias for the Admin cmd /deleteclaim. Which you shouldn't need to use too often because GriefPrevention automaticaly deletes old claims... where an old claim is defined as the owner has not logged on in a long time. If you do need to use this cmd, for now, you can use the full cmd name: /deleteclaim
Another solution would be to edit the VirtualPlayer's plugin.yml yourself: Rename VirtualPlayers.jar to VirtualPlayers.zip. Extract it. Edit the plugin.yml and remove the alias. Save it. Hold control and click the /src/ folder and also click plugin.yml. Then right-click select 'Send to' -> 'Compressed Zip Folder'. Finally change the extension from .zip to .jar
Yet another workaround is here http://wiki.bukkit.org/Commands.yml
Can you add another /dc command as it is interfering with Griefprevention. Make it like /docommand or something
VirtualPlayers is now updated for 1.8
http://dev.bukkit.org/bukkit-plugins/virtualplayers2/
Development builds of this project can be acquired at the provided continuous integration server. These builds have not been approved by the BukkitDev staff. Use them at your own risk.
http://rainbowcraft.sytes.net:8080/
Official BukkitDev builds incoming! Stay tuned.
@Pixelmod
Yeah, I know. That's Alkarin's server. I'm working on creating another build server. In the meantime, anyone can download Maven, download the code off Github, and build the project with the command:
mvn package
@Europia79
Your dev builds repository is closed as we speak. Access is denied. Fix this maybe.
VirtualPlayers has been updated for 1.7.10 at
https://github.com/Europia79/VirtualPlayers
VP v1.5.10 adds backwards compatible with Minecraft 1.2.5 thru 1.7.10. It also fixes the BlockPlaceEvent command.
Backwards compatibility is a nice luxury if you need to test against multiple versions of minecraft.
The next version of VirtualPlayers will feature a PIE command, which will force the VirtualPlayer to trigger a PlayerPickupEvent for any items on the ground at its location.
Would it be possible to make this plugin usable with LogBlock? It'd be wonderful to rollback griefed areas w/o even making admins presence visible.
Some plugins giving a NullPointerException when using command with a VirtualPlayer.
@oxygencraft
It's a numeric data type, without a dot
what is a integer
Thank you so much for this plugin! Please keep updating it if it ever needs updates! It helps me so much!
So you can get these Virtual Players to do most commands, but none of the multiplayer-only commands like /op or /kick (the same ones that Command Blocks cannot run), even when they're opped. Is that your intention? Or is there a way to make that work which I haven't figured out? Thanks.
Will the version 1.5.8 work with 1.7.9 ?
I need it so when I call hasPlayedBefore on a virtual player, it returns whether the virtual player has ever connected before or not. Somehow it handles the virtual players always as new players.
If this plugin doesn't support this feature, please add it, I really need it :P
I slammed my foot against the wall after i saw this
You can send player packets to client or integrate your plugin with Citizens