mirror of
https://github.com/itHotL/PlayerStats.git
synced 2025-01-04 18:57:53 +01:00
Updated version number in plugin.yml, and made API #getVersion read the value from the plugin description and return the major version number only
This commit is contained in:
parent
4a67dfef10
commit
18ac4ecf00
@ -4,7 +4,7 @@
|
||||
<groupId>io.github.ithotl</groupId>
|
||||
<artifactId>PlayerStats</artifactId>
|
||||
<name>PlayerStats</name>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
<version>2.0</version>
|
||||
<description>Statistics Plugin</description>
|
||||
<url>https://www.spigotmc.org/resources/playerstats.102347/</url>
|
||||
<developers>
|
||||
|
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>io.github.ithotl</groupId>
|
||||
<artifactId>PlayerStats</artifactId>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
<version>2.0</version>
|
||||
|
||||
<name>PlayerStats</name>
|
||||
<description>Statistics Plugin</description>
|
||||
|
@ -29,13 +29,13 @@ public interface PlayerStats {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the current version of PlayerStatsAPI.
|
||||
* Use this method to ensure the correct version of
|
||||
* PlayerStats is running on the server before
|
||||
* accessing further API methods, to prevent
|
||||
* <code>ClassDefNotFoundExceptions</code>.
|
||||
* Gets the version number of the PlayerStats API
|
||||
* that's present for this instance of PlayerStats.
|
||||
* This number equals the major version number
|
||||
* of PlayerStats. For v1.7.2, for example,
|
||||
* the API version will be 1.
|
||||
*
|
||||
* @return the version of PlayerStatsAPI present on the server
|
||||
* @return the API version number
|
||||
*/
|
||||
String getVersion();
|
||||
|
||||
|
@ -166,10 +166,9 @@ public final class Main extends JavaPlugin implements PlayerStats {
|
||||
}.runTaskLaterAsynchronously(this, 200);
|
||||
}
|
||||
|
||||
@Contract(pure = true)
|
||||
@Override
|
||||
public @NotNull String getVersion() {
|
||||
return "1.8";
|
||||
return String.valueOf(this.getDescription().getVersion().charAt(0));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user