VirtualChest - Provide virtual chest GUIs for menus like ChestCommands (SpongeForge/SpongeVanilla 1.10.2, 1.11.2, and 1.12.2)

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

The example GUI:

The plugin uses sponge api 5.0.0, and additionly supports api 7.0.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.

There is a wiki for v0.4.0 or higher versions of VirtualChest.

The plugin now is not so stable because of the lack of testing. If a bug was found, you can make an issue or a pull request on GitHub.

Download the plugin on the Ore page or GitHub.
Get the source code on the GitHub (under LGPL 3.0).

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.

17 Likes

You can spread it to almost anywhere applicable to LGPL license without having to manually request for my agreement. However, there are two exceptions: mcbbs (a Minecraft forum in China, http://www.mcbbs.net/), and here.

The LGPL allows anyone to redistribute it anywhere. Period. If you make exceptions, you can’t call it the LGPL.

On the other hand, they still have to keep your copyright statement. So if someone does repost it somewhere where you’ve already posted it, you can tell. The forum moderators should address that. But the LGPL can’t, doesn’t, and won’t, by design.

1 Like

Thanks for your reminder. I have added an additional sentence to the post:

The only reason is that I have already posted the plugin there, and the repost is not welcomed by forums.

2 Likes

This looks really cool and would be extremely helpful!
I was wondering if you could add permissions to each item (not per chest, although don’t see documentation about permission nodes), lets say that Im using the GUI for something like teleports and if the person doesnt have the requirement for a certain teleport, I wouldn’t want them to use it or to display it.

Hmm better example would be trophies. Server has trophies, want it to display a trophy if the person has a certain permission, so on the config I put the following:

Position-1-1 {
    Item {
        Count = 1
        ItemType = "minecraft:obsidian"
        UnsafeDamage = 1
        DisplayName = "&c&lSuper Miner"
        ItemLore = [
            "&bYou have mined and collected 100 obsidian!"
        ]
    }
    KeepOpen = true
    Permission = virtualchest.item.superminer
}

So, people with the virtualchest.item.superminer permission node would see the Super Miner trophy in their chest.

Great plugin for creating chest menus! I will include it into my plugin integration package.
Please notify me when you update the plugin. Thanks.

太好了。
伟大的插件!:heart_eyes:

1 Like

Nice plugin :wink:
I really need this for my server

Finaly a chestcommand similiar plugin, nice job!

One of my favorite features of ChestCommands was to allow custom commands to open guis, I would love if that was a feature added to this plugin. I know about /virtualchest open Example but I personally think it would be cool if they could just use /(configurableoption) . Player operations as OP should be added because safety should be in the hands of the user.

2 Likes

Think it too, could be a nice feature to implement

Command aliases are avaliable now. You can try the new version (v0.2.4): https://github.com/ustc-zzzz/VirtualChest/releases/latest

1 Like

I want to replace the help command / help / menu help because I do not want the user to know too much from / help but when working with virtualchest.conf I get an error and do not use / help from the confirm.

[20:16:11] [Server thread/ERROR] [Sponge/sponge]: Could not pass FMLServerStartedEvent to Plugin{id=virtualchest, name=VirtualChest, version=0.2.4, description=A plugin providing virtual chests, authors=[ustc_zzzz], source=C:\Users\Administrator.DYQCT9GD7MIPFU0\Desktop\Server\kOy\Sponge-Mod\mods\VirtualChest-0.2.4.jar}
java.lang.RuntimeException: java.io.IOException: com.github.ustc_zzzz.virtualchest.command.VirtualChestCommandAliases$InvalidVirtualChestCommandAliasException: Command mapping has already exist for 'help'
	at com.google.common.base.Throwables.propagate(Throwables.java:160) ~[minecraft_server.1.10.2.jar:?]
	at com.github.ustc_zzzz.virtualchest.VirtualChestPlugin.onStartedServer(VirtualChestPlugin.java:226) ~[VirtualChestPlugin.class:?]
	at org.spongepowered.common.event.listener.GameStartedServerEventListener_VirtualChestPlugin_onStartedServer18.handle(Unknown Source) ~[?:?]
	at org.spongepowered.common.event.RegisteredListener.handle(RegisteredListener.java:95) ~[RegisteredListener.class:1.10.2-2254-5.2.0-BETA-2230]
	at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:313) [SpongeModEventManager.class:1.10.2-2254-5.2.0-BETA-2230]
	at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:342) [SpongeModEventManager.class:1.10.2-2254-5.2.0-BETA-2230]
	at org.spongepowered.mod.SpongeMod.onStateEvent(SpongeMod.java:234) [SpongeMod.class:1.10.2-2254-5.2.0-BETA-2230]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_92]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_92]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_92]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_92]
	at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) [minecraft_server.1.10.2.jar:?]
	at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) [minecraft_server.1.10.2.jar:?]
	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) [minecraft_server.1.10.2.jar:?]
	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) [minecraft_server.1.10.2.jar:?]
	at com.google.common.eventbus.EventBus.post(EventBus.java:275) [minecraft_server.1.10.2.jar:?]
	at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:243) [LoadController.class:?]
	at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:221) [LoadController.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_92]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_92]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_92]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_92]
	at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) [minecraft_server.1.10.2.jar:?]
	at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) [minecraft_server.1.10.2.jar:?]
	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) [minecraft_server.1.10.2.jar:?]
	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) [minecraft_server.1.10.2.jar:?]
	at com.google.common.eventbus.EventBus.post(EventBus.java:275) [minecraft_server.1.10.2.jar:?]
	at net.minecraftforge.fml.common.LoadController.redirect$onPost$zzb000(LoadController.java:552) [LoadController.class:?]
	at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:145) [LoadController.class:?]
	at net.minecraftforge.fml.common.Loader.serverStarted(Loader.java:868) [Loader.class:?]
	at net.minecraftforge.fml.common.FMLCommonHandler.handleServerStarted(FMLCommonHandler.java:297) [FMLCommonHandler.class:?]
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:433) [MinecraftServer.class:?]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_92]
Caused by: java.io.IOException: com.github.ustc_zzzz.virtualchest.command.VirtualChestCommandAliases$InvalidVirtualChestCommandAliasException: Command mapping has already exist for 'help'
	at com.github.ustc_zzzz.virtualchest.command.VirtualChestCommandAliases.loadConfig(VirtualChestCommandAliases.java:107) ~[VirtualChestCommandAliases.class:?]
	at com.github.ustc_zzzz.virtualchest.VirtualChestPlugin.loadConfig(VirtualChestPlugin.java:115) ~[VirtualChestPlugin.class:?]
	at com.github.ustc_zzzz.virtualchest.VirtualChestPlugin.onStartedServer(VirtualChestPlugin.java:216) ~[VirtualChestPlugin.class:?]
	... 31 more
