depend
or soft depend
option in your plugin.yml, see this page. You can use soft depend
whenever Autorank is not necessary to run your plugin. If you need Autorank to always be there when you run your plugin, you should use depend
. getAutorank()
(from above) method. An example snippet:AbstractRequirement
AbstractRequirement
class 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. registerWarningMessage(String message)
to tell the user something went wrong. These messages are automatically delivered to the user.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 getProgressString(UUID uuid)
.getProgressPercentage(UUID uuid)
method. Note that this method will only be called with a UUID
parameter. 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.RequirementBuilder
class and calling the method registerRequirement(). Example: