Skip to content

Playing gamemode


Available for LabyMod users with version greater than 3.4.9


The LabyMod chat can display the name of the current gamemode on the server

example gamemode


Example code

public void sendCurrentPlayingGamemode( Player player, boolean visible, String gamemodeName ) {
    JsonObject object = new JsonObject();
    object.addProperty( "show_gamemode", visible ); // Gamemode visible for everyone
    object.addProperty( "gamemode_name", gamemodeName ); // Name of the current playing gamemode

    // Send to LabyMod using the API
    LabyModProtocol.sendLabyModMessage( player, "server_gamemode", object );