VirtualChest - Provide virtual chest GUIs for menus like ChestCommands

This is a discussion topic for the Ore project, VirtualChest. View the full project on Ore for downloads and more information.


VirtualChest

VirtualChest is a sponge plugin which provides virtual chest GUIs for menus like ChestCommands.

Download Link (GitHub Releases) | Download Link (Ore) | Wiki | Ore | GitHub | Discord


An example GUI:

The development of the plugin is based on sponge api 7.1.0, and additionally considers the support of api 5.2.0, so it is expected to work normally on spongevanilla/spongeforge 1.10.2, 1.11.2, and 1.12.2 servers.

There are some example GUI configurations which you can copy and edit for your custom GUI menus, and they will be extracted when the plugin is loaded.


VirtualChest uses bStats to anonymously collect usage data, and it can be disabled by editing config/bstats/config.conf. All the collected data can be found here: https://bstats.org/plugin/sponge/VirtualChest

This plugin is licensed under LGPL 3.0 license, and you can spread it to almost anywhere applicable to LGPL license without having to manually request for my agreement. There are only two places which need to be noticed: mcbbs (a Minecraft forum in China, http://www.mcbbs.net/), and here. The only reason is that I have already posted the plugin there, and the repost is not welcomed by forums.

2 Likes

A new version has been released for VirtualChest, it is available for download here.


There will be a warning instead of an error when the specified command alias has a conflict, and it could be avoided through the instructions of the warning information to configure.

1 Like

A new version has been released for VirtualChest, it is available for download here.


  • Permissions of the player can be involved in controlling the item of specific slots of the GUIs (two options are available and covered in the example menu configurations: RequiredPermissions and RejectedPermissions).
  • A list of available items can be specified for a slot in a specific location in the configuration, and the plugin will check and use the first available item in order. If no items are available, the corresponding slot will be empty.
  • Specified permissions of the player can be ignored through configuration when commands are executed by clicking on the GUI (The related configuration option: IgnoredPermissions, which is also covered in the example menu configurations).
1 Like

A new version has been released for VirtualChest, it is available for download here.


  • You can specify the subtitle of the title message sent to player by the subtitle prefix. For example:
    bigtitle: I'm title; subtitle: and I'm the subtitle
  • Some part of the example .conf files are rewritten by using advanced features of HOCON. See the HOCON Spec for more information: https://github.com/typesafehub/config/blob/master/HOCON.md
  • Fix a bug of unrecognized items when running a higher version of sponge server

A new version has been released for VirtualChest, it is available for download here.


  • A new prefix called “connect” has been added. You can use it to teleport a player to another server when you are using BungeeCord

A new version has been released for VirtualChest, it is available for download here.


  • Fix a bug occurred when the player executes the action with the connect prefix
  • Fix a bug occurred when putting item stack to an empty slot of the virtual chest GUI
1 Like

A new version has been released for VirtualChest, it is available for download here.


  • Add tellraw action prefix, in order to send the json raw text to the player
  • Add PlaceholderAPI support, and the original placeholders provided by VirtualChest itself will be removed since the v0.4.0 version
  • Add UpdateIntervalTick field, and this field decides how long does the GUI refresh. The default value is 0, which means no refresh
2 Likes

A new version has been released for VirtualChest, it is available for download here.


  • Fix a bug which may occur if the language of the target server is not English
1 Like

Hey, I am having some issues, my menu just will not load.

error: [10:03:39] [Server thread/INFO] [virtualchest]: Start loading config ...[10:03 - Pastebin.com

gen1.conf: virtualchest { TextTitle = "&4&lChoose a Starter" Rows = 2 Positi - Pastebin.com

virtualchest.conf: virtualchest { check-update=true # Every command alias is mapped to th - Pastebin.com

A new version has been released for VirtualChest, it is available for download here.


  • Add RequiredBalances option, which should be composed of a list of strings. The option is also added into the example configuration files. There are two string formats available:
    • currency_name:7 means that the player should possess at lease 7 units of the given currency, currency_name
    • 7 does not specify the currency type, so it means that the player should possess at lease 7 units of the default currency. For example, if the server uses TotalEconomy plugin with its default configuration, the string 7 is equivaient to totaleconomy:dollar:7
  • Because the RequiredBalances option does not actually take the player’s money, so a new action prefix, cost, could be used in the configuration files. For example, cost: 7 and cost: currency_name:7
3 Likes

Hi,

I asked to the developer of virtualTool but he redirected me on your plugin. I tried it and it’s awesome for virtualGui but I would like a real virtual chest per player. Do you think the following is still in the spirit of VirtualChest ?

I would love to populate a virtualchest with a command. One has a /vc empty and when he achieves quest or find a hidden sign or anything else, a command is run and it fills the virtualchest.

Maybe it would look like :

/vc fill <player_name> [minecraft:dirt 32;minecraft:stone 64;;;;;;;;minecraft:diamond_sword 1 0 {ench:[{id:16,lvl:5}]};minecraft:axe 1;;]
Where [] is the chest and every slot is separated by a semicolon.
If missing semicolons then it should be an empty slots. In case of too much semicolons then it’s not valid command.

Also a monitoring command like :
/vc open <player_name> -t
That would open the named chest or only return a text line with the content of the chest using optionnal -t option.

To sumup, there would be configured virtualchest as shown in your example as well as per player chest, openable with a permission and with a commande. We could also fill a player virtual chest with a filling command.

That might be too much or should be an other plugin :sweat_smile:

A new version has been released for VirtualChest, it is available for download here.


  • Log more information when VirtualChest find that there is something wrong with your GUI configuration
  • Fix a bug occurred when the BungeeCord channel has already been registered before VirtualChest

A new version has been released for VirtualChest, it is available for download here.


  • Fix a bug occurred when the economy service does not provide the default currency
  • Support placeholders more widely. For example, in the item nbt tag (UnsafeData)
  • Add support for RequiredItem, and when the player tried to click the item in the chest GUI, VirtualChest will check the item held by mouse. Two options are added: PrimaryRequiredItem and SecondaryRequiredItem. See the example conf files for more detail
  • Because the RequiredItem option does not actually take the player’s items held by mouse, a new action prefix called cost-item could be used in the configuration files now. However, cost-item could only take away items held by mouse, which are also those used for clicking in the GUI. See the example conf files for more detail
  • Support negative numbers for cost action (for deposit)

add the link to the place holder api pls

Great work, I look forward to trying it out!

Hello,

I cant use the %player_name% tag and if I enable placeholders , none of my GUI’s will load.

Also i cant get the PrimaryRequiredItem to work with paying an item from hand.

Love the plugin so far though !

Hello , I’m from China. I hope you can authorize me to move this plug-in to “www.zuimc.com” Because it’s a great work! Thank you.

VC does not support PlaceholderAPI 4.x now. Please use the 3.x api instead before I support the 4.x api.

Well, as is mentioned in the release note, PrimaryRequiredItem only checks if the held item stack meets the requirements, but it does not actually take the itemstack out. You should use the cost-item action to do this. For example:

{
    Item {
        Count = 1
        UnsafeDamage = 0
        ItemType = "minecraft:diamond"
        DisplayName = "&lDiamond seller (2 diamonds => $500)"
    }
    KeepOpen = true
    PrimaryAction = "cost-item: 2; cost: -500"
    PrimaryRequiredItem {
        Count = 2
        UnsafeDamage = 0
        ItemType = "minecraft:diamond"
    }
}

Sure. It’s under the LGPL license.