@@ -27,7 +27,7 @@ object CommandSounds : CommandExpression {
27
27
override val command = subCommand {
28
28
dynamic (optional = true ) {
29
29
suggestion<Player >(uncheck = true ) { _, _ ->
30
- XSound .values() .map { it.name }
30
+ XSound .values.map { it.name() }
31
31
}
32
32
33
33
execute<Player > { sender, _, argument ->
@@ -40,7 +40,7 @@ object CommandSounds : CommandExpression {
40
40
}
41
41
42
42
private fun open (player : Player , page : Int , filter : String? ) {
43
- val sounds = XSound .values() .filter { filter == null || it.name.contains(filter, true ) }.sorted().let {
43
+ val sounds = XSound .values.filter { filter == null || it.name() .contains(filter, true ) }.sorted().let {
44
44
it.subList(54 * page, it.size)
45
45
}
46
46
@@ -57,7 +57,7 @@ object CommandSounds : CommandExpression {
57
57
receptacle.setElement(CTRL , ctrl)
58
58
59
59
slotMap.forEach { (slot, index) ->
60
- receptacle.setElement(DISPLAY (sounds[index].name), slot)
60
+ receptacle.setElement(DISPLAY (sounds[index].name() ), slot)
61
61
}
62
62
63
63
receptacle.onOpen = { player, _ ->
@@ -88,7 +88,7 @@ object CommandSounds : CommandExpression {
88
88
ReceptacleClickType .DROP -> sound.play(player, 1f , 0f )
89
89
ReceptacleClickType .LEFT -> sound.play(player, 1f , 1f )
90
90
ReceptacleClickType .RIGHT -> sound.play(player, 1f , 2f )
91
- ReceptacleClickType .MIDDLE -> player.sendLang(" Menu-Internal-Sounds-Copy" , sound.name)
91
+ ReceptacleClickType .MIDDLE -> player.sendLang(" Menu-Internal-Sounds-Copy" , sound.name() )
92
92
else -> {
93
93
}
94
94
}
0 commit comments