Home›Java›Mods›CloudNet-Lobby
CloudNet-Lobby
ModsJava

CloudNet-Lobby

Java mod listed for Minecraft 1.14. Downloads from the MC Java Mods app on Android.

⬇ Download on Spigot
CloudNet - Lobby
This Plugin depends on McUtils which you can obtain here .
By downloading this resource, you agree to the EULA of CloudNet-Lobby .


CloudNet-Lobby can also work with non-CloudNet servers!
Check the pre-made Addons section for more information.

Please notice: I will only give support for spigot/paper servers with a version listed at "Tested Minecraft Versions".


CloudNet-Lobby is a module-based (lobby-) system. What does module-based mean? The Lobby-System is only the base for the modules (like Spigot is the base for plugins).

That means: The system itself cannot do much. The power lies in the modules (I'll call them "addons" from now)!

But don't worry, you'll get some pre-made addons and configurations.

You can also use this system on non-lobby servers, just disable (or enable) every setting to make the server behavior normal (check out the configuration!). Why should you place a Lobby-System on a non-lobby server and make the server behavior normal? You can still use the Addons, which is a great advantage (e.g. the Action Scoreboard)!

This Plugin supports PlaceholderAPI .

Explenations
The following is complicated!

You should take yourself a little while and read all these explanations .
Spoiler: Explenation: Addons
So, how are these addons working? All addons can be used with configurations. There are three kinds of addons: Actions, Placeholders and Lists.
You set actions that will be executed for the players when they join the server. And some of these actions can trigger other actions (e.g. an item click in a "menu").
Placeholders? Placeholders should explain itself. If you use placeholders in a text (e.g. As item name, in the scoreboard, or in a text message) they will be replace by something other (e.g. the players name or name of the server).
We will take a look on Lists later (in pre-made addons -> actions/Hotbar).

Both, actions and placeholder are called with arguments. When calling an action or a placeholder you have to specify the name of if and the argument separated by a colon.

So when calling an action or placeholder the "command" seems like this
Code (Text):
action:argument
(action) or
Code (Text):
${placeholder:argument}
A very big difference between actions and placeholders is, that you can use actions only in special "areas" and placeholders actually everywhere.

You can also put a "!" in front of a action-call. That will tell the action that it should do, whatever it does quietly. E.g. can can put a "!" in front of a action if you do not want that it prints out a message to the player (e.g. "!Waypoint:Spawn").
Spoiler: Explenation: Expressions
Another point to mention are the so called expressions (at least i call them like this). You can use them anywhere where you can use placeholders. Basically a placeholder is an expression too.

An expression always starts with a "${" and ends with a "}".
The only other expressions but the placeholders are the "if" and lists expressions.
Code (Text):
${?TEXT OPERATOR TEXT:(IF EXPRESSION IS TRUE)else(IF EXPRESSION IS FALSE)}
First you see i wrote "TEXT". Here you can, if you want to, insert placeholders.

The operator is very important. You can choose between (without the commas)
Code (Text):
>=, >, <=, <, =, !=
The operator "=" checks if both parts of the head equals each other.
The operator "!=" checks if both parts of the head not equals each other.
The other operators can only compare numbers.
">=" checks if the left number is bigger than the right or equals it.
">" checks if the left numbers is bigger than the right.
"<=" checks if the left number is smaller than the right or equals it.
"<" cheks if the left number is smaller than the right.

The part where "IF EXPRESSION IS TRUE" is will be inserted as the whole expression if the "head" (the part before the colon) is true. The part where "IF EXPRESSION IS FALSE" will be inserted as the whole expression if the head is false. If you want to, you can simply leave out the "else" part, so that the expression does not care if the head is not true. In this case the expression would be replaced with nothing. So leabing out the "else" part is exactly like leave the else body empty "else()".

You can also interlace these expressions (write an expression into another one, and so on...).

So practically we can do a lot of things with these "if" expressions. For example:
Code (Text):
${?${Server:MOTD}=A nice server!:(A good motd!)else(A bad motd)}
would be in endeffect replaced with
Code (Text):
A good motd!
if the motd of the server is "A nice server!".
Thats because "${Server:MOTD}" is a placeholder, which will be replaced with the motd of the current server.

Btw if you hadn't noticed it: You can also use placeholders in the arguments of other placeholders, or in the bodies of "if" expressions.

Pre-made addons
So, after all this complicated stuff here's a list of the pre-made addons:
Only the italic orange addons require CloudNet.
All other addons can be used without CloudNet.

Spoiler: Actions
  • Connect
    Spoiler: Syntax and Use
    Code (Text):
    Connect:ServerName
    Connects the player to another Bungee-Server.

  • Gamemode
    Spoiler: Syntax and Use
    Code (Text):
    Gamemode:NewGamemode
    Possible gamemodes are
    Code (Text):
    0, 1, 2, 3, SURVIVAL, CREATIVE, ADVENTURE, SPECTATOR

  • Hotbar
    Spoiler: Syntax and Use
    Code (Text):
    Hotbar:HotbarName, Hotbar:~reload, Hotbar:~done
    "Hotbar:HotbarName" loads the given hotbar.
    "Hotbar:~reload" reloads the current hotbar (if set), e.g. If you got an Item with a variable name (with the help of expressions, e.g. the players money) it will only change their properties (item type, name, lore, etc.) if the hotbar will be reloaded.
    "Hotbar:~done" is some kind of "closing" the current hotbar. All the hotbar's items will be removed from the inventory, and the current hotbar will be removed from the player.

    Spoiler: Default Hotbar 'default.json'
    Code (Text):

    {
      "title": "",
      "content": {
        "hider": {
          "slot": 1,
          "item": {
            "id": "${?${PlayersShowing}=All:(lime_dye)else(${?${PlayersShowing}=OnlyFriends:(purple_dye)else(light_gray_dye)})}",
            "durability": 0,
            "amount": 1,
            "name": "&b» ${?${PlayersShowing}=All:(&aShow &cOnly Friends)else(${?${PlayersShowing}=OnlyFriends:(&cHide Players)else(&aShow All Players)})}",
            "lore": [
              "&7Showing currently",
              "${?${PlayersShowing}=All:(&aAll Players)else(${?${PlayersShowing}=OnlyFriends:(&dOnly Friends)else(&7No Other Players)})}"
            ],
            "enchantments": []
          },
          "clickaction": {
            "left": null,
            "right": [
              "ShowPlayers:${?${PlayersShowing}=All:(OnlyFriends)else(${?${PlayersShowing}=OnlyFriends:(None)else(All)})}",
              "Hotbar:~reload"
            ]
          }
        },
        "navigator": {
          "slot": 4,
          "item": {
            "id": "compass",
            "durability": 0,
            "amount": 1,
            "name": "&b» &9Navigator",
            "lore": [],
            "enchantments": []
          },
          "clickaction": {
            "left": null,
            "right": [
              "Menu:navigation"
            ]
          }
        },
        "lobbyswitcher": {
          "slot": 7,
          "item": {
            "id": "nether_star",
            "durability": 0,
            "amount": 1,
            "name": "&b» &9Lobby Switcher",
            "lore": [],
            "enchantments": []
          },
          "clickaction": {
            "left": null,
            "right": [
              "Menu:lobbies"
            ]
          }
        }
      }
    }
     
    This is the hotbar "default". The name/id of the hotbar will always the file's name (without the ".json").
    And as you see, there's a clear structure in a hotbar file.
    The "title" is useless in version 1.0, I'll add an action bar in version 1.2, so that the hotbar's title will be displayed the player as actionbar.

    In the "content" section are the different items located. Each item has got an ID (the first item id here is "hider"). Then the different properties in the item section: "slot" is the hotbar slot. The first slot is 0, the second is 1, and so on until the last slot 8.
    In the subsection of "item" you can set its id (you can use https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html as a reference), durability (which is actually ignored since the new id system), amount, name, and lore.

    As you see, here you can use all kinds of expressions (in v1.0 only "if"-expressions and placeholders).
    The "special" area for the action triggers is the "clickaction" area.
    Here you can define which action will be called on a left-, and rightclick. Just leave out an option (left/right) or set its value to "null" and then no action will be called.

    Also very important is the ability of the listing. You can write another kind of expression in the id of the item, if you do so, the lobby system will create a list and for each object in this list, an item will be generated and placed as it is configured.
    The only thing that will be ignored is the slot. Okay, it wont be fully ignored, if the list name is correct the first generated item will be placed at the specified slot.
    The next item will be placed at the next slot, and so on..

    Code (Text):
    item${i;ListName:Argument}
    The actually expression is "${i;ListName:Argument}".
    After the first bracked you have to define a variable, in this case its just "i", followed by a semicolon. Then the name of the list and the argument seperated with a normal colon (like the normal placeholders).
    So you can use the variable in the item properties with an dollar character in front of it. In every generated item this variable will be replaced with the object in the list.
    Code (Text):
    $i
    See pre-made addons/Lists for current pre-made lists.
  • Inventory
    Spoiler: Syntax and Use
    Code (Text):
    Inventory:Close
    Jep, the only thing that this can do is close the current inventory of the player
  • Menu
    Spoiler: Syntax and Use
    Code (Text):
    Menu:MenuName; Menu:~reload, Menu:~done
    Please read the description of the Hotbar addon to understand how the configuration is working.
    Spoiler: Default Menu 'navigator.json
    Code (Text):

    {
      "rows": 6,
      "title": "&b» &cNavigation",
      "content": {
        "item": {
          "location": {
            "row": 2,
            "column": 5
          },
          "item": {
            "id": "grass_block",
            "durability": 0,
            "amount": 1,
            "name": "&a» &b&lSpawn",
            "lore": [
              "Click to teleport"
            ],
            "enchantments": []
          },
          "clickaction": {
            "left": [
              "Waypoint:spawn"
            ],
            "right": null
          }
        }
      }
    }
     
    Spoiler: Default Menu 'lobbies.json'
    Code (Text):

    {
      "rows": 1,
      "title": "&b» &cLobby-Switcher",
      "content": {
        "item${i;ServerGroups:Lobby}": {
          "location": {
            "row": 1,
            "column": 1
          },
          "item": {
            "id": "sugar",
            "durability": 0,
            "amount": "${Server:Players:$i}",
            "name": "&a» &b$i",
            "lore": [
              "&7${Server:Players:$i}/${Server:MaxPlayers:$i}"
            ],
            "enchantments": []
          },
          "clickaction": {
            "left": [
              "Inventory:Close",
              "Connect:$i"
            ],
            "right": null
          }
        }
      }
    }
     
  • PlayerCommand
    Spoiler: Syntax and Use
    Code (Text):
    PlayerCommand:Text
    The player will execute the given text as command.
  • ShowPlayers
    Spoiler: Syntax and Use
    Code (Text):
    ShowPlayers:value
    Possible values are
    Code (Text):
    All, OnlyFriends, None
    You can also leave out the value, in this case the players will just be hidden, or shown like the current setting of the player (a "reload").
  • Scoreboard
    Spoiler: Syntax and Use
    Code (Text):
    Scoreboard:ScoreboradName
    This scoreboard (which is actually only a sideboard) is compatible with any other scoreboard (e.g. NameTagEdit, etc.).
    Please read the description of the Hotbar addon to understand how the configuration is working.

    Spoiler: Default Scoreboard 'default.yml'
    Code (Text):

    title: '&bCloudNet-Lobby'
    updateInterval: 20
    content:
      '15': ''
      '14': ''
      '13': ' '
      '12': '&b Hello,'
      '11': '&7    ${Player:Name}'
      '10': '  '
      '9': '&b Server'
      '8': '&7    ${Server:Name}'
      '7': '   '
      '6': '&b Time'
      '5': '&9    ${RealTime:HH:mm:ss}'
      '4': ''
      '3': ''
      '2': ''
      '1': ''
     
    The only thing to mention here is the "updateIntervall": This is the time (in ticks, 20 ticks = 1 second) how long the scoreboard will wait before it will reload itself.

    In This example the placeholder "RealTime" is used with the Argument "HH:mm:ss" that will display the hour of the day (0-24), the minute on the our (0-59) and the second in the minute (0-59). In order that the second is updated every second, the update intervall have to be set at least to 1.

    The empty values in "content" wont be displayed, not even an empty line will be generated.

    You can use multiple values with the same content (compare 10 and 7). The addon will display both (actually minecraft is not able to display multiple entires in a scoreboard with the same value).
  • Waypoint
    Spoiler: Syntax and Use
    Code (Text):
    Waypoint:WaypointName
    Will teleport the player to the given waypoint, or send a error message if the waypoint does not exists.
Spoiler: Placeholders
  • HeldSlot
    Spoiler: Syntax and Use
    Code (Text):
    ${HeldSlot}
    Returns the number of the current slot the player has selected in their hotbar. PS: Yes you got it! No argument, so no colon!

  • Player
    Spoiler: Syntax and Use
    Code (Text):
    ${Player:value}
    Possible values are
    Code (Text):
    Name, DisplayName, UUID

  • PlayersShowing
    Spoiler: Syntax and Use
    Code (Text):
    ${PlayersShowing}
    Possible returnments are
    Code (Text):
    All, OnlyFriends, None

  • RealTime
    Spoiler: Syntax and Use
    Code (Text):
    ${RealTime:SimpleDateFormat}
    Returns the time of the host machine in the SimpleDateFormat (e.g. "HH:mm" will return the hour and
    minute ). Check out this website for more information.

  • Server
    Spoiler: Syntax and Use
    Code (Text):
    ${Server:value}
    Possible values are
    Code (Text):
    IsOnline, MOTD, Players, MaxPlayers, Name
    " IsOnline " can return "true" or "false", " MOTD " returns the MOTD of the server, " Players " the amount of current players and " MaxPlayers " the amount of maximum players for the servers (slots). You can add another colon after the value and the specify the server. If you leave of the specification of the server, the current server will be used. As Example:
    Code (Text):
    ${Server:IsOnline:CityBuild-1}
Spoiler: Lists
  • ServerGroups
    Spoiler: Syntax and Use
    Code (Text):
    ServerGroups:Name
    This list will give out all servers from the CloudNet Server group, e.g. with "ServerGroups:Lobby" it will generate an item for every lobby and replace your given variable with the lobby name ("Lobby-1", "Lobby-2", etc.).

  • Count
    Spoiler: Syntax and Use
    Code (Text):
    Count:StartNumber,EndNumber
    This list will be just counting forwards from the given start number until the given end number seperated by a comma. E.g. "Count:5,10" will generate an item for the number "5", "6", "7", "8", "9" and "10". And the variable wil be replaced with this number.
Commands
The main command is "/clobby" - Permission: "lobby.clobby"
Subcommands of "/clobby":

Configuration
Spoiler: Default Configuration
Code (Text):
world:
  daytimeChange: false # Should the server have a daytime cycle (day and night)
  blockChange: false # Should block changes (and block placing and breakings) be allowed?
  weatherChange: false # Should the server be able to change between different weathers?
spawn:
  animals: false # Should animals spawn?
  monsters: false # Should monsters spawn?
  npcs: false # Should npcs spawn?
  others: false # Should other creatures spawn?
player:
  blockInventory: true # Should the inventory of player be blocked (that they cannot move items, etc.)?
  damage:
    take: false # Should players take damage?
    refill: true # Should the players health be refilled?
  hunger:
    take: false # Should players take hunger?
    refill: true # Should the players food-bar be refilled?
  pvp: false # Should players be able to hit other players?
  pve:
    make: false # Should players be able to hit non-player entities?
    take: false # Should players take damage from other entities (e.g. Zombie)?
  joinactions: [] # If you uncomment a line here, or add another one, you have to remove the []
    #- '!GameMode:2' # Sets the gamemode to adventure mode
    #- '!Hotbar:default' # Gives the player the default hotbar
    #- '!Scoreboard:default' # Gives the player the default scoreboard
    #- '!ShowPlayers:' # Hides the players that should be hidden and show the players that sould be shown
    #- '!Waypoint:spawn' # Teleports the player to the spawn
chat:
  disable:
    joinMessage: true # Should the join message be disabled?
    quitMessage: true # Should the quit message be disabled?
Layout
Spoiler: Default Layout
Code (Text):
prefix: "&b&lCloudNet&6&lLobby &8»&7 "
teleport:
  spawn: "{this:teleport.other}"
  other: "{this:prefix}You were sent to &b%0&7."
connecting:
  lobby: "{this:connecting.server}"
  server: "{this:prefix}Connecting to &b%0&7..."
waypoint:
  not-exist: "{this:prefix}&cThis waypoint does not exist!"
join: "{this:prefix}%0&7 joined the game."
quit: "{this:prefix}%0&7 left the game."
help:
  reload: "Reloads the lobby system."
  setspawn: "Sets the spawnpoint."
  setwaypoint: "Sets a waypoint."
  remwaypoint: "Removes a waypoint."
reload: "{this:prefix}Plugin reloaded!"
setspawn: "{this:prefix}Spawn set!"
setwaypoint: "{this:prefix}Waypoint &b%0&7 set."
remwaypoint: "{this:prefix}Waypoint &b%0&7 removed."
gamemode-updated: '{this:prefix}Your gamemode has been updated to &b%0 Mode&7.'
error:
  unknown: '{this:prefix}&cAn error occurred while performing this action! See console for details.'
  usage: '{this:prefix}&cWrong usage! Please use /%0 help'
  permission: '{this:prefix}&cYou do not have permission for this!'

If you've got issues and/or errors feel free to PM me.
Please give this system a lot of time, it will be worth it!

For Developers
Spoiler: Creation of your own Addon
You can make your own Addons (Actions and Placeholders).

First (as you should know) you have to add the CloudNetLobby.jar as dependency for your project. You can do this with the JAR directly or add the Maven dependency in your pom.xml ( highly recommanded ):
Spoiler: Maven Repository and Dependency
Repository:
Code (Text):
  <repositories>
    ...
    <repository>
      <id>software4you-repo</id>
      <url>https://repo.software4you.eu/repo</url>
    </repository>
    ...
  </repositories>
Dependency:
Code (Text):
 <dependencies>
    ...
    <dependency>
      <groupId>eu.software4you.minecraft.cloudnetlobby</groupId>
      <artifactId>CloudNetLobby</artifactId>
      <version>1.0</version>
    </dependency>
    ...
  </dependencies>

Like Bukkit/Spigot Plugins you have to create a file which contains some information. The file is called "addon.yml" and have to be placed in the root of the Addon. actually in only contains the path of the main class.
Spoiler: addon.yml
Code (Text):
main: me.myplugin.MyAddonMain

Your main class have to extend either the class Addon, Action, Placeholder or List.
Alle these classes are located in the package
Code (Text):
eu.software4you.minecraft.cloudnetlobby.addons

Addon
The constructor of your addon (no matter what type) must have no parameters and it must be super your name of the addon.
All addons have to override the
Code (Java):
    @Override
    protected void load ( ) throws Exception {

    }

    @Override
    protected void unload ( ) throws Exception {

    }
load() is called when the addon will be loaded, and unload() when its going to be unloaded.

Spoiler: MyAddonMain.java
Code (Java):
package me.myplugin ;

import eu.software4you.minecraft.cloudnetlobby.addons.Addon ;

public class MyAddonMain extends Addon {
    public MyAddonMain ( ) {
        super ( "MyAddon" ) ;
    }

    @Override
    protected void load ( ) throws Exception { /* ... */ }

    @Override
    protected void unload ( ) throws Exception { /* ... */ }
}
 

Placeholder
If you want to create a placeholder you also have to override the
Code (Java):
    @Override
    protected String replace ( Player caller, String arg ) {
        return null ;
    }

Spoiler: MyPlaceholderMain.java
Code (Java):
package me.myplugin ;

import eu.software4you.minecraft.cloudnetlobby.addons.Placeholder ;
import org.bukkit.entity.Player ;

public class MyPlaceholderMain extends Placeholder {
    public MyPlaceholderMain ( ) {
        super ( "MyPlaceholder" ) ;
    }

    @Override
    protected void load ( ) throws Exception { /* ... */ }

    @Override
    protected void unload ( ) throws Exception { /* ... */ }

    @Override
    protected String replace ( Player caller, String arg ) {
        return null ;
    }
}
 

Action
If you want to create an action you also have to override the
Code (Java):
    @Override
    protected boolean call ( Player caller, String arg, boolean quit ) throws Exception {
        return false ;
    }

Spoiler: MyActionMain.java
Code (Java):
package me.myplugin ;

import eu.software4you.minecraft.cloudnetlobby.addons.Action ;
import org.bukkit.entity.Player ;

public class MyActionMain extends Action {
    public MyActionMain ( ) {
        super ( "MyAction" ) ;
    }

    @Override
    protected void load ( ) throws Exception { /* ... */ }

    @Override
    protected void unload ( ) throws Exception { /* ... */ }

    @Override
    protected boolean call ( Player caller, String arg, boolean quit ) throws Exception {
        return false ;
    }
}
 

List
If you want to create a list you also have to override the
Code (Java):
    @Override
    protected List < String > list ( Player caller, String arg ) {
        return null ;
    }

Spoiler: MyListMain.java
Code (Java):
package me.myplugin ;

import java.util.List ;
import org.bukkit.entity.Player ;

public class MyActionMain extends eu. software4you . minecraft . cloudnetlobby . addons . List {
    public MyListMain ( ) {
        super ( "MyList" ) ;
    }

    @Override
    protected void load ( ) throws Exception { /* ... */ }

    @Override
    protected void unload ( ) throws Exception { /* ... */ }

    @Override
    protected List < String > list ( Player caller, String arg ) {
        return null ;
    }
}
 

Addon-API
The Addon-API can be accessed within the addon class (like the Bukkit/Spigot Plugin-API). All the following methods are declared as final and cannot be overwritten.

Code (Java):
// Returns the Id/Name of the Addon
public final String getId ( ) { ... }

// Returns the Folder for the Addon Files (configurations, etc.)
public final File getDataFolder ( ) { ... }

// Returns the config File ("config.yml") of the Addon
public final File getConfigFile ( ) { ... }

// Returns an instance of YamlConfiguration
public final YamlConfiguration getConfig ( ) { ... }

// Reloads the YamlConfiguration
public final void reloadConfig ( ) { ... }

// Saves the YamlConfiguration
public final void saveConfig ( ) { ... }
Once you call "getDataFolder()" the Folder will be created for you. Even so with "getConfigFile()", "getConfig()", "reloadConfig()" and "saveConfig()".

If you wish to create multiple addons into one addon file, you may use this (is a member of the Addon class):
Code (Java):
protected static void registerAddon ( Addon addon ) throws Exception { ... }
You can call it from your Addon directly with just "registerAddon(...)" or with "Addon.registerAddon(...)".

Just place your other addon/action/placeholder instance as parameter.
Code (Java):
registerAddon ( new MyPlaceholder ( ) ) ;
You should call this method from you contructor.

Lobby-API
The Lobby-API can be accessed from everywhere (like the Bukkit/Spigot Bukkit-API). All the following methods are declared as static and cannot be overwritten.

Code (Java):
// Prints out a debug message if debug is enabled
public static void debug ( String s ) { ... }

// Calls a list of action commands ("Action:Paramter")
public static void callActions ( Player caller, List < String > actions ) throws Exception { ... }

// Calls a single Action command ("Action:Parameter")
public static void callAction ( Player caller, String line ) throws Exception { ... }

// Splits a addon command into id/name and parameter
public static Map . Entry < String , String > parseAddonCall ( String line ) { ... }

// Replaces a String (replaces expressions and variables from PlaceholderAPI)
public static String replace ( Player caller, String source ) { ... }

// Does the same as replace() additionally it will replace color codes
public static String replaceC ( Player caller, String source ) { ... }

Plugin details

Read from the plugin's own plugin.yml.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

CloudNet-Lobby is a free Minecraft Java mod. Compatible with Minecraft 1.14. Downloaded 514 times (via Spigot). Download it and open it directly in the game.

Explore more