VirtualChest - A sponge plugin providing virtual chest GUIs for menus like ChestCommands


#62

I know it says placeholderAPI is recommended, but the examples that are currently up use it and cause warnings.

[00:03:34] [Server thread/WARN] [virtualchest]: Cannot apply field 'RepresentedPlayer' to the item, ignore it.
org.spongepowered.api.data.persistence.InvalidDataException: ninja.leaping.configurate.objectmapping.ObjectMappingException: Invalid UUID string: %player_uuid%
        at com.github.ustc_zzzz.virtualchest.inventory.item.VirtualChestItemStackSerializer.deserializeForKeys(VirtualChestItemStackSerializer.java:104) ~[VirtualChestItemStackSerializer.class:?]
        at com.github.ustc_zzzz.virtualchest.inventory.item.VirtualChestItemStackSerializer.deserializeItemFrom(VirtualChestItemStackSerializer.java:185) ~[VirtualChestItemStackSerializer.class:?]
        at com.github.ustc_zzzz.virtualchest.inventory.item.VirtualChestItemStackSerializer.apply(VirtualChestItemStackSerializer.java:151) ~[VirtualChestItemStackSerializer.class:?]
        at com.github.ustc_zzzz.virtualchest.inventory.item.VirtualChestItem.fillInventory(VirtualChestItem.java:135) ~[VirtualChestItem.class:?]
        at com.github.ustc_zzzz.virtualchest.inventory.VirtualChestInventory.setItemInInventory(VirtualChestInventory.java:150) ~[VirtualChestInventory.class:?]
        at com.github.ustc_zzzz.virtualchest.inventory.VirtualChestInventory.updateInventory(VirtualChestInventory.java:138) ~[VirtualChestInventory.class:?]
        at com.github.ustc_zzzz.virtualchest.inventory.VirtualChestInventory.access$400(VirtualChestInventory.java:45) ~[VirtualChestInventory.class:?]
        at com.github.ustc_zzzz.virtualchest.inventory.VirtualChestInventory$EventListener.lambda$fireOpenEvent$0(VirtualChestInventory.java:284) ~[VirtualChestInventory$EventListener.class:?]
        at org.spongepowered.common.scheduler.SchedulerBase.lambda$startTask$0(SchedulerBase.java:186) ~[SchedulerBase.class:1.12.2-2611-7.1.0-BETA-3002]
        at org.spongepowered.common.scheduler.SyncScheduler.executeTaskRunnable(SyncScheduler.java:70) ~[SyncScheduler.class:1.12.2-2611-7.1.0-BETA-3002]
        at org.spongepowered.common.scheduler.SchedulerBase.startTask(SchedulerBase.java:179) ~[SchedulerBase.class:1.12.2-2611-7.1.0-BETA-3002]
        at org.spongepowered.common.scheduler.SchedulerBase.processTask(SchedulerBase.java:165) ~[SchedulerBase.class:1.12.2-2611-7.1.0-BETA-3002]
        at java.util.concurrent.ConcurrentHashMap$ValuesView.forEach(ConcurrentHashMap.java:4707) [?:1.8.0_151]
        at org.spongepowered.common.scheduler.SchedulerBase.runTick(SchedulerBase.java:108) [SchedulerBase.class:1.12.2-2611-7.1.0-BETA-3002]
        at org.spongepowered.common.scheduler.SyncScheduler.tick(SyncScheduler.java:44) [SyncScheduler.class:1.12.2-2611-7.1.0-BETA-3002]
        at org.spongepowered.common.scheduler.SpongeScheduler.tickSyncScheduler(SpongeScheduler.java:185) [SpongeScheduler.class:1.12.2-2611-7.1.0-BETA-3002]
        at org.spongepowered.mod.SpongeMod.onTick(SpongeMod.java:278) [SpongeMod.class:1.12.2-2611-7.1.0-BETA-3002]
        at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_24_SpongeMod_onTick_ServerTickEvent.invoke(.dynamic) [?:?]
        at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) [ASMEventHandler.class:?]
        at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:651) [EventBus.class:?]
        at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:589) [EventBus.class:?]
        at net.minecraftforge.fml.common.FMLCommonHandler.onPreServerTick(FMLCommonHandler.java:278) [FMLCommonHandler.class:?]
        at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:655) [MinecraftServer.class:?]
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:524) [MinecraftServer.class:?]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
Caused by: ninja.leaping.configurate.objectmapping.ObjectMappingException: Invalid UUID string: %player_uuid%
        at com.github.ustc_zzzz.virtualchest.inventory.item.VirtualChestItemStackSerializer$GameProfileSerializer.getUUIDByString(VirtualChestItemStackSerializer.java:311) ~[VirtualChestItemStackSerializer$GameProfileSerializer.class:?]
        at com.github.ustc_zzzz.virtualchest.inventory.item.VirtualChestItemStackSerializer$GameProfileSerializer.deserialize(VirtualChestItemStackSerializer.java:323) ~[VirtualChestItemStackSerializer$GameProfileSerializer.class:?]
        at com.github.ustc_zzzz.virtualchest.inventory.item.VirtualChestItemStackSerializer$GameProfileSerializer.deserialize(VirtualChestItemStackSerializer.java:269) ~[VirtualChestItemStackSerializer$GameProfileSerializer.class:?]
        at ninja.leaping.configurate.SimpleConfigurationNode.getValue(SimpleConfigurationNode.java:226) ~[spongeforge-1.12.2-2611-7.1.0-BETA-3002.jar:1.12.2-2611-7.1.0-BETA-3002]
        at ninja.leaping.configurate.ConfigurationNode.getValue(ConfigurationNode.java:356) ~[spongeforge-1.12.2-2611-7.1.0-BETA-3002.jar:1.12.2-2611-7.1.0-BETA-3002]
        at com.github.ustc_zzzz.virtualchest.inventory.item.VirtualChestItemStackSerializer.deserializeForKeys(VirtualChestItemStackSerializer.java:99) ~[VirtualChestItemStackSerializer.class:?]
        ... 24 more

