Skip to content

Commit

Permalink
Fix TypeId with mmoitems items
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikSzabo committed Jul 19, 2024
1 parent 64f4278 commit 5005946
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ which integrates with Multiverse-Core and WildRegeneration for cleanup. It can e
<dependency>
<groupId>gg.auroramc</groupId>
<artifactId>Aurora</artifactId>
<version>1.5.0</version>
<version>1.5.3</version>
<scope>provided</scope>
</dependency>
```
Expand All @@ -53,7 +53,7 @@ repositories {
}
dependencies {
compileOnly 'gg.auroramc:Aurora:1.5.0'
compileOnly 'gg.auroramc:Aurora:1.5.3'
}
```

Expand All @@ -64,6 +64,6 @@ repositories {
}
dependencies {
compileOnly("gg.auroramc:Aurora:1.5.0")
compileOnly("gg.auroramc:Aurora:1.5.3")
}
```
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ plugins {
}

group = "gg.auroramc"
version = "1.5.2"
version = "1.5.3"

java {
sourceCompatibility = JavaVersion.VERSION_21
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/gg/auroramc/aurora/api/item/TypeId.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import org.bukkit.Material;
import org.bukkit.entity.EntityType;

import java.util.Arrays;

public record TypeId(String namespace, String id) {
@Override
public String toString() {
Expand All @@ -23,7 +25,8 @@ public static TypeId fromDefault(String string) {
if (split.length == 1) {
return new TypeId("minecraft", split[0].toLowerCase());
} else if (split.length != 2) {
throw new IllegalArgumentException("Invalid TypeId: " + string);
String rest = String.join(":", Arrays.copyOfRange(split, 1, split.length));
return new TypeId(split[0], rest);
} else {
return new TypeId(split[0], split[1]);
}
Expand Down

0 comments on commit 5005946

Please sign in to comment.