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


#82

I will get back to you after work with the stack trace.
Going to try on vanilla server first.


#83

@zzzz
Here is my log; https://drive.google.com/file/d/1dHXrFWGYR56w8CaIb9h4QRwQWT3YUgew/view?usp=sharing
the only plugins installed are Placeholderapi v4.5.1 and virtualchest v1.0.0-rc1


#84

[21:55:55] [Server thread/ERROR] [Sponge]: Could not pass GamePreInitializationEvent$Impl to Plugin{id=placeholderapi, name=PlaceholderAPI, version=4.5.1, description=An API for all of your placeholders., authors=[rojo8399, Wundero], source=C:\Users\Mimir\Desktop\Test\mods\plugins\PlaceholderAPI-4.5.1.jar} ninja.leaping.configurate.objectmapping.ObjectMappingException: No zero-arg constructor is available for class class me.rojo8399.placeholderapi.impl.configs.Messages$Message but is required to construct new instances!

@hellbringer616 The exception is caused by PlaceholderAPI first and then VirtualChest could not acquire the PlaceholderService instance, so the problem seems to be caused by PlaceholderAPI.


#85

Downgraded to PlaceholderAPI v4.4 and it appears to no longer throw errors!
Thanks!


#86

Try this build instead: https://github.com/randombyte-developer/PlaceholderAPI/releases/tag/v4.5.1

I discovered that the official build is somehow faulty, I just compiled the official source myself and it works for me.


#87

Sweet, i’ll try giving it an update!

@zzzz
is there a way to make commands cost multiple items? I am trying to build a crafting menu however this code is invalid:

Slot1 {
Item {
Count = 1
ItemType = “conquest:steel_ingot”
UnsafeDamage = 0
DisplayName = “Smelt &e&lSteel”
ItemLore = [
“Cost 2 &e&lIron Ore”
“Cost 4 &e&lCoal”
]
}
PrimaryAction [{
Command = “cost-item: 2; console: give %player_name% conquest:steel_ingot 1”
HandheldItem {
SearchInventory = true
ItemType = “minecraft:iron_ore”
UnsafeDamage = 0
Count = 2
}
KeepInventoryOpen = true
}, {
Command = “cost-item: 4”
HandheldItem {
SearchInventory = true
ItemType = “minecraft:coal”
UnsafeDamage = 0
Count = 4
}
KeepInventoryOpen = true
}]
}

even if i remove the [ ] i still get an error


#88

I found that using

PrimaryAction = [{
Command = “cost-item: 2; console: give %player_name% conquest:steel_ingot 1”
HandheldItem {
SearchInventory = true
ItemType = “minecraft:iron_ore”
UnsafeDamage = 0
Count = 2
}, {
Command = “cost-item: 4”
HandheldItem {
SearchInventory = true
ItemType = “minecraft:coal”
UnsafeDamage = 0
Count = 4
}]

stopped the error and allowed the code to process. but it only took the first item…
Is there any plan to add multiple item costs?


#89

How do you get multiple currencies? It says on may 17 update you got rid of currency_name and replaced with requirements. But it doesnt tell how to do it now with requirements.

Figured out how to use multiple currencies.

Use
cost: totaleconomy:CURRENCYNAME:10; &
Requirements = “%economy_balance_CURRENCYNAME% >= XX”


#91

@Turner

The Requirements is based on replacing placeholder to its values:
https://github.com/ustc-zzzz/VirtualChest/wiki/3-Slots-And-Requirements#requirements

Just use /papi parse to check if a placeholder is available and retrieve its value:
https://github.com/rojo8399/PlaceholderAPI/wiki/Commands-and-Permissions


#92

how do i set more than one requirement because im trying to have the money requirement and the permission requirement when i have it set like this https://gyazo.com/b9476e7d96c44e3434bf9c42f7fcd747 it will put the permission requirement but not the money requirement so players could get it for free


#93

can i set an item as a requirement so they cannot click the GUI item without having both items of correct quantity in their inventory?
This would be in addition to item cost; so it would cost 4 coal to use, but you have to have 2 iron otherwise it won’t run as well.


#94

@MobKiller The Requirements is based on JavaScript. So just use && for concatenating requirements:

Requirements = "%economy_balance% >= 1700000 && player.hasPermission('commonplusplus.use')"

#95

Thanks :smiley: