Content

This page will soon evolve. We are currently making a brand new Developer Center that will be more detailed, and will be updated with the latest API and new advenced features informations.
See Developer Center (in developement)

To use the CraftSearch API, you must have the CraftSearch plugin on your server. You will use this plugin like an API.

In the plugin.yml file of your plugin, you have to add this line to use the CraftSearch API :

depend: [CraftSearch]

You also have to add the CraftSearch plugin in your Build Path to use it.

ConnectSwitcher allows you to send players to another server when he is connected on CraftSearch. For example, the player connects to your hub with CraftSearch and will be able to switch to a skywars server without going back to the CraftSearch main server, dirrectly with ConnectSwitcher.

To do that, your will use this part of code :

CraftSearch.getInstance().connectSwitcher(player, serverid);

There are two ways to get your server id :
- The URL of your server page ends with the id (like that : https://www.craftsearch.net/en/server/<server id>)
- The last line of your server description in the minecraft menu contains the id (ID: <server id>)

Version under support: since 3.0.2

Sometimes, you will need to change the name or the description of your server. For exmaple, in a mini game server, you will set a description like Game is waiting for players to start... or Game is playing....

To change values, your will use this part of code :

CraftSearch.getInstance().setData("New name", "New description");

If you only want to change the description, your will use null like name, and the name will no change, same thing to change only the name, using null like description.

Version under support: since 3.0.2

Available soon...