Caused by: com.github.ustc_zzzz.virtualchest.command.VirtualChestCommandAliases$InvalidVirtualChestCommandAliasException: Command mapping has already exist for 'help'
	at com.github.ustc_zzzz.virtualchest.command.VirtualChestCommandAliases.insertMapping(VirtualChestCommandAliases.java:60) ~[VirtualChestCommandAliases.class:?]
	at com.github.ustc_zzzz.virtualchest.command.VirtualChestCommandAliases.loadConfig(VirtualChestCommandAliases.java:102) ~[VirtualChestCommandAliases.class:?]
	at com.github.ustc_zzzz.virtualchest.VirtualChestPlugin.loadConfig(VirtualChestPlugin.java:115) ~[VirtualChestPlugin.class:?]
	at com.github.ustc_zzzz.virtualchest.VirtualChestPlugin.onStartedServer(VirtualChestPlugin.java:216) ~[VirtualChestPlugin.class:?]
	... 31 more

@LC_Games Fixed. Please update to the latest version (0.2.5 now).

Player operations as OP should be added because safety should be in the hands of the user.

There will be a trade-off between safety and convenience: ignored permissions.
Player operations will be processed with a set of ignored permissions configured in the chest menu .conf files. Related features are under development, please wait patiently.

1 Like

Heya. Love the plugin. Great work. However, I’ve found a bug where if you’re quick enough to click the item in the gui and drag it to your inventory, you can keep it.

@Tyceus I have not successfully reproduced this bug. Is there a more detailed description of the way to trigger it? Maybe we should wait for more reports about this bug.:disappointed:

@tridaak @Shockey New features about required permissions and ignored permissions are available in the latest version (after v0.3.0) now. :grin:
You can find usage in the examples. Remove the old example files and run /virtualchest reload extract-examples, and new example files will be extracted.

2 Likes

Ah really? That’s interesting. I’ll try reproduce it when I get home and post a gif to you. Thanks for the response!

Are you doing it in survival or creative? cuz this is a bug in creative afaik.

Thank you, works great!
Was wondering if there was any way to make an item translucent (transparent) or have a gray overlay? For items that the person can’t yet get, but could potentially if they were to unlock the item.