Update Requires.kt
This commit is contained in:
@@ -8,18 +8,16 @@ import org.bukkit.permissions.Permission
|
|||||||
* Defines that the given [permission] is required to interact with this
|
* Defines that the given [permission] is required to interact with this
|
||||||
* path of the command.
|
* path of the command.
|
||||||
*/
|
*/
|
||||||
fun ArgumentBuilder<ServerCommandSource, *>.requiresPermission(permission: String) {
|
fun ArgumentBuilder<ServerCommandSource, *>.requiresPermission(permission: String): ArgumentBuilder<*, *> =
|
||||||
requires {
|
requires {
|
||||||
it.bukkitSender.hasPermission(permission)
|
it.bukkitSender.hasPermission(permission)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines that the given [permission] is required to interact with this
|
* Defines that the given [permission] is required to interact with this
|
||||||
* path of the command.
|
* path of the command.
|
||||||
*/
|
*/
|
||||||
fun ArgumentBuilder<ServerCommandSource, *>.requiresPermission(permission: Permission) {
|
fun ArgumentBuilder<ServerCommandSource, *>.requiresPermission(permission: Permission): ArgumentBuilder<*, *> =
|
||||||
requires {
|
requires {
|
||||||
it.bukkitSender.hasPermission(permission)
|
it.bukkitSender.hasPermission(permission)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
Reference in New Issue
Block a user