Skip to content

Commit

Permalink
Merge pull request #58 from AerWyn81/master
Browse files Browse the repository at this point in the history
Using long-standing Bukkit API to handle server version
  • Loading branch information
unldenis authored Jul 12, 2024
2 parents 4c1ba73 + 3bd0c2e commit 81a51ae
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion holoeasy-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.holoeasy</groupId>
<artifactId>holoeasy</artifactId>
<version>3.4.0</version>
<version>3.4.1</version>
</parent>

<artifactId>holoeasy-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ object VersionUtil {
val CLEAN_VERSION: VersionEnum

init {
val bpName = Bukkit.getServer().javaClass.getPackage().name
VERSION = bpName.substring(bpName.lastIndexOf(".") + 1)
val clean = VERSION.substring(0, VERSION.length - 3)
val bpName = Bukkit.getServer().bukkitVersion
val version = bpName.substringBefore('-').replace('.', '_')
VERSION = "v$version"
val clean = VERSION.substring(0, VERSION.length - 2)
CLEAN_VERSION = VersionEnum.valueOf(clean.uppercase(Locale.getDefault()))
}

Expand Down
2 changes: 1 addition & 1 deletion holoeasy-example-kotlin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.holoeasy</groupId>
<artifactId>holoeasy</artifactId>
<version>3.4.0</version>
<version>3.4.1</version>
</parent>

<artifactId>holoeasy-example-kotlin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion holoeasy-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.holoeasy</groupId>
<artifactId>holoeasy</artifactId>
<version>3.4.0</version>
<version>3.4.1</version>
</parent>
<artifactId>holoeasy-example</artifactId>

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<groupId>org.holoeasy</groupId>
<artifactId>holoeasy</artifactId>
<version>3.4.0</version>
<version>3.4.1</version>
<packaging>pom</packaging>
<modules>
<module>holoeasy-core</module>
Expand Down

0 comments on commit 81a51ae

Please sign in to comment.