Skip to content

Commit

Permalink
Fix ClassCastException
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt-MX committed Jul 9, 2024
1 parent 0b5c904 commit 615f444
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ open class GuiButton<T : GuiButton<T>>(
editMeta(block)
} as T

inline infix fun <reified T : ItemMeta> editMeta(crossinline block: T.() -> Unit): T = apply {
item?.editMeta(T::class.java) {
inline infix fun <reified M : ItemMeta> editMeta(crossinline block: M.() -> Unit): T = apply {
item?.editMeta(M::class.java) {
block(it)
}
} as T
Expand Down Expand Up @@ -252,4 +252,4 @@ open class GuiButton<T : GuiButton<T>>(
copy.postBuild = postBuild.clone()
return copy as T
}
}
}

0 comments on commit 615f444

Please sign in to comment.