🤖For Developers
Location and Access
The API is part of the AdvancedSeasons plugin package, and its main class is located in the net.advancedplugins.seasons.api
package. To access the API, ensure that the AdvancedSeasons plugin is installed on your Spigot server.
Download API Jar
Latest API jar is available on AdvancedSeasons' github page. Direct link to the jar: https://github.com/AdvancedPlugins/Seasons/blob/main/AdvancedSeasons-API.jar
Key Functionalities
The AdvancedSeasonsAPI
class provides several methods:
getSeason(World world): Returns the current season of the specified world without transition phases (e.g.,
WINTER
).getSeasonWithTransitions(World world): Similar to
getSeason
, but includes transition phases (e.g.,WINTER_TRANSITION_3
).setSeason(String season, World world): Allows setting the season of a specific world.
getTemperature(Player player): Returns the temperature of a player in degrees.
setTemperature(Player player, int temperature): Sets a player's temperature to a specified degree.
boostTemperature(Player player, int temperature): Boosts a player's temperature by a specified degree.
Adding the Plugin as a Dependency
To use the AdvancedSeasons API in your project, you need to add the plugin as a dependency. This process typically involves the following steps:
Download the AdvancedSeasons JAR File: Ensure you have the latest version of the plugin JAR file, this will be from SpigotMC, AdvancedPlugins.net or any distributed platforms.
Add to Project Dependencies:
If using Maven, add the JAR to your local repository and include it in your
pom.xml
.For Gradle, include the JAR in your
libs
folder and add it to the dependencies in yourbuild.gradle
Import API Classes: In your project, import the necessary classes from the
net.advancedplugins.seasons.api
package.
Example Usage
Last updated