We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 167dbf1 commit 910ba9bCopy full SHA for 910ba9b
1 file changed
scripts/coreMindustry/menu.kts
@@ -1,5 +1,7 @@
1
package coreMindustry
2
3
+import coreLibrary.lib.Commands.Hidden
4
+
5
data class MenuChooseEvent(
6
val player: Player, val menuId: Int, val value: Int
7
) : Event, ReceivedEvent {
@@ -22,7 +24,9 @@ onEnable {
22
24
val player = player ?: return@impl
23
25
26
var commands = cmds.subCommands().values.toSet().sortedBy { it.name }
- if (!showAll) commands = commands.filter { info -> info.attrs.all { it.visible(this) } }
27
+ if (!showAll) commands = commands.filter { info ->
28
+ info.attrs.all { it !is Hidden || it.visible() }
29
+ }
30
MenuV2(player) {
31
title = if (prefix.isEmpty()) "Help" else "Help: $prefix"
32
msg = "点击选项将直接执行指令"
0 commit comments