Skip to content

Commit

Permalink
add bind<Type>(String)
Browse files Browse the repository at this point in the history
  • Loading branch information
Revxrsal committed Jun 11, 2022
1 parent 5887206 commit a7b5a93
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,11 @@ inline fun <reified T> BukkitBrigadier.bind(crossinline resolver: (CommandParame
*/
inline fun <reified T> BukkitBrigadier.bind(resolver: ArgumentType<*>) {
bind(T::class.java, resolver)
}

/**
* Binds the given type to an argument type
*/
inline fun <reified T> BukkitBrigadier.bind(resolverKey: String) {
bind(T::class.java, resolverKey)
}

0 comments on commit a7b5a93

Please sign in to comment.