Basic command tutorial
Intro
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]"
Where:
- [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]"
Where:
- [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]"
where:
- [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.
How would you add a actual world like in the files?
i dont understand. The only worlds that it says when i press tab are nether and end. It does not let me use the custom map I have placed in the server folder. PLEASE HELP!
I can't add a world beacouse I have not the "permission to access this command" could you help me to add a world please? it's very important to me to add a world in my new server. thanks very much
Im stuck in the new world... can i get back? cause i was pretty far in the other world (like almost-ready-to-spawn-a-wither-far). someone ideas?
In reply to nathan10nathan:
In reply to Forge_User_34832864:
In reply to Forge_User_34832864:
Hi,
is it a way to remove the LobbyAPI title on selector
when I try to do /hub or /lobby it says "an internal error occurred while attempting to preform this command" and i do not know how to fix it, most all the other commands dont say that and when i do /pl it is not red, it is green. Get back to me asap, thanks!
everything works just fine but i jsut realised i get this warn in console
[10:47:42] [Server thread/WARN]: [LobbyAPI] Task #6002 for LobbyAPI v3.7.88 generated an exception
java.lang.NullPointerException: null
at me.zombie_striker.lobbyapi.Main$3.run(Main.java:451) ~[?:?]
at org.bukkit.craftbukkit.v1_14_R1.scheduler.CraftTask.run(CraftTask.java:81) ~[spigot.jar:git-Spigot-093165d-ba575a5]
at org.bukkit.craftbukkit.v1_14_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:394) [spigot.jar:git-Spigot-093165d-ba575a5]
at net.minecraft.server.v1_14_R1.MinecraftServer.b(MinecraftServer.java:1008) [spigot.jar:git-Spigot-093165d-ba575a5]
at net.minecraft.server.v1_14_R1.DedicatedServer.b(DedicatedServer.java:396) [spigot.jar:git-Spigot-093165d-ba575a5]
at net.minecraft.server.v1_14_R1.MinecraftServer.a(MinecraftServer.java:956) [spigot.jar:git-Spigot-093165d-ba575a5]
at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:801) [spigot.jar:git-Spigot-093165d-ba575a5]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_191]
I want to create a whitelist but unfortunately the "menu item" disappears as soon as I activate it
cuando pongo el primer comando que es /hub o lobby no me sale nada que pasa porfa ayuda quien