Basic command tutorial
This tutorial is meant to teach users how to add worlds to the Lobby menu. In the next few sections we will be covering how to get to the LobbyAPI menu, add worlds using commands, set descriptions of worlds using commands, and setting a "Main Lobby".
#1 Getting to the LobbyAPI Menu.
The LobbyAPI menu is a GUI that will allow the user to see and select the world they wish to teleport to. In order to get to this menu, all the player has to do is issue the command /hub or /lobby. Doing so should bring up this menu:
As you can see, this menu has nothing in it. That is because we have not added any worlds yet.
#1.5 Familiarizing yourself with the LobbyAPI command menu.
Before we move on to adding worlds, I just want to cover that you can view all the commands and functions for LobbyAPI by issuing the command "/LobbyAPI". It should bring a menu that looks close to this one:
New updates may change the order or type of commands displayed.
#2, How to add a world.
To add worlds to the menu, we will need to use the command:
"/LobbyAPI addWorld [Worldname] [Slot] [X] [Y] [Z]"
- [Worldname] represents the world you want to add. You can either press "tab" to view all available worlds, or you can type ~ to select the world you are currently in
- [Slot] represents the slot the world will be in for the GUI. If you want to put the world icon in the top-left corner, put 0, for the top right, put 8. This number can can be increased up to 100 to create more lines in the GUI.
- [X] [Y] and [Z] represents the X Y and Z of the spawn. If you want the XYZ to be the same as the spot your player is currently, put ~ as the X Y and Z.
In this example, I will be added the world "testworld" to the GUI. For me, the command sent was:
If you now use the /hub or /lobby commands, you should now see an icon in the inventory. If you hover over it, it should display the world's name, an empty line, and the amount of players in that world (like so):
For most, this is all you will need to know. The empty line represents the world's description. If you want to know how to modify the description, go to the next section.
#3 Changing a world's description.
To change a worlds description, you will need to use the command
"/LobbyAPI setDescription [Worldname] [Description]"
- [Worldname] is the name of the world or "~" (for the world you are currently in)
- [Description] is the description you want for that world. As of 3.7.16, it supports chatcolors (using &0 to &f )
The command you sent should look like:
If you now use /hub or /lobby again, you should now see that you world has a description (such as):
#4 Setting a "Main Lobby"
Main lobbies are worlds that players will be sent to by default when they join the server or die. Currently, the players will join the world you set as default in your server.properties file. To change this, you will need to use the command
"/LobbyAPI setMainLobby [worldname]"
- [Worldname] is equal to a world's name or "~" (for the world you are currently in)
If you now go back to the GUI using /hub or /lobby, you should now see that a new line has been added to the world icon's lore. This will mean that the world has now been set as the Main Lobby.
Note: There can be only one Main Lobby. Trying to set a new world as a lobby will override the existing lobby.