Links

All about horse's links and its configuration

The most part of customers usually ask: What are links? Links is the system that is used to make sure entities can be used on diferent servers. To make this, the database contains a true/false value that indicates if the horse is linked or not. With this parameter, horses aren't listed on the /Horse List command (WARNING! Using the /Horse ListAll command can bypass the link, creating duplications of this entity on other servers. Make sure you're editing entities that are linked on the same server or editing entities that aren't linked and you don't allow them to be linked).

The objective of this feature is to allow owners to create multiple servers with the same plugin using the same data. With this, also horses can be used on other servers instead of the one where they claimed the horses.

Horses that aren't linked are temporary entities. This entities are despawned once the player leaves the server or if the owner closes the server. This temporary entity allows players to leave the server, join another one and use this entity on this server without having a duplicate of this one on the first server. This is useful for owners that are creating multiple copies of the same server that are used to create a balanced system where players are distributed on this servers.

To manage this links, the plugin generates a file on its folder that contains the id of the registered horse, the entity's UUID and its location. This is the best way to save data and manage the entities making sure Spigot will not remove this entities. Also, using this system, allows to load the enities previously to keep them registered and use them as the actual entity instead of creating a new one if it's not loaded.

Owners have different options that can configure as they wish. This are the options found on the Config.yml related to links:

  • Allow-link (true/false): Allows you to turn on the link. If it's disabled, players can't link the unlinked entities to the server.

  • Allow-unlink (true/false): Allows you to turn off the link. If it's disabled, players can't unlink the entities from the server. It's useful for servers that don't wish to use horses as a crossplatform feature.

  • List-unlinked (true/false): Allows you to see the unlinked horses on the /Horse List command. This is useful to prevent players from using this horses, splitting the horses per server instead of allowing them on other servers.

  • Link-on-claim (true/false): On claim, this setting automatically sets the link of this entity on, linking the entity on the server.

  • Link-on-spawn (true/false): On spawn, entities are automatically linked to the server. This option is useful to make sure horses that were accidently despawned due errors get linked to the server.

The settings Allow-link and Allow-unlink are used to block the Link button from the horse settings to prevent them to turn it on or off. If this options are enabled, players can manually go to the horse settings and use the Link button to switch the horse's link status. This is useful if you allow them to be linked on other servers and to unlink them so they can switch the horse's server, and for this players that prefer to have their horses linked to the server, keeping the entity insted of despawning it.

Last updated