Many of you have most likely played a server that hosts many minigames, such as Mineplex, Hypixel and The Hive. You may have not think about it, but when you click on the "Games" menu a Gui pops up, showing up the selection of games the server offers. This got me thinking: "Where's the chest?" The list of games show a "Large Chest" gui, but where is it? The answer is: There's no chest, it's just a GUI window that temporary pops up for your selection of the game and this is quite well known to many people who play these servers.
So I was wondering if such thing is possible to implement!
Now the first command will show the gui of the block at the location specified, if no block is found, the command fails. The player(s) can interact with the gui just like if the block was right in front of him/her.
Example:
I placed a hopper at 99 128 -165 and ran the command:
/gui @r 99 128 -165
This makes it so that the player will have the gui open the hopper at 99 128 -165 showing what contents it has. Items placed in here will be saved just like if the player was next to the hopper interacting with it.
SECOND COMMAND
The second command shows a gui with the blockdata of that very gui block. example:
This will force a gui to open a large chest inventory showing 9 sticks in the top left most slot.
If no {blockdata} is specified, it shows an empty gui.
QUESTIONS AND OTHER BITS
Now you may be having some questons:
"What if the player puts his items inside the chest?"
That's the power of the first command, the player(s) can put items inside the chest and have them for later, but if the second command is used (unless it's an enderchest!) the items WILL be lost since there's no block for them to go, the first command is used to prevent lost by having them stored inside a block/container.
"Ok then, what If I had a another Gui open?"
That's what the 'force|delay' tags are for, this makes it so if it's set to 'force' it shows the gui, interrupting what the last gui was (dropping the item in your cursor if you picked one up). Having it set to 'delay' will wait until the player closes the current gui, and afterwards opening the one specified by the command.
Such as having your inventory open when the command was executed, if it was set to delay, will open the following gui after you close your inventory.
"What gui's are used?"
I'll try to list all the ones that are in the game, note this only works for the /gui selector gui force|delay {blockdata} command.
large_Chest (trapped chests share the same gui as regular chests)
small_Chest
hopper
furnace
dispenser
dropper
anvil
brewing_Stand
crafting
ender_Chest command_Block (Quite redundant, not useful since it requires a block)
enchanting
book
player
"Wait, 'player' is listed?"
Yes, this allows the person to open the inventory of another player! This makes it so that admins can view what the player has, this can deter griefers. By default, the player cannot interact with the inventory, The command is set like so:
/gui @p Notch
This shows the inventory of Notch, if player isn't online, command fails.
+++++++
EDIT:
the 'interaction' tag is here to make it so that the player can interact with the gui/inventory of it.
If set to 'full', they can use it like normal.
If set to 'remove', they can only take items out of the gui and cannot place any in it.
If set to 'insert', they can only put item into the gui and cannot take it back out.
if set to 'none', they cannot place nor take any item out of the gui. This can be useful to show a message or recipe without the player interacting with it.
+++++++ potential uses:
This command would be great to mapmakers, it can allow ones to store items in a safe or even access an enderchest anywhere!
Since 'blockdata' is used you can make a gui open for a map or book to have them take it out, without having to waste space for a chest!
Or have the admins of a server check the inventories of players to deter troublemakers
Force a book gui to open to have players read a book of rules without having to get one!
Or have a click event set to items inside the gui to have a /trigger command when they take the item(s) out! Great for minigame servers!
Chest GUIs, and forcing a GUI onto their screen is going to be awesome for mapmakers. If this ever comes out, I can finally make a backpack, without lots of work.
Many of you have most likely played a server that hosts many minigames, such as Mineplex, Hypixel and The Hive. You may have not think about it, but when you click on the "Games" menu a Gui pops up, showing up the selection of games the server offers. This got me thinking: "Where's the chest?" The list of games show a "Large Chest" gui, but where is it? The answer is: There's no chest, it's just a GUI window that temporary pops up for your selection of the game and this is quite well known to many people who play these servers.
So I was wondering if such thing is possible to implement!
Here's the command, sorted into two formats.
/gui selector x y z interaction
/gui selector gui force/delay {blockdata} interaction
FIRST COMMAND
Now the first command will show the gui of the block at the location specified, if no block is found, the command fails. The player(s) can interact with the gui just like if the block was right in front of him/her.
Example:
I placed a hopper at 99 128 -165 and ran the command:
/gui @r 99 128 -165
This makes it so that the player will have the gui open the hopper at 99 128 -165 showing what contents it has. Items placed in here will be saved just like if the player was next to the hopper interacting with it.
SECOND COMMAND
The second command shows a gui with the blockdata of that very gui block. example:
/gui @p large_Chest delay {Items:{slot0:minecraft:stick,count:9,damage:0}}
This will force a gui to open a large chest inventory showing 9 sticks in the top left most slot.
If no {blockdata} is specified, it shows an empty gui.
QUESTIONS AND OTHER BITS
Now you may be having some questons:
"What if the player puts his items inside the chest?"
That's the power of the first command, the player(s) can put items inside the chest and have them for later, but if the second command is used (unless it's an enderchest!) the items WILL be lost since there's no block for them to go, the first command is used to prevent lost by having them stored inside a block/container.
"Ok then, what If I had a another Gui open?"
That's what the 'force|delay' tags are for, this makes it so if it's set to 'force' it shows the gui, interrupting what the last gui was (dropping the item in your cursor if you picked one up). Having it set to 'delay' will wait until the player closes the current gui, and afterwards opening the one specified by the command.
Such as having your inventory open when the command was executed, if it was set to delay, will open the following gui after you close your inventory.
"What gui's are used?"
I'll try to list all the ones that are in the game, note this only works for the /gui selector gui force|delay {blockdata} command.
large_Chest (trapped chests share the same gui as regular chests)
small_Chest
hopper
furnace
dispenser
dropper
anvil
brewing_Stand
crafting
ender_Chest
command_Block(Quite redundant, not useful since it requires a block)enchanting
book
player
"Wait, 'player' is listed?"
Yes, this allows the person to open the inventory of another player! This makes it so that admins can view what the player has, this can deter griefers. By default, the player cannot interact with the inventory, The command is set like so:
/gui @p Notch
This shows the inventory of Notch, if player isn't online, command fails.
+++++++
EDIT:
the 'interaction' tag is here to make it so that the player can interact with the gui/inventory of it.
If set to 'full', they can use it like normal.
If set to 'remove', they can only take items out of the gui and cannot place any in it.
If set to 'insert', they can only put item into the gui and cannot take it back out.
if set to 'none', they cannot place nor take any item out of the gui. This can be useful to show a message or recipe without the player interacting with it.
+++++++
potential uses:
This command would be great to mapmakers, it can allow ones to store items in a safe or even access an enderchest anywhere!
Since 'blockdata' is used you can make a gui open for a map or book to have them take it out, without having to waste space for a chest!
Or have the admins of a server check the inventories of players to deter troublemakers
Force a book gui to open to have players read a book of rules without having to get one!
Or have a click event set to items inside the gui to have a /trigger command when they take the item(s) out! Great for minigame servers!
Mewtwo is the best pokemon!
Seems useful.
Full Support
SURPRISE!!!!
Oh great, now I have to get a new computer.
This seems like it could be useful for mapmakers.
Support
Oh look, a good suggestion with very few replies.
Support.
This would be so useful on servers and custom maps.
well, I am not a redstone person, but I know enough to understand that this would be a good edition, like storing your items on a map.
SUPPORT
I'm almost completely inactive, in case you're trawling through really old threads and notice me somewhere.
Yes
Support
Thanks for replying!
Edited topic to bits of NBT data
Mewtwo is the best pokemon!
Support
Minecraft is Awesome 94% of the time.
I support it so much!!
Chest GUIs, and forcing a GUI onto their screen is going to be awesome for mapmakers. If this ever comes out, I can finally make a backpack, without lots of work.
Let's keep this thread alive! Full support for this feature!
The signature is a lost art.