You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (state.rules.mode() !in arrayOf(Gamemode.survival, Gamemode.attack) && (!allowPvp || state.rules.pvp))
27
+
returnReply("[red]当前模式禁用".with())
28
+
if (player!!.dead)
29
+
returnReply("[red]你已死亡".with())
30
+
if (coolDown !=null) {
31
+
val id =PlayerData[player!!.uuid].profile?.id?.value ?:0
32
+
val key ="${name}@$id"
33
+
if (key in used) {
34
+
if (coolDown <0)
35
+
returnReply("[red]该技能每局限用一次".with())
36
+
elseif (used[key]!!>=System.currentTimeMillis())
37
+
returnReply("[red]技能冷却,还剩{time:秒}".with("time" to Duration.ofMillis(used[key]!!-System.currentTimeMillis())))
38
+
}
39
+
used[key] =System.currentTimeMillis() + coolDown
47
40
}
41
+
body(body)
48
42
}
49
-
used[key] =System.currentTimeMillis() + coolDown
50
43
}
51
44
}
52
45
53
46
fun Player.broadcastSkill(skill:String) = broadcast("[yellow][技能][green]{player.name}[white]使用了[green]{skill}[white]技能.".with("player" to this, "skill" to skill), quite =true)
0 commit comments