Skip to content

Commit a7b5a93

Browse files
committed
add bind<Type>(String)
1 parent 5887206 commit a7b5a93

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

bukkit/src/main/java/revxrsal/commands/bukkit/bukkit_extensions.kt

+7
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,11 @@ inline fun <reified T> BukkitBrigadier.bind(crossinline resolver: (CommandParame
7878
*/
7979
inline fun <reified T> BukkitBrigadier.bind(resolver: ArgumentType<*>) {
8080
bind(T::class.java, resolver)
81+
}
82+
83+
/**
84+
* Binds the given type to an argument type
85+
*/
86+
inline fun <reified T> BukkitBrigadier.bind(resolverKey: String) {
87+
bind(T::class.java, resolverKey)
8188
}

0 commit comments

Comments
 (0)