File tree Expand file tree Collapse file tree
src/main/kotlin/dev/slne/surf/essentials Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11kotlin.code.style =official
22kotlin.stdlib.default.dependency =false
33org.gradle.parallel =true
4- version =26.1.1-3.1 .0-SNAPSHOT
4+ version =26.1.1-3.2 .0-SNAPSHOT
Original file line number Diff line number Diff line change @@ -76,5 +76,6 @@ object PaperCommandManager {
7676 skinChangeCommand()
7777 worldCommand()
7878 pingCommand()
79+ echestCommand()
7980 }
8081}
Original file line number Diff line number Diff line change 1+ package dev.slne.surf.essentials.command
2+ import dev.jorel.commandapi.kotlindsl.*
3+ import dev.slne.surf.api.core.messages.adventure.sendText
4+ import dev.slne.surf.essentials.util.permission.EssentialsPermissionRegistry
5+ import org.bukkit.entity.Player
6+
7+ fun echestCommand () = commandTree(" echest" ) {
8+ withPermission(EssentialsPermissionRegistry .ECHEST_COMMAND )
9+ playerExecutor { player, _ ->
10+ player.openInventory(player.enderChest)
11+ player.sendText {
12+ appendSuccessPrefix()
13+ success(" Du hast deine Endertruhe geöffnet." )
14+ }
15+ }
16+ entitySelectorArgumentOnePlayer(" player" ) {
17+ withPermission(EssentialsPermissionRegistry .ECHEST_COMMAND_OTHERS )
18+ playerExecutor { executor, args ->
19+ val player: Player by args
20+ executor.openInventory(player.enderChest)
21+ executor.sendText {
22+ appendSuccessPrefix()
23+ success(" Du hast die Endertruhe von " )
24+ variableValue(player.name)
25+ success(" geöffnet." )
26+ }
27+ }
28+ }
29+ }
Original file line number Diff line number Diff line change @@ -115,4 +115,6 @@ object EssentialsPermissionRegistry : PermissionRegistry() {
115115 val WORLD_BYPASS = create(" $PREFIX .world.bypass" )
116116 val PING_COMMAND = create(" $PREFIX .ping.command" )
117117 val PING_COMMAND_OTHER = create(" $PREFIX .ping.command.other" )
118+ val ECHEST_COMMAND = create(" $PREFIX .echest.command" )
119+ val ECHEST_COMMAND_OTHERS = create(" $PREFIX .echest.command.others" )
118120}
You can’t perform that action at this time.
0 commit comments