Skip to content

Commit

Permalink
[build] fix npe with itembuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
ryderbelserion committed Jun 25, 2024
1 parent 4cf2407 commit 1b70d6a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {

val buildNumber: String? = System.getenv("BUILD_NUMBER")

rootProject.version = if (buildNumber != null) "${libs.versions.minecraft.get()}-$buildNumber" else "1.11"
rootProject.version = if (buildNumber != null) "${libs.versions.minecraft.get()}-$buildNumber" else "1.11.1"

val isSnapshot = false

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,10 +379,12 @@ public ItemStack build() {
HeadDatabaseAPI api = this.plugin.getApi();

if (api != null) {
item = api.isHead(this.customHead) ? api.getItemHead(this.customHead) : item.withType(Material.PLAYER_HEAD);
this.itemMeta = item.getItemMeta();
this.material = Material.PLAYER_HEAD;
this.isCustom = true;
if (!this.customHead.isEmpty()) {
item = api.isHead(this.customHead) ? api.getItemHead(this.customHead) : item.withType(Material.PLAYER_HEAD);
this.itemMeta = item.getItemMeta();
this.material = Material.PLAYER_HEAD;
this.isCustom = true;
}
}
}

Expand Down

0 comments on commit 1b70d6a

Please sign in to comment.