Info
Content

Change text on Server Signs

There are 2 ways you can change the text on server signs. You can find them here.

Text Dynamic Update:

This function is very useful if you want to show how many players, which map or which game state a specific server has.

You have to program this with the SpigotAPI or you use our ready-made plugin for this purpose. You can find this here: https://github.com/TheCaveFire/CaveCloud-Addon/releases

SpigotAPI:

Server self = SpigotApi.getSelfServer();
self.getServerData()
    .setPlayers(Bukkit.getOnlinePlayers().size())
    .setGameState(SpigotApi.getGamestate(this.gamestate))
    .setMaxplayers(this.maxPlayers)
    .setMotd(motd);

SpigotApi.updateSelfServerData();

Change Gamestate Layout:

Each Gamestate has its own signature layout and can be customized. Here is a description of how you can do this in the web interface.

Hint: You can also set everything manually in cloud/config/signs.json.

  1. Login to the web interface and go to the "Signs" tab.
  2. Here you can click on an already existing Gamestate, change the layout or create a new one with the button "Create Layout". The form looks exactly the same.
    signs-webinterface.png
Placeholder Activation in the API
%group% Not possible - Specifies the ServerGroup
%id% Not possible - Returns the ID of the server
%players% ServerData#setPlayers - indicates the current number of players
%maxplayers% ServerData#setMaxPlayers - specifies the maximum number of players
%motd% ServerData#setMotd - sets the MOTD (e.g. for map names)
No Comments
Back to top