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
@alkarinv
Thank You SO MUCH:)
1 other thing ... before the player connects .. where is sayes : for example : 4/8
can you make a virtual player make it go up when they connect..
Or How Can I Fake That?
thanks so much :)
@matthew1235100
Hey, I made a version for 1.2.5 for you. I didn't have a lot of time to debug so let me know if there are issues.
VirtualPlayers for craftbukkit 1.2.5
Hello There, I Run A Tekkit Server And Tekkit Is 1.2.5 So Could i Have The Download Link For The Plugin 1.2.5 Thank You :)
@zsombi28
They don't take up reserve slots as far as I know, and they shouldn't be part of the player list or online. If you have a custom plugin that handles player connects and you do "dc <player> connect" then maybe.
Hi
Are virtual players' name displayed in playerlist (when push tab) and are they reserve slots?
@Evanito
Its for debugging.
For example, lets say you are designing a plugin that teleports a player to the nether, sends them a message.
With Virtualplayers, you don't have to log into minecraft, type each of the commands one at a time through the game, and do this over and over until your plugin is debugged.
Instead you type those commands once in a text file as commands from virtual players, then paste them into the console. Trust me, it's a much faster way to debug.
You can also use this to ensure that plugins don't break after changes. Just save the actions and redo them after the changes.
Cant figure out what use this has