File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed
plugin-shared/src/main/kotlin/app/simplecloud/plugin/api/shared/permission
plugin-velocity/src/main/kotlin/app/simplecloud/plugin/api/velocity/permission Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ package app.simplecloud.plugin.api.shared.permission
2+
3+ /* *
4+ * @author Niklas Nieberler
5+ */
6+
7+ fun interface PermissionChecker <P > {
8+
9+ /* *
10+ * Checks the permission by a player
11+ * @param player to check the permission
12+ * @param name of the permission
13+ */
14+ fun checkPermission (player : P , name : String ): Boolean
15+
16+ }
Original file line number Diff line number Diff line change 1+ package app.simplecloud.plugin.api.velocity.permission
2+
3+ import app.simplecloud.plugin.api.shared.permission.PermissionChecker
4+ import com.velocitypowered.api.proxy.Player
5+
6+ /* *
7+ * @author Niklas Nieberler
8+ */
9+
10+ class VelocityPermissionChecker : PermissionChecker <Player > {
11+
12+ override fun checkPermission (player : Player , name : String ): Boolean {
13+ return player.hasPermission(name)
14+ }
15+
16+ }
You can’t perform that action at this time.
0 commit comments