Skip to content

Commit

Permalink
3.4.3 - handle also versions lie 1.14
Browse files Browse the repository at this point in the history
  • Loading branch information
unldenis committed Jul 19, 2024
1 parent 38aee9c commit 90aa277
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 11 deletions.
8 changes: 4 additions & 4 deletions README.MD
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
> [!NOTE]
> New update: 3.4.2: [BlockLines & Animations](https://github.com/unldenis/holoeasy?tab=readme-ov-file#blockline--animations). Scroll down for more information.
> New update: 3.4.3: [BlockLines & Animations](https://github.com/unldenis/holoeasy?tab=readme-ov-file#blockline--animations). Scroll down for more information.
HoloEasy is a simple, modern and high-performant Java and Kotlin Minecraft Hologram library for 1.8-1.20.4 servers.

Expand All @@ -20,7 +20,7 @@ Lightweight replacement for Holographic Display. HoloEasy only uses packets inst
<dependency>
<groupId>com.github.unldenis.holoeasy</groupId>
<artifactId>holoeasy-core</artifactId>
<version>3.4.2</version>
<version>3.4.3</version>
</dependency>

<!-- For java projects include also the kotlin stdlib -->
Expand All @@ -34,7 +34,7 @@ Lightweight replacement for Holographic Display. HoloEasy only uses packets inst
#### Gradle

```kotlin
implementation("com.github.unldenis.holoeasy:holoeasy-core:3.4.2")
implementation("com.github.unldenis.holoeasy:holoeasy-core:3.4.3")

// For java projects include also the kotlin stdlib
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.9.21")
Expand Down Expand Up @@ -139,7 +139,7 @@ plugin.registerHolograms {
```

## BlockLine & Animations
From 3.4.2 version, library added support for:
From 3.4.3 version, library added support for:
- BlockLine: Instead of a dropping item it spawns an hologram with the block as helmet.
- Animations: You can apply animations to hologram lines.
<p align="center">
Expand Down
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.2</version>
<version>3.4.3</version>
</parent>

<artifactId>holoeasy-core</artifactId>
Expand Down
11 changes: 9 additions & 2 deletions holoeasy-core/src/main/kotlin/org/holoeasy/util/VersionUtil.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,17 @@ object VersionUtil {
init {
// Bukkit method that was added in 2011
// Example value: 1.20.4-R0.1-SNAPSHOT
val bpName = Bukkit.getServer().bukkitVersion
// Example value: 1.14-R0.1-SNAPSHOT

val bkName = Bukkit.getServer().bukkitVersion

val bkVersion = bkName.split("-")[0]

// 1.20.4
// 1.14
// Split with '.' and get first two elements
VERSION = bpName.split(".").let { "V${it[0]}_${it[1]}"}

VERSION = bkVersion.split(".").let { "V${it[0]}_${it[1]}"}

CLEAN_VERSION = VersionEnum.valueOf(VERSION)
}
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.2</version>
<version>3.4.3</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.2</version>
<version>3.4.3</version>
</parent>
<artifactId>holoeasy-example</artifactId>

Expand Down
4 changes: 2 additions & 2 deletions 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.2</version>
<version>3.4.3</version>
<packaging>pom</packaging>
<modules>
<module>holoeasy-core</module>
Expand Down Expand Up @@ -99,7 +99,7 @@
<!-- <plugin>-->
<!-- <groupId>org.apache.maven.plugins</groupId>-->
<!-- <artifactId>maven-jar-plugin</artifactId>-->
<!-- <version>3.4.2</version>-->
<!-- <version>3.4.3</version>-->
<!-- <configuration>-->
<!-- <outputDirectory>C:\Users\mehil\OneDrive\Desktop\Spigot 1.16.5\plugins</outputDirectory>-->
<!-- </configuration>-->
Expand Down

0 comments on commit 90aa277

Please sign in to comment.