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


Read the wiki…


Can I view items through the database?


(口…口) 你们呐,不要总是想搞个大新闻!


Напишите как продавать вещи? И можно ли команду give заменить на что либо другое (чтобы в чате у игроков не было: “Console: Give [player] fo [item]”), и можно ли вообще подобные сообщения (или команды) как нибудь скрыть от игроков ?

Translate from Yandex.Translate:

Write how to sell things? And is it possible to replace the give command with something else (so that players do not have “Console: Give [player] fo [item]” in the chat), and is it possible to hide such messages (or commands) from the players somehow ?


Вот пример одной из кнопок продаж.
А что бы игроки не видели кто и что купил, не надо выдавать им OP.


Я тестировал на себе и я не получал op. Все игроки держутся на luckeperm.


Значит выдал какое-то право, которое позволяет видеть эти сообщения. Советую держать группы в YAML конфигах для удобства, ошибки быстрее замечать будешь.


How to add a requirement to a command?

I am trying to check if the user has enough money and if they do then the primary action will be one command if they don’t it’ll be another. So far this is what I have but there doesn’t seem to be a place for the requirement.

Slot0 {
Item {
  ItemType = "minecraft:record_mellohi"
  DisplayName = "&9&lLure &7&l[Tier 1]"
  Count = 1
  UnsafeDamage = 0
  ItemLore = [
    "&7Click to purchase a &lTier 1",
    "&7     Lure for &a&n$50000!"
    "&eMultiplier: &6x2"
    "&eTime Length: &620 Minutes"
    "&7&l** &cLures attract pokemon around you only &7&l**"
PrimaryAction = [{
  KeepInventoryOpen = true   
}, {
  Command = "cost: 50000; console: wholetthedogsout giveitem lure %player_name% 2; bigtitle: &a&l? PURCHASE SUCCESS ?; subtitle: &c&l-$50000"
  KeepInventoryOpen = true   
  Requirements = "%economy_balance% >= 50000"



IIUC you need like an else branch, if the requirement isn’t met. CommandUtils allows you to do something like that.

If checks and has money condition.

cu execute if "*cu has money %player_name% 50000" "*say The player has enough money!"
cu execute if not "*cu has money %player_name% 50000" "*say The player doesn't have enough money!"

I don’t know if VirtualChest can execute multiple commands for the primary action. If not, use some kind of alias/command plugin, ofc CommandUtils can do that for you: Aliases.


Ah yeah that would probably work. Also just was told I can do this with VChest’s requirement system but will need to switch on the item and the command not just the command.


The Requirements option should be the child of a Slot, so it should be:

Slot0 = [{
  Requirements = "%economy_balance% >= 50000"
  # blablabla
}, {
  # blablabla


Is there a way to make an item cost multiple kinds of items?
Like 2 iron and 4 coal?


Okay, so using cmdbuilder i have a work around for item cost.

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?