VirtualPlayers2
NOTE: This project has moved to Modrinth. All future updates will be posted there and this page will no longer receive updates.

A plugin that allows you to create virtual players for easy debugging of plugins through console or in-game.
VirtualPlayers is a plugin designed for developers and server admins to easily test and debug plugins that require multiple players. Virtual players are non-existent in-game, and are only accessible through console or chat, meaning they will be invisible on the server list, player count and in-game.
VirtualPlayers will also work with many large Minecraft plugins, such as WorldEdit, allowing you to perform actions that are typically reserved for online players, but through a console. Virtual players can also be managed in-game, or through other command senders, such as command blocks or signs.
Features
- Run commands as a virtual player through console or chat
- Send messages as a virtual player through console or chat
- Teleport a virtual player to a specific location
- Op/de-op a virtual player to test command execution
- Attack a real player as a virtual player to test combat mechanics
Commands
| Command | Description |
|---|---|
| /vp create <name> | Creates a new virtual player. |
| /vp remove <name> | Removes a virtual player. |
| /vp removeall | Removes all virtual players. |
| /vp select <player> | Select a virtual player. |
| /vp observe <player> | Observes a virtual player. |
| /vp unobserve <player> | Unobserves a virtual player. |
| /vp list | Lists virtual players. |
| /vp verbose [player] [true|false] | Toggles verbosity for the virtual player. |
| /vp teleport [player] [location] | Teleports the virtual player to a location. |
| /vp command [player] <command...> | Runs a command as a virtual player. |
| /vp chat [player] <message...> | Sends a chat message as a virtual player. |
| /vp op [player] | Ops the virtual player. |
| /vp deop [player] | De-ops the virtual player. |
| /vp attack [player] <target> [damage] | Attacks another player as this virtual player. |
Permissions
| Permission | Command |
|---|---|
| virtualplayers.command.help | /vp [help] |
| virtualplayers.command.create | /vp create |
| virtualplayers.command.remove | /vp remove |
| virtualplayers.command.removeall | /vp removeall |
| virtualplayers.command.select | /vp select |
| virtualplayers.command.observe | /vp observe |
| virtualplayers.command.unobserve | /vp unobserve |
| virtualplayers.command.list | /vp list |
| virtualplayers.command.verbose | /vp verbose |
| virtualplayers.command.teleport | /vp teleport |
| virtualplayers.command.command | /vp command |
| virtualplayers.command.chat | /vp chat |
| virtualplayers.command.op | /vp op |
| virtualplayers.command.deop | /vp deop |
| virtualplayers.command.attack | /vp attack |
Developer Guide
VirtualPlayers offers an API for developers to use. Please see the Developer Guide for instructions on using the API.
Links
- Website: https://www.battleplugins.org
- Discord: BattlePlugins Discord
- Donate: BattlePlugins Patreon
-
View User Profile
-
Send Message
Posted Mar 22, 2015@amli2011
i'll try to update VirtualPlayers this week. Thanks for letting me know about a new Minecraft update for 1.8.3
@ceagle2
i think one of the plugins on my server keeps chunks loaded. I'm guessing it's Multiverse-Core, but i could be wrong ? Until I get a chance to look into it, i would try Multiverse-Core, login just once, logout, and see if that works.
-
View User Profile
-
Send Message
Posted Mar 22, 2015@Europia79
I'm doing as much as possible with CommandBlocks in order not to become too dependent on plugins which authors tend to abandon far too often for my taste - this for example also includes a random loot chest, each player should be able to use once per day. This makes a daily reset necessary, which I do this way: a cronjob sends a certain setblock-command to console to place a redstone block somewhere to remove and re-add an objective for that random loot chest. The whole mechanism resides in overworld spawnchunks. But the reset won't do a thing if there's no player in the overworld when the cronjob-reset-setblock-thingy happens. Already thinking about making a PHP-script to do that sort of resets in an endless loop until the rcon response says that it worked.
Also a lot of other stuff with /trigger commands which require overworld CommandBlocks to do their job - which they don't, if for example there is only one player online and he's in the nether. Then I'd have to copy all of that into the nether spawnchunks, which btw don't load if the first one to enter the nether enters it far away from spawnchunks - but once they're loaded, they stay loaded even if that one person moves far away from them, until he leaves the nether.
Problem there is: commandblocks or rather selectors don't differentiate between worlds anymore, so if nether AND overworld are both active, both commandblock-centers would do the same thing and interrupt each other due to differences in their timing. So I can only have such a commandblock-center in one world to do its work for players in every world, and thus I require the spawnchunks of this one world to stay loaded permanently even without players.
I did try Citizens, but it doesn't keep anything loaded. Other than that, I try to keep the amount of plugins as low as possible - right now it looks like this:
Absolutely necessary: GriefPrevention, ChunkLoader (for Nether and Endworld spawnchunks, which behave weird in some cases, as explained above)
Optional plugins, could live without: BetterAlias, ChunkLoader, CoreProtect, Dynmap-GriefPrevention, EntityWatch, HideStream, MuteManager, NoCheatPlus, OpenInv, VanishNoPacket, Votifier, bPermissions, dynmap, pTweaks, quickcuboid
I have also tried about any plugin I could find to keep chunks loaded, but none of them managed to do that without players in that particular world. That's why I'm hoping that players can somehow be 100% simulated - which methods are triggered when a player joins a server? Can they be triggered to simulate exactly that and to load a dimension without real players?
-
View User Profile
-
Send Message
Posted Mar 22, 2015When starting my server i get this in my console: [VirtualPlayers] The maximum supported version is 1.8-R0.9-SNAPSHOT
My server is 1.8.3.
Is there an update in near future?
I havent tried your plugin before. Is there suport for permissions in the plugin?
Thank you!
-
View User Profile
-
Send Message
Posted Mar 22, 2015@ceagle2
Why do you want to keep certain chunks loaded ? (just curious) What plugins are you using ? Have you tried Citizens ?
-
View User Profile
-
Send Message
Posted Mar 21, 2015Since players are required to keep dimensions loaded (which also means, ie. overworld spawnchunks get unloaded once there are no more players in the overworld), can this plugin in any way be used to simulate a real player in a way that a dimension (and thus its spawnchunks) stays loaded without real players in it? My first few tests seem to say no, but maybe you have an idea there. :)
-
View User Profile
-
Send Message
Posted Mar 17, 2015Possibly link to the new source code? https://github.com/Europia79/VirtualPlayers
-
View User Profile
-
Send Message
Posted Dec 31, 2014Seems like /virtualplayers hidemessages still shows the messages in console, can this be fixed?
-
View User Profile
-
Send Message
Posted Dec 10, 2014@Europia79
Okay, I'm not in a giant rush as I can still test my plugin without this.
-
View User Profile
-
Send Message
Posted Dec 10, 2014@Bimmr
A VirtualPlayer needs a PlayerConnection to handle packets. eueln has a Pull Request on github for this issue.
I'll look into it when I get time.
-
View User Profile
-
Send Message
Posted Dec 10, 2014@Europia79
I'm just using the player.addPotionEffect(...), I'll check if the error still happens, but I am running a test server with Spigot 1.7.10, and not Spigot 1.8(In case that may mess it up).
Edit: Ya, it still happens... Although on the bright side it doesn't stop the plugin anymore lol http://dev.bukkit.org/paste/11131/
-
View User Profile
-
Send Message
Posted Dec 7, 2014@Bimmr
Sorry, i didn't get an email response (like usual) that you commented. I'll look into it.
What commands are you using to give potion effects ?
-
View User Profile
-
Send Message
Posted Dec 4, 2014One issue i remember from the old version was that the plugin didn't like it when the virtual players were given potion effects, would you be able to add support for that, if its not there already.
-
View User Profile
-
Send Message
Posted Dec 2, 2014@LaughNgamez
okay, i just uploaded an update for 1.8
it's VirtualPlayers2 version 1.6.1
-
View User Profile
-
Send Message
Posted Dec 2, 2014@LaughNgamez
VirtualPlayers is up to date.
https://github.com/Europia79/VirtualPlayers/issues/new
if you need to report a bug or request a new feature, just create a new ticket.
-
View User Profile
-
Send Message
Posted Nov 30, 2014Please keep updating this :) !
-
View User Profile
-
Send Message
Posted Sep 27, 2014Hello everyone, this is a console plugin used by Admins, Developers, and Testers...
There are no permissions for the VirtualPlayers plugin.