soft dependoption in your plugin.yml, see this page. You can use
soft dependwhenever Autorank is not necessary to run your plugin. If you need Autorank to always be there when you run your plugin, you should use
getAutorank()(from above) method. An example snippet:
AbstractRequirementclass is the template class to be able to create a new requirement. It consists of many methods, but I'll show you the most important ones.
needsOnlinePlayer()to return true, like so:
initRequirement(String options)method. This argument is a String array. It represents the string provided in the Paths file, divided by the semicolon (;). The method should return true when the requirement is set up correctly or false if it did not.
getProgressString(Player player). You should return a string that shows the progress of that player. If your requirement does not need a player to be online, Autorank will call
getProgressPercentage(UUID uuid)method. Note that this method will only be called with a
UUIDparameter. If your requirement needs a player to be online, you should not override this method. It will then always return zero when the player is not online.
getDescription()method. This description should not state any information about the current progress. It should just show what the player should do.
meetsRequirement(UUID uuid)or the
meetsRequirement(Player player)method (based on whether the requirement needs players to be online or not). Regardless of which method you override, you'll need to return true whenever the requirement is met or false if it is not.
RequirementBuilderclass and calling the method registerRequirement(). Example: