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
trying to run /dc in command blocks returns "you need to be op to run this command". :o
This plugin is exactly what I was looking for to be able to run player-only commands at a distance from the player. I was able to teleport a virtualplayer to a coordinate and have it run a player-only command for the player to observe what is happening.
Great plugin! Thank you so much!
Works well on Spigot, and very good to test my plugins without having to start Minecraft!
Hello Kalashnikov79,
sadly, the 1.13 link is down. And are there plans for a 1.14 version?
In reply to MattiBorchers:
The repository it used to be hosted on is currently down. Please join the BattlePlugins Discord if you wish to recieve a jar (latest version supports both 1.13 and 1.14): https://discord.gg/tMVPVJf.
Alternatively, you can compile it yourself here:
https://github.com/BattlePlugins/VirtualPlayers
(Just know, these builds have not been approved by the BukkitDev staff. Use them at your own risk.)
Here's a quick update for Minecraft 1.13:
Still have to do some testing before I release it on BukkitDev.
So lemme know if there are any issues.
Updated for both 1.11 and 1.12
@Europia79 Have you totally abandoned the plugin or you'll continue it? I think this is great project, and there are no other plugins like this!
In reply to Forge_User_54865192:
In reply to overdraft015:
In reply to Forge_User_54865192:
compiler errors. Then use maven to build.
plase not fuction for 1.9.4 all error no list user in the list and online not found? plase update thanks xD
Great plugin!
Do the virtual players show up in the player list? Also are the counted as players in the online players in the servers lists? (I mean if a have 5 virtual players an zero real players, will the number be shown as 5/100, 5 players of a total of 100?)
Thanks
In reply to resoluciones:
In reply to Europia79:
I'm planning to create a skript script that uses this to rebuild a minigame arena.
Hey!
Plugin is great but it does not work on version 1.9. Could you update it?
I really care. Thanks.
Hi is it possible to take control of the virtual player and have him place a sign and edit it ? I can place any block but when i want to make the vp place a sign, the sign doesn't appear
thanks
@LaughNgamez
oh... thanks for reminding me man !!! i made a section called WorldEdit Compatibility for all the information (easy to find than a buried comment).
@Unpluggeddk
The easiest solution is to delete 2 lines of code from WorldEdit... The next easiest solution is for VirtualPlayers to provide an API that WorldEdit can use. However, modifying only the VirtualPlayers codebase to be compatible with WorldEdit is not an easy task. You have to inject the VirtualPlayer into the server's playerList... that's the easy part. Then you have to modify the entire logic of the VirtualPlayers plugin because since they're inside the server's playerList, they will be consider REAL, not virtual. This step is intermediate difficulty... not too hard... just time consuming. The hard part is giving the VirtualPlayer a PlayerConnection object in order to fix all the errors that you'll get.
@Unpluggeddk
You have to use old World Edit or a build posted in the comments of this post.
@Europia79
Np....
Btw mate, did you find a solution for using virtual players with worldedit?
like: