Skip to content

Commit 6fa6c40

Browse files
committed
🚑️(wayzer/user/ext/skills) CommandApi更新
1 parent 2187adb commit 6fa6c40

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎scripts/wayzer/user/ext/skills.kts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,14 @@ companion object Api {
6868
@ScriptDsl
6969
fun Script.skill(name: String, desc: String, vararg aliases: String, body: SkillScope.() -> Unit) {
7070
skills += CommandInfo(this, name, desc) {
71-
permission = "wayzer.user.skills.$name"
71+
attr(RequirePermission("wayzer.user.skills.$name"))
72+
attr(ClientOnly)
7273
this.aliases = aliases.toList()
73-
type = CommandType.Client
7474
body {
7575
@Suppress("MemberVisibilityCanBePrivate")
7676
if (player!!.dead())
7777
returnReply("[red]你已死亡".with())
78-
SkillScope(name, player!!, this).body()
78+
SkillScope(name, player!!, context).body()
7979
}
8080
}
8181
}

0 commit comments

Comments
 (0)