Skip to content

Commit c9d1787

Browse files
authored
Merge pull request #23 from SLNE-Development/feat/new-prefixes
Feat/new prefixes
2 parents b650434 + b4850e4 commit c9d1787

File tree

85 files changed

+372
-371
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+372
-371
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
uses: actions/setup-java@v4
4141
with:
4242
distribution: 'graalvm'
43-
java-version: '24'
43+
java-version: '25'
4444

4545
- name: Build all modules with Gradle
4646
run: ./gradlew build shadowJar --parallel --no-scan

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
kotlin.code.style=official
22
kotlin.stdlib.default.dependency=false
33
org.gradle.parallel=true
4-
version=1.21.11-2.0.9-SNAPSHOT
4+
version=1.21.11-2.0.10-SNAPSHOT

src/main/kotlin/dev/slne/surf/essentials/command/BackCommand.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@ fun backCommand() = commandTree("back") {
1111
playerExecutor { player, _ ->
1212
val lastLocation = lastLocationService.getLatestLocation(player.uniqueId) ?: run {
1313
player.sendText {
14-
appendPrefix()
14+
appendErrorPrefix()
1515
error("Du besitzt keinen letzten Standort.")
1616
}
1717
return@playerExecutor
1818
}
1919

2020
player.sendText {
21-
appendPrefix()
21+
appendInfoPrefix()
2222
info("Du wirst zu deinem letzten Standort teleportiert...")
2323
}
2424

2525
player.teleportAsync(lastLocation).thenRun {
2626
player.sendText {
27-
appendPrefix()
27+
appendSuccessPrefix()
2828
success("Du wurdest zu deinem letzten Standort teleportiert.")
2929
}
3030
}

src/main/kotlin/dev/slne/surf/essentials/command/BroadcastCommand.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fun broadcastCommand() = commandTree("broadcast") {
1919
server.broadcast(component)
2020

2121
executor.sendText {
22-
appendPrefix()
22+
appendSuccessPrefix()
2323
success("Die Nachricht wurde an alle Spieler gesendet.")
2424
}
2525
}
@@ -35,7 +35,7 @@ fun broadcastCommand() = commandTree("broadcast") {
3535
forEachPlayer { it.sendActionBar(component) }
3636

3737
executor.sendText {
38-
appendPrefix()
38+
appendSuccessPrefix()
3939
success("Die Nachricht wurde an alle Spieler gesendet.")
4040
}
4141
}
@@ -69,7 +69,7 @@ fun broadcastCommand() = commandTree("broadcast") {
6969
}
7070

7171
executor.sendText {
72-
appendPrefix()
72+
appendSuccessPrefix()
7373
success("Die Nachricht wurde an alle Spieler gesendet.")
7474
}
7575
}

src/main/kotlin/dev/slne/surf/essentials/command/ChangeSlotCommand.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ fun changeSlotCommand() = commandTree("changeslot") {
1616
Bukkit.getServer().maxPlayers = amount
1717

1818
executor.sendText {
19-
appendPrefix()
19+
appendSuccessPrefix()
2020
success("Die maximale Spieleranzahl wurde auf ")
2121
variableValue(amount)
2222
success(" gesetzt.")

src/main/kotlin/dev/slne/surf/essentials/command/EffectCommand.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ fun effectCommand() = commandTree("effect") {
2020
playerExecutor { player, _ ->
2121
if (player.activePotionEffects.isEmpty()) {
2222
player.sendText {
23-
appendPrefix()
23+
appendErrorPrefix()
2424
error("Du hast keine aktiven Effekte.")
2525
}
2626
return@playerExecutor
2727
}
2828

2929
player.sendText {
30-
appendPrefix()
30+
appendInfoPrefix()
3131
info("Du hast aktuell ")
3232
variableValue(player.activePotionEffects.size)
3333
info(" aktive Effekte: ")
@@ -72,7 +72,7 @@ fun effectCommand() = commandTree("effect") {
7272
}
7373

7474
executor.sendText {
75-
appendPrefix()
75+
appendSuccessPrefix()
7676
success("Du hast ")
7777
translatable(effect.translationKey()).colorIfAbsent(Colors.VARIABLE_VALUE)
7878
success(" für ")
@@ -99,7 +99,7 @@ fun effectCommand() = commandTree("effect") {
9999
playerExecutor { player, _ ->
100100
if (player.activePotionEffects.isEmpty()) {
101101
player.sendText {
102-
appendPrefix()
102+
appendErrorPrefix()
103103
error("Du hast keine aktiven Effekte.")
104104
}
105105
return@playerExecutor
@@ -108,7 +108,7 @@ fun effectCommand() = commandTree("effect") {
108108
player.clearActivePotionEffects()
109109

110110
player.sendText {
111-
appendPrefix()
111+
appendSuccessPrefix()
112112
success("Du hast alle deine Effekte entfernt.")
113113
}
114114
}
@@ -122,7 +122,7 @@ fun effectCommand() = commandTree("effect") {
122122
}
123123

124124
executor.sendText {
125-
appendPrefix()
125+
appendSuccessPrefix()
126126
success("Du hast alle Effekte von ")
127127

128128
if (players.size == 1) {
@@ -145,7 +145,7 @@ fun effectCommand() = commandTree("effect") {
145145
}
146146

147147
executor.sendText {
148-
appendPrefix()
148+
appendSuccessPrefix()
149149
success("Du hast den Effekt ")
150150
translatable(effect.translationKey()).colorIfAbsent(Colors.VARIABLE_VALUE)
151151
success(" von ")

src/main/kotlin/dev/slne/surf/essentials/command/FillstackCommand.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fun fillStackCommand() = commandTree("fillstack") {
1212

1313
if (itemInHand.isEmpty) {
1414
player.sendText {
15-
appendPrefix()
15+
appendErrorPrefix()
1616
error("Du musst ein Item in der Hand halten.")
1717
}
1818
return@playerExecutor
@@ -21,7 +21,7 @@ fun fillStackCommand() = commandTree("fillstack") {
2121
itemInHand.amount = itemInHand.maxStackSize
2222

2323
player.sendText {
24-
appendPrefix()
24+
appendSuccessPrefix()
2525
success("Der Item wurde aufgefüllt.")
2626
}
2727
}

src/main/kotlin/dev/slne/surf/essentials/command/FlyCommand.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ fun flyCommand() = commandTree("fly") {
1414

1515

1616
player.sendText {
17-
appendPrefix()
17+
appendSuccessPrefix()
1818
success("Du kannst nun nicht mehr fliegen.")
1919
}
2020
} else {
2121
player.allowFlight = true
2222
player.isFlying = true
2323

2424
player.sendText {
25-
appendPrefix()
25+
appendSuccessPrefix()
2626
success("Du kannst nun fliegen.")
2727
}
2828
}
@@ -38,27 +38,27 @@ fun flyCommand() = commandTree("fly") {
3838

3939

4040
executor.sendText {
41-
appendPrefix()
41+
appendSuccessPrefix()
4242
variableValue(player.name)
4343
success(" kann nun nicht mehr fliegen.")
4444
}
4545

4646
player.sendText {
47-
appendPrefix()
47+
appendSuccessPrefix()
4848
success("Du kannst nun nicht mehr fliegen.")
4949
}
5050
} else {
5151
player.allowFlight = true
5252
player.isFlying = true
5353

5454
executor.sendText {
55-
appendPrefix()
55+
appendSuccessPrefix()
5656
variableValue(player.name)
5757
success(" kann nun fliegen.")
5858
}
5959

6060
player.sendText {
61-
appendPrefix()
61+
appendSuccessPrefix()
6262
success("Du kannst nun fliegen.")
6363
}
6464
}

src/main/kotlin/dev/slne/surf/essentials/command/GameModeOfflineCommand.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ fun gameModeOfflineCommand() = commandTree("gamemodeoffline") {
3030

3131
player.setOfflineGameMode(gameMode)
3232
executor.sendText {
33-
appendPrefix()
33+
appendSuccessPrefix()
3434
success("Der Spielmodus von ")
3535
variableValue(player.name ?: target)
3636
success(" wurde zu ")

src/main/kotlin/dev/slne/surf/essentials/command/GodCommand.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ fun godCommand() = commandTree("god") {
1111
player.isInvulnerable = !player.isInvulnerable
1212

1313
player.sendText {
14-
appendPrefix()
14+
appendSuccessPrefix()
1515
success("Du bist nun ")
1616

1717
if (player.isInvulnerable) {
@@ -30,7 +30,7 @@ fun godCommand() = commandTree("god") {
3030
player.isInvulnerable = !player.isInvulnerable
3131

3232
executor.sendText {
33-
appendPrefix()
33+
appendSuccessPrefix()
3434
variableValue(player.name)
3535
success(" ist nun ")
3636

@@ -42,7 +42,7 @@ fun godCommand() = commandTree("god") {
4242
}
4343

4444
player.sendText {
45-
appendPrefix()
45+
appendSuccessPrefix()
4646
success("Du bist nun ")
4747

4848
if (player.isInvulnerable) {

0 commit comments

Comments
 (0)