Think should make some examples without placeholder API, cause or else new server owners could freak at the warning spam not knowing what to make of it.


#63

Wondering if its possible to open a menu with a command like /warps where it would open a menu with warps instead of trigger items


#64

Yep, this is my /worlds command for my server, can do something similar for warps.


#65

@tridaak Can you please show me a screenshot of how you managed to do that please


#66

https://paste.md-5.net/degiqedose.cpp
So that’s the config file, saved as worlds.conf

Then on virtualchest.conf I have

command-aliases {
  worlds=worlds
}

And lastly on spoge’s global.conf have

    aliases {
        worlds=virtualchest
    }

I did the same thing with https://ore.spongepowered.org/HDR/Player-Glow
Here’s the result

That’s the great thing about this plugin, you’re able to make item GUIs for plugins that don’t have them and often gives you better control over options than the regular plugin. I can adjust it so only certain people see certain items, adjust costs, cooldowns, run various commands at once, etc. And the great thing is that it doesn’t take a whole lot of work; players appreciate that extra bit of effort that owners put in and makes your server stand out.


#67
Slot10 = [{
    Item {
        Count = 1
        ItemType = "pixelmon:pixelmon_sprite"
        UnsafeDamage = 0
        DisplayName = "&b%trainer_team_1% &8&l: &eLvl %trainer_team_1_level%"
        ItemLore = [
			"&7Slot ID: &e1"
			"&7Owner: &e%player%"
			""
			"&7Ability: &e%trainer_team_1_ability%"
			"&7Nature: &e%trainer_team_1_nature%"
			""
			"&7Holding: &e%trainer_team_1_helditem%"
			"&7Gender: &e%trainer_team_1_gender%"
			"&7Size: &e%trainer_team_1_growth%"
        ]
    UnsafeData {
        SpriteName = "%trainer_team_1_texturelocation%"
    }
    }
    KeepOpen = false
    PrimaryAction {
        Command = "console: virtualchest open wtslot1 %player%"
        KeepInventoryOpen = true
    }
    Requirements = "%trainer_team_1% != ''"
}, {
    Item {
        Count = 1
        ItemType = "minecraft:barrier"
        UnsafeDamage = 0
        DisplayName = "&cNo Pokemon in Party Slot: &71"
    }
}]

Here is an example of how I done it for Wondertrade GUI. Hope it helps.


#68

Will this ever get a way to make your gui’s in-game instead of in the config?


#69

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


  • Fix a bug caused by connecting to the database in the main thread
  • Add filtering (blacklist mode or whitelist mode) for recording actions

#70

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


  • Make the update warning messages look better (please refer to 5133379)
  • Add the first version of VirtualChestAPI, which could be obtained by maven repository or direct download (please refer to the wiki)
  • Forcely depend on PlaceholderAPI v4.0+, so v1.0.0-rc-1 and future versions will not support servers without PlaceholderAPI or with PlaceholderAPI v3.x only

#71

https://pastebin.com/gzvmgRCb

any help with this crash


#72

AcceptableActionIntervalTick = 120

this setting doesnt seem to be preventing spam clicking. It still executes but the commands cant keep up with the spam clicking so items arent being given. I need a way to prevent spam clicking due to this.


#73

How do i make 2 commands in one slot


#74

How would I add a link i.e. to my shop (website)?


#75

Also how do i use commands with other plugins. For example I want to use /spawn or /warp [somelocation]

I have tried:

console: nucleus:spawn
console: nucleus spawn
console: nucleus.spawn
console: spawn

I am not getting anything to work. I am reading through wiki but have not found solution.

Great plugin by the way. I was using BossShop and nice to have a superior equivalent.


#76

I figured out the warp - spawn can only be ran by the player not the console. So instead I set up a warp and used.

“console: warp -f %player_name% spawn”
^^
console, commands, -f (force), [player] [warp]


#77

Command: "one; two; three"


#78

I do not quite understand what you mean. VirtualChest will firstly check the requirements and then execute the commands. Which part that “still executes” do you refer to?


#79

I cannot find the reason according to the information provided until now. However, there is an issue which provides a crash report which looks similar. You can keep an eye on this issue to know the problem solving progress .


#80

Having a crashing issue on start up, VirtualChest throws a on of java exceptions on load and does not function on the server.

using the latest 1.0.0-RC1 of VirtualChest
Sponge Forge v1.12.2-2705-7.1.0-BETA-3368 (i need to update)
using PlaceholderAPI v4.5.1

Is anyone else having issues like this?


#81

@hellbringer616 Is there any more detailed information about this exception?