Skip to content

Commit

Permalink
Add velocity ArgumentExtension
Browse files Browse the repository at this point in the history
  • Loading branch information
alexstaeding committed Nov 23, 2023
1 parent 580df1c commit 3395e7a
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Anvil - AnvilPowered.org
* Copyright (C) 2019-2023 Contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

package org.anvilpowered.anvil.velocity.user

import com.velocitypowered.api.command.CommandSource
import org.anvilpowered.kbrig.builder.ArgumentBuilder

fun <B : ArgumentBuilder<CommandSource, B>> B.requiresPermission(permission: String): B =
requires { it.hasPermission(permission) }

0 comments on commit 3395e7a

Please sign in to comment.