From 2035c0a186e5891df6beb9e027b1ac5571335b30 Mon Sep 17 00:00:00 2001 From: Martin Sulikowski Date: Sun, 19 Jan 2025 16:48:53 +0100 Subject: [PATCH] Make config's great again. --- .../argument/messages/ArgumentMessages.java | 24 + .../argument/messages/ENArgumentMessages.java | 37 ++ .../argument/messages/PLArgumentMessages.java | 38 ++ .../adminchat/messages/AdminChatSection.java | 7 + .../messages/ENAdminChatMessages.java | 16 + .../messages/PLAdminChatMessages.java | 17 + .../automessage/AutoMessageRepository.java | 2 +- .../automessage/AutoMessageService.java | 5 +- .../messages/AutoMessageMessages.java | 11 + .../messages/ENAutoMessageMessages.java | 55 +++ .../messages/PLAutoMessageMessages.java | 54 +++ .../helpop/messages/ENHelpOpMessages.java | 20 + .../helpop/messages/HelpOpSection.java | 9 + .../helpop/messages/PLHelpOpMessages.java | 20 + .../feature/home/messages/ENHomeMessages.java | 43 ++ .../feature/home/messages/HomeMessages.java | 19 + .../feature/home/messages/PLHomeMessages.java | 44 ++ .../feature/jail/messages/ENJailMessages.java | 51 +++ .../feature/jail/messages/JailMessages.java | 28 ++ .../feature/jail/messages/PLJailMessages.java | 48 ++ .../messages/ENPrivateMessages.java | 51 +++ .../messages/PLPrivateChatMessages.java | 52 +++ .../messages/PrivateChatMessages.java | 22 + .../messages/ENRandomTeleportMessages.java | 33 ++ .../messages/PLRandomTeleportMessages.java | 34 ++ .../messages/RandomTeleportMessages.java | 11 + .../spawn/messages/ENSpawnMessages.java | 21 + .../spawn/messages/PLSpawnMessages.java | 21 + .../feature/spawn/messages/SpawnMessages.java | 12 + .../{essentials => sudo}/SudoCommand.java | 4 +- .../feature/sudo/messages/ENSudoMessages.java | 18 + .../feature/sudo/messages/PLSudoMessages.java | 18 + .../feature/sudo/messages/SudoMessages.java | 8 + .../messages/ENTeleportRequestMessages.java | 67 +++ .../messages/PLTeleportRequestMessages.java | 66 +++ .../messages/TeleportRequestMessages.java | 21 + .../messages/ENTimeAndWeatherMessages.java | 26 ++ .../messages/PLTimeAndWeatherMessages.java | 26 ++ .../time/messages/TimeAndWeatherMessages.java | 15 + .../core/feature/warp/WarpInventory.java | 9 +- .../feature/warp/messages/ENWarpMessages.java | 86 ++++ .../feature/warp/messages/PLWarpMessages.java | 86 ++++ .../feature/warp/messages/WarpMessages.java | 77 ++++ .../core/translation/Translation.java | 347 +++------------ .../core/translation/TranslationManager.java | 2 - .../implementation/ENTranslation.java | 414 ++--------------- .../implementation/PLTranslation.java | 416 ++---------------- 47 files changed, 1432 insertions(+), 1079 deletions(-) create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/bridge/litecommand/argument/messages/ArgumentMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/bridge/litecommand/argument/messages/ENArgumentMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/bridge/litecommand/argument/messages/PLArgumentMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/adminchat/messages/AdminChatSection.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/adminchat/messages/ENAdminChatMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/adminchat/messages/PLAdminChatMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/automessage/messages/AutoMessageMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/automessage/messages/ENAutoMessageMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/automessage/messages/PLAutoMessageMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/helpop/messages/ENHelpOpMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/helpop/messages/HelpOpSection.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/helpop/messages/PLHelpOpMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/home/messages/ENHomeMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/home/messages/HomeMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/home/messages/PLHomeMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/jail/messages/ENJailMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/jail/messages/JailMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/jail/messages/PLJailMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/privatechat/messages/ENPrivateMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/privatechat/messages/PLPrivateChatMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/privatechat/messages/PrivateChatMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/randomteleport/messages/ENRandomTeleportMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/randomteleport/messages/PLRandomTeleportMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/randomteleport/messages/RandomTeleportMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/spawn/messages/ENSpawnMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/spawn/messages/PLSpawnMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/spawn/messages/SpawnMessages.java rename eternalcore-core/src/main/java/com/eternalcode/core/feature/{essentials => sudo}/SudoCommand.java (97%) create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/sudo/messages/ENSudoMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/sudo/messages/PLSudoMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/sudo/messages/SudoMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/teleportrequest/messages/ENTeleportRequestMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/teleportrequest/messages/PLTeleportRequestMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/teleportrequest/messages/TeleportRequestMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/time/messages/ENTimeAndWeatherMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/time/messages/PLTimeAndWeatherMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/time/messages/TimeAndWeatherMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/messages/ENWarpMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/messages/PLWarpMessages.java create mode 100644 eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/messages/WarpMessages.java diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/bridge/litecommand/argument/messages/ArgumentMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/bridge/litecommand/argument/messages/ArgumentMessages.java new file mode 100644 index 000000000..e9dfcf7ca --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/bridge/litecommand/argument/messages/ArgumentMessages.java @@ -0,0 +1,24 @@ +package com.eternalcode.core.bridge.litecommand.argument.messages; + +import com.eternalcode.multification.notice.Notice; + +public interface ArgumentMessages { + Notice missingPlayerName(); + Notice permissionMessage(); + Notice usageMessage(); + Notice usageMessageHead(); + Notice usageMessageEntry(); + Notice offlinePlayer(); + Notice onlyPlayer(); + Notice numberBiggerThanOrEqualZero(); + Notice noItem(); + Notice noArgument(); + Notice noDamaged(); + Notice noDamagedItems(); + Notice noEnchantment(); + Notice noValidEnchantmentLevel(); + Notice invalidTimeFormat(); + Notice worldDoesntExist(); + Notice incorrectNumberOfChunks(); + Notice incorrectLocation(); +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/bridge/litecommand/argument/messages/ENArgumentMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/bridge/litecommand/argument/messages/ENArgumentMessages.java new file mode 100644 index 000000000..b2601e636 --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/bridge/litecommand/argument/messages/ENArgumentMessages.java @@ -0,0 +1,37 @@ +package com.eternalcode.core.bridge.litecommand.argument.messages; + +import com.eternalcode.multification.notice.Notice; +import lombok.Getter; +import lombok.experimental.Accessors; +import net.dzikoysk.cdn.entity.Contextual; +import net.dzikoysk.cdn.entity.Description; + +@Getter +@Accessors(fluent = true) +@Contextual +public class ENArgumentMessages implements ArgumentMessages { + @Description("# {PERMISSIONS} - Required permission") + public Notice permissionMessage = Notice.chat("You don't have permission to perform this command! ({PERMISSIONS})"); + + @Description({" ", "# {USAGE} - Correct usage"}) + public Notice usageMessage = Notice.chat("Correct usage: {USAGE}"); + public Notice usageMessageHead = Notice.chat("Correct usage:"); + public Notice usageMessageEntry = Notice.chat("{USAGE}"); + + @Description(" ") + public Notice missingPlayerName = Notice.chat("You must provide a player name!"); + public Notice offlinePlayer = Notice.chat("This player is currently offline!"); + public Notice onlyPlayer = Notice.chat("Command is only for players!"); + public Notice numberBiggerThanOrEqualZero = Notice.chat("The number must be greater than or equal to 0!"); + public Notice noItem = Notice.chat("You need item to use this command!"); + public Notice noMaterial = Notice.chat("This item doesn't exist"); + public Notice noArgument = Notice.chat("This argument doesn't exist"); + public Notice noDamaged = Notice.chat("This item can't be repaired"); + public Notice noDamagedItems = Notice.chat("You need damaged items to use this command!"); + public Notice noEnchantment = Notice.chat("This enchantment doesn't exist"); + public Notice noValidEnchantmentLevel = Notice.chat("This enchantment level is not supported!"); + public Notice invalidTimeFormat = Notice.chat("Invalid time format!"); + public Notice worldDoesntExist = Notice.chat("World {WORLD} doesn't exist!"); + public Notice incorrectNumberOfChunks = Notice.chat("Incorrect number of chunks!"); + public Notice incorrectLocation = Notice.chat("Incorrect location format! ({LOCATION})"); +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/bridge/litecommand/argument/messages/PLArgumentMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/bridge/litecommand/argument/messages/PLArgumentMessages.java new file mode 100644 index 000000000..b954f265d --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/bridge/litecommand/argument/messages/PLArgumentMessages.java @@ -0,0 +1,38 @@ +package com.eternalcode.core.bridge.litecommand.argument.messages; + +import com.eternalcode.multification.notice.Notice; +import lombok.Getter; +import lombok.experimental.Accessors; +import net.dzikoysk.cdn.entity.Contextual; +import net.dzikoysk.cdn.entity.Description; + +@Getter +@Accessors(fluent = true) +@Contextual +public class PLArgumentMessages implements ArgumentMessages { + @Description("# {PERMISSIONS} - Wyświetla wymagane uprawnienia") + public Notice permissionMessage = + Notice.chat("Nie masz uprawnień do tej komendy! ({PERMISSIONS})"); + + @Description({" ", "# {USAGE} - Wyświetla poprawne użycie komendy"}) + public Notice usageMessage = Notice.chat("Poprawne użycie: {USAGE}"); + public Notice usageMessageHead = Notice.chat("Poprawne użycie:"); + public Notice usageMessageEntry = Notice.chat("{USAGE}"); + + @Description(" ") + public Notice missingPlayerName = Notice.chat("Musisz podać nazwę gracza!"); + public Notice offlinePlayer = Notice.chat("Ten gracz jest obecnie offline!"); + public Notice onlyPlayer = Notice.chat("Ta komenda jest dostępna tylko dla graczy!"); + public Notice numberBiggerThanOrEqualZero = Notice.chat("Liczba musi być równa lub większa od 0!"); + public Notice noItem = Notice.chat("Musisz trzymać przedmiot w dłoni!"); + public Notice noMaterial = Notice.chat("Taki materiał nie istnieje!"); + public Notice noArgument = Notice.chat("Taki argument nie istnieje!"); + public Notice noDamaged = Notice.chat("Ten przedmiot nie może być naprawiony!"); + public Notice noDamagedItems = Notice.chat("Musisz posiadać uszkodzone przedmioty!"); + public Notice noEnchantment = Notice.chat("Takie zaklęcie nie istnieje!"); + public Notice noValidEnchantmentLevel = Notice.chat("Ten poziom zaklęcia nie jest wspierany!"); + public Notice invalidTimeFormat = Notice.chat("Nieprawidłowy format czasu!"); + public Notice worldDoesntExist = Notice.chat("Świat {WORLD} nie istnieje!"); + public Notice incorrectNumberOfChunks = Notice.chat("Niepoprawna liczba chunków!"); + public Notice incorrectLocation = Notice.chat("Niepoprawna lokalizacja! ({LOCATION})"); +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/adminchat/messages/AdminChatSection.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/adminchat/messages/AdminChatSection.java new file mode 100644 index 000000000..590b6f6b0 --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/adminchat/messages/AdminChatSection.java @@ -0,0 +1,7 @@ +package com.eternalcode.core.feature.adminchat.messages; + +import com.eternalcode.multification.notice.Notice; + +public interface AdminChatSection { + Notice format(); +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/adminchat/messages/ENAdminChatMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/adminchat/messages/ENAdminChatMessages.java new file mode 100644 index 000000000..af2d01d8b --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/adminchat/messages/ENAdminChatMessages.java @@ -0,0 +1,16 @@ +package com.eternalcode.core.feature.adminchat.messages; + +import com.eternalcode.multification.notice.Notice; +import lombok.Getter; +import lombok.experimental.Accessors; +import net.dzikoysk.cdn.entity.Contextual; +import net.dzikoysk.cdn.entity.Description; + +@Getter +@Accessors(fluent = true) +@Contextual +public class ENAdminChatMessages implements AdminChatSection { + @Description({"# {PLAYER} - Player who sent message on adminchat, {TEXT} - message"}) + public Notice format = + Notice.chat("[AdminChat] {PLAYER}: {TEXT}"); +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/adminchat/messages/PLAdminChatMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/adminchat/messages/PLAdminChatMessages.java new file mode 100644 index 000000000..a61771c94 --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/adminchat/messages/PLAdminChatMessages.java @@ -0,0 +1,17 @@ +package com.eternalcode.core.feature.adminchat.messages; + +import com.eternalcode.multification.notice.Notice; +import lombok.Getter; +import lombok.experimental.Accessors; +import net.dzikoysk.cdn.entity.Contextual; +import net.dzikoysk.cdn.entity.Description; + +@Getter +@Accessors(fluent = true) +@Contextual +public class PLAdminChatMessages implements AdminChatSection { + @Description({ + "# {PLAYER} - Gracz który wysłał wiadomość na czacie administracji, {TEXT} - Treść wysłanej wiadomości"}) + public Notice format = + Notice.chat("[Administracja] {PLAYER}: {TEXT}"); +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/automessage/AutoMessageRepository.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/automessage/AutoMessageRepository.java index aefb02e2e..d78125e10 100644 --- a/eternalcore-core/src/main/java/com/eternalcode/core/feature/automessage/AutoMessageRepository.java +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/automessage/AutoMessageRepository.java @@ -9,7 +9,7 @@ interface AutoMessageRepository { CompletableFuture> findReceivers(Set onlineUniqueIds); - // for nearby feafure like placeholders etc + // for nearby feature like placeholders etc CompletableFuture isReceiving(UUID uniqueId); CompletableFuture switchReceiving(UUID uniqueId); diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/automessage/AutoMessageService.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/automessage/AutoMessageService.java index 6f6bae5b0..a54da762c 100644 --- a/eternalcore-core/src/main/java/com/eternalcode/core/feature/automessage/AutoMessageService.java +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/automessage/AutoMessageService.java @@ -7,7 +7,7 @@ import com.eternalcode.core.injector.annotations.Inject; import com.eternalcode.core.injector.annotations.component.Service; import com.eternalcode.core.notice.NoticeService; -import com.eternalcode.core.translation.Translation; +import com.eternalcode.core.feature.automessage.messages.AutoMessageMessages; import com.eternalcode.multification.notice.Notice; import java.util.Collection; import java.util.Optional; @@ -18,7 +18,6 @@ import java.util.stream.Collectors; import org.bukkit.Server; import org.bukkit.entity.Entity; -import panda.std.reactive.Completable; @FeatureDocs(name = "AutoMessage", description = "Automatically sends messages to players at a given time interval.") @Service @@ -86,7 +85,7 @@ private void tick() { } } - private Optional nextAutoMessage(Translation.AutoMessageSection messageSection) { + private Optional nextAutoMessage(AutoMessageMessages messageSection) { Collection messages = messageSection.messages(); if (messages.isEmpty()) { diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/automessage/messages/AutoMessageMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/automessage/messages/AutoMessageMessages.java new file mode 100644 index 000000000..e9065e8e2 --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/automessage/messages/AutoMessageMessages.java @@ -0,0 +1,11 @@ +package com.eternalcode.core.feature.automessage.messages; + +import com.eternalcode.multification.notice.Notice; +import java.util.Collection; + +public interface AutoMessageMessages { + Collection messages(); + + Notice enabled(); + Notice disabled(); +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/automessage/messages/ENAutoMessageMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/automessage/messages/ENAutoMessageMessages.java new file mode 100644 index 000000000..dddae8316 --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/automessage/messages/ENAutoMessageMessages.java @@ -0,0 +1,55 @@ +package com.eternalcode.core.feature.automessage.messages; + +import com.eternalcode.multification.bukkit.notice.BukkitNotice; +import com.eternalcode.multification.notice.Notice; +import java.util.Collection; +import java.util.Map; +import lombok.Getter; +import lombok.experimental.Accessors; +import net.dzikoysk.cdn.entity.Contextual; +import net.dzikoysk.cdn.entity.Description; +import org.bukkit.Sound; + +@Getter +@Accessors(fluent = true) +@Contextual +public class ENAutoMessageMessages implements AutoMessageMessages { + + @Description({ + "", + "# If you want to useplaceholder %server_online% you need to install", + "# PlaceholderAPI plugin and download placeholders for Server", + "# like /papi ecloud download Server", + }) + public Map messages = Map.of( + "1", BukkitNotice.builder() + .actionBar("» There are %server_online% people online on the server!") + .sound(Sound.ITEM_ARMOR_EQUIP_IRON, 1.0f, 1.0f) + .build(), + + "2", BukkitNotice.builder() + .chat("» You need help from an admin?") + .chat("» Type command /helpop to ask!") + .chat("» Click to execute!") + .sound(Sound.BLOCK_ANVIL_BREAK, 1.0f, 1.0f) + .build() + ); + + public Notice enabled = Notice.chat("Enabled auto messages!"); + public Notice disabled = Notice.chat("Disabled auto messages!"); + + @Override + public Collection messages() { + return this.messages.values(); + } + + @Override + public Notice enabled() { + return this.enabled; + } + + @Override + public Notice disabled() { + return this.disabled; + } +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/automessage/messages/PLAutoMessageMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/automessage/messages/PLAutoMessageMessages.java new file mode 100644 index 000000000..8274161e6 --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/automessage/messages/PLAutoMessageMessages.java @@ -0,0 +1,54 @@ +package com.eternalcode.core.feature.automessage.messages; + +import com.eternalcode.multification.bukkit.notice.BukkitNotice; +import com.eternalcode.multification.notice.Notice; +import java.util.Collection; +import java.util.Map; +import lombok.Getter; +import lombok.experimental.Accessors; +import net.dzikoysk.cdn.entity.Contextual; +import net.dzikoysk.cdn.entity.Description; +import org.bukkit.Sound; + +@Getter +@Accessors(fluent = true) +@Contextual +public class PLAutoMessageMessages implements AutoMessageMessages { + @Description({ + "", + "# Jeżeli chcesz użyć placeholder'a %server_online% musisz zainstalować plugin", + "# PlaceholderAPI oraz pobrać placeholdery dla Server'a", + "# za pomocą komendy /papi ecloud download Server", + }) + public Map messages = Map.of( + "1", BukkitNotice.builder() + .actionBar("» Na serwerze jest: %server_online% graczy online!") + .sound(Sound.ITEM_ARMOR_EQUIP_IRON, 1.0f, 1.0f) + .build(), + + "2", BukkitNotice.builder() + .chat("» Potrzebujesz pomocy od admina?") + .chat("» Użyj komendy /helpop aby zgłosić problem!") + .chat("» Kliknij aby wykonać!") + .sound(Sound.BLOCK_ANVIL_BREAK, 1.0f, 1.0f) + .build() + ); + + public Notice enabled = Notice.chat("Włączono automatyczne wiadomości!"); + public Notice disabled = Notice.chat("Wyłączono automatyczne wiadomości!"); + + @Override + public Collection messages() { + return this.messages.values(); + } + + @Override + public Notice enabled() { + return this.enabled; + } + + @Override + public Notice disabled() { + return this.disabled; + } +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/helpop/messages/ENHelpOpMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/helpop/messages/ENHelpOpMessages.java new file mode 100644 index 000000000..99c45b643 --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/helpop/messages/ENHelpOpMessages.java @@ -0,0 +1,20 @@ +package com.eternalcode.core.feature.helpop.messages; + +import com.eternalcode.multification.notice.Notice; +import lombok.Getter; +import lombok.experimental.Accessors; +import net.dzikoysk.cdn.entity.Contextual; +import net.dzikoysk.cdn.entity.Description; + +@Getter +@Accessors(fluent = true) +@Contextual +public class ENHelpOpMessages implements HelpOpSection { + @Description("# {PLAYER} - Player who send message on /helpop, {TEXT} - message") + public Notice format = + Notice.chat("[HelpOp] {PLAYER}: {TEXT}"); + @Description(" ") + public Notice send = Notice.chat("This message has been successfully sent to administration"); + @Description("# {TIME} - Time to next use (cooldown)") + public Notice helpOpDelay = Notice.chat("You can use this command for: {TIME}"); +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/helpop/messages/HelpOpSection.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/helpop/messages/HelpOpSection.java new file mode 100644 index 000000000..5c1c8c84f --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/helpop/messages/HelpOpSection.java @@ -0,0 +1,9 @@ +package com.eternalcode.core.feature.helpop.messages; + +import com.eternalcode.multification.notice.Notice; + +public interface HelpOpSection { + Notice format(); + Notice send(); + Notice helpOpDelay(); +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/helpop/messages/PLHelpOpMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/helpop/messages/PLHelpOpMessages.java new file mode 100644 index 000000000..65994359c --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/helpop/messages/PLHelpOpMessages.java @@ -0,0 +1,20 @@ +package com.eternalcode.core.feature.helpop.messages; + +import com.eternalcode.multification.notice.Notice; +import lombok.Getter; +import lombok.experimental.Accessors; +import net.dzikoysk.cdn.entity.Contextual; +import net.dzikoysk.cdn.entity.Description; + +@Getter +@Accessors(fluent = true) +@Contextual +public class PLHelpOpMessages implements HelpOpSection { + @Description({"# {PLAYER} - Gracz który wysłał wiadomość na helpop, {TEXT} - Treść wysłanej wiadomości"}) + public Notice format = + Notice.chat("[HelpOp] {PLAYER}: {TEXT}"); + @Description(" ") + public Notice send = Notice.chat("Wiadomość została wysłana do administracji"); + @Description("# {TIME} - Czas do końca blokady (cooldown)") + public Notice helpOpDelay = Notice.chat("Możesz użyć tej komendy dopiero za {TIME}!"); +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/home/messages/ENHomeMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/home/messages/ENHomeMessages.java new file mode 100644 index 000000000..33e772d05 --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/home/messages/ENHomeMessages.java @@ -0,0 +1,43 @@ +package com.eternalcode.core.feature.home.messages; + +import com.eternalcode.multification.notice.Notice; +import lombok.Getter; +import lombok.experimental.Accessors; +import net.dzikoysk.cdn.entity.Contextual; +import net.dzikoysk.cdn.entity.Description; + +@Getter +@Accessors(fluent = true) +@Contextual +public class ENHomeMessages implements HomeMessages { + @Description("# {HOMES} - List of homes (separated by commas)") + public Notice homeList = Notice.chat("Available homes: {HOMES}"); + + @Description({" ", "# {HOME} - Home name"}) + public Notice create = Notice.chat("Home {HOME} has been created."); + public Notice delete = Notice.chat("Home {HOME} has been deleted."); + public Notice overrideHomeLocation = Notice.chat("Home {HOME} has been overridden."); + @Description({" ", "# {LIMIT} - Homes limit"}) + public Notice limit = + Notice.chat("You have reached the limit of homes! Your limit is {LIMIT}."); + public Notice noHomesOwned = Notice.chat("You don't have any homes."); + + @Description({" ", "# Placeholders messages"}) + public String noHomesOwnedPlaceholder = "You don't have any homes."; + + @Description({ + " ", + "# Home Admin Section, you can edit player homes as admin", + "# {HOME} - Home name, {PLAYER} - Player name, {HOMES} - List of homes (separated by commas)" + }) + public Notice overrideHomeLocationAsAdmin = + Notice.chat("Home {HOME} has been overridden for {PLAYER}."); + public Notice playerNoOwnedHomes = + Notice.chat("Player {PLAYER} doesn't have any homes."); + public Notice createAsAdmin = + Notice.chat("Home {HOME} has been created for {PLAYER}."); + public Notice deleteAsAdmin = + Notice.chat("Home {HOME} has been deleted for {PLAYER}."); + public Notice homeListAsAdmin = + Notice.chat("Available homes for {PLAYER}: {HOMES}"); +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/home/messages/HomeMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/home/messages/HomeMessages.java new file mode 100644 index 000000000..15c3584f5 --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/home/messages/HomeMessages.java @@ -0,0 +1,19 @@ +package com.eternalcode.core.feature.home.messages; + +import com.eternalcode.multification.notice.Notice; + +public interface HomeMessages { + Notice homeList(); + Notice create(); + Notice delete(); + Notice limit(); + Notice overrideHomeLocation(); + Notice noHomesOwned(); + String noHomesOwnedPlaceholder(); + + Notice overrideHomeLocationAsAdmin(); + Notice playerNoOwnedHomes(); + Notice createAsAdmin(); + Notice deleteAsAdmin(); + Notice homeListAsAdmin(); +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/home/messages/PLHomeMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/home/messages/PLHomeMessages.java new file mode 100644 index 000000000..9822f96e3 --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/home/messages/PLHomeMessages.java @@ -0,0 +1,44 @@ +package com.eternalcode.core.feature.home.messages; + +import com.eternalcode.multification.notice.Notice; +import lombok.Getter; +import lombok.experimental.Accessors; +import net.dzikoysk.cdn.entity.Contextual; +import net.dzikoysk.cdn.entity.Description; + +@Getter +@Accessors(fluent = true) +@Contextual +public class PLHomeMessages implements HomeMessages { + @Description({" ", "# {HOMES} - Lista domów"}) + public Notice homeList = Notice.chat("Lista domów: {HOMES}!"); + + @Description({" ", "# {HOME} - Nazwa domu"}) + public Notice create = Notice.chat("Stworzono dom o nazwie {HOME}!"); + public Notice delete = Notice.chat("Usunięto dom o nazwie {HOME}!"); + public Notice overrideHomeLocation = + Notice.chat("Nadpisałeś lokalizację domu {HOME}!"); + + @Description({" ", "# {LIMIT} - Limit domów"}) + public Notice limit = Notice.chat("Osiągnąłeś limit domów! Twój limit to {LIMIT}."); + public Notice noHomesOwned = Notice.chat("Nie posiadasz żadnego domu!"); + + @Description({" ", "# Wiadomości placeholderów"}) + public String noHomesOwnedPlaceholder = "Nie posiadasz żadnego domu."; + + @Description({ + " ", + "# Sekcja wiadomości administracyjnych dla domów graczy", + "# {HOME} - Nazwa domu, {PLAYER} - Gracz, {HOMES} - Lista domów" + }) + public Notice overrideHomeLocationAsAdmin = Notice.chat( + "Nadpisałeś lokalizację domu {HOME} dla gracza {PLAYER}!"); + public Notice playerNoOwnedHomes = + Notice.chat("Gracz {PLAYER} nie posiada żadnego domu!"); + public Notice createAsAdmin = + Notice.chat("Stworzono dom {HOME} dla gracza {PLAYER}!"); + public Notice deleteAsAdmin = + Notice.chat("Usunięto dom {HOME} dla gracza {PLAYER}!"); + public Notice homeListAsAdmin = + Notice.chat("Lista domów gracza {PLAYER}: {HOMES}!"); +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/jail/messages/ENJailMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/jail/messages/ENJailMessages.java new file mode 100644 index 000000000..cdddfd044 --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/jail/messages/ENJailMessages.java @@ -0,0 +1,51 @@ +package com.eternalcode.core.feature.jail.messages; + +import com.eternalcode.multification.notice.Notice; +import lombok.Getter; +import lombok.experimental.Accessors; +import net.dzikoysk.cdn.entity.Contextual; +import net.dzikoysk.cdn.entity.Description; + +@Getter +@Accessors(fluent = true) +@Contextual +public class ENJailMessages implements JailMessages { + @Description({" ", "# Section responsible for location of jail setup"}) + public Notice jailLocationSet = Notice.chat("Jail location has been set!"); + public Notice jailLocationRemove = Notice.chat("Jail location has been removed!"); + public Notice jailLocationNotSet = Notice.chat("Jail location is not set!"); + public Notice jailLocationOverride = Notice.chat("Jail location has been overridden!"); + + @Description({" ", "# Section responsible for detaining players"}) + public Notice jailDetainPrivate = Notice.chat("You have been jailed!"); + public Notice jailCannotUseCommand = Notice.chat("You can't use this command! You are in jail!"); + @Description({" ", "# {PLAYER} - Player who has been detained"}) + public Notice jailDetainOverride = + Notice.chat("You have overridden the jail for {PLAYER} !"); + @Description({" ", "# {PLAYER} - Player who has been detained"}) + public Notice jailDetainBroadcast = Notice.chat("Player {PLAYER} has been jailed!"); + @Description({" ", "# {REMAINING_TIME} - Time left to release"}) + public Notice jailDetainCountdown = + Notice.actionbar(" You are in jail! Time left: {REMAINING_TIME}!"); + @Description({" ", "# {PLAYER} - Admin who you can't detain"}) + public Notice jailDetainAdmin = + Notice.chat("You can't jail {PLAYER} because he is an admin!"); + + @Description({" ", "# Section responsible for releasing players from jail"}) + @Description({" ", "# {PLAYER} - Player who has been released from jail"}) + public Notice jailReleaseBroadcast = + Notice.chat("Player {PLAYER} has been granted freedom!"); + public Notice jailReleasePrivate = Notice.actionbar(" You have been released from jail!"); + public Notice jailReleaseAll = Notice.chat("All players have been released from jail!"); + public Notice jailReleaseNoPlayers = Notice.chat("No players found in jail!"); + @Description({" ", "# {PLAYER} - Player nickname"}) + public Notice jailIsNotPrisoner = Notice.chat("Player {PLAYER} is not a prisoner!"); + + @Description({" ", "# Section responsible for listing players in jail"}) + public Notice jailListHeader = Notice.chat("Players in jail: "); + public Notice jailListEmpty = Notice.chat("No players found in jail!"); + @Description({" ", "# {PLAYER} - Player who has been detained", "# {REMAINING_TIME} - Time of detention", + "# {DETAINED_BY} - Player who detained the player"}) + public Notice jailListPlayerEntry = Notice.chat( + "{PLAYER} ({REMAINING_TIME}) detained by {DETAINED_BY} !"); +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/jail/messages/JailMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/jail/messages/JailMessages.java new file mode 100644 index 000000000..992213a98 --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/jail/messages/JailMessages.java @@ -0,0 +1,28 @@ +package com.eternalcode.core.feature.jail.messages; + +import com.eternalcode.multification.notice.Notice; + +public interface JailMessages { + Notice jailLocationSet(); + Notice jailLocationRemove(); + Notice jailLocationNotSet(); + Notice jailLocationOverride(); + + Notice jailDetainBroadcast(); + Notice jailDetainPrivate(); + Notice jailDetainCountdown(); + Notice jailDetainOverride(); + Notice jailDetainAdmin(); + + Notice jailReleaseBroadcast(); + Notice jailReleasePrivate(); + Notice jailReleaseAll(); + Notice jailReleaseNoPlayers(); + Notice jailIsNotPrisoner(); + + Notice jailListHeader(); + Notice jailListEmpty(); + Notice jailListPlayerEntry(); + + Notice jailCannotUseCommand(); +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/jail/messages/PLJailMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/jail/messages/PLJailMessages.java new file mode 100644 index 000000000..251627670 --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/jail/messages/PLJailMessages.java @@ -0,0 +1,48 @@ +package com.eternalcode.core.feature.jail.messages; + +import com.eternalcode.multification.notice.Notice; +import lombok.Getter; +import lombok.experimental.Accessors; +import net.dzikoysk.cdn.entity.Contextual; +import net.dzikoysk.cdn.entity.Description; + +@Getter +@Accessors(fluent = true) +@Contextual +public class PLJailMessages implements JailMessages { + @Description({" ", "# Sekcja odpowiedzialna za ustawianie lokalizacji jail'a"}) + public Notice jailLocationSet = Notice.chat("Ustawiono lokalizację jail'a!"); + public Notice jailLocationRemove = Notice.chat("Usunięto lokalizację jail'a!"); + public Notice jailLocationNotSet = Notice.chat("Lokalizacja jail'a nie została ustawiona!"); + public Notice jailLocationOverride = Notice.chat("Nadpisałeś lokalizację jail'a!"); + + @Description({" ", "# Sekcja odpowiedzialna za wiadomości dotyczące uwięzienia gracza"}) + public Notice jailDetainPrivate = Notice.chat("Zostałeś uwięziony!"); + public Notice jailCannotUseCommand = Notice.chat("Nie możesz użyć tej komendy!"); + @Description({" ", "# {PLAYER} - Gracz który został uwięziony"}) + public Notice jailDetainBroadcast = Notice.chat("Gracz {PLAYER} został uwięziony!"); + @Description({" ", "# {PLAYER} - Gracz który został uwięziony"}) + public Notice jailDetainOverride = + Notice.chat("Napisałeś nadaną karę graczowi {PLAYER}!"); + @Description({" ", "# {REMAINING_TIME} - Pozostały czas do uwolnienia"}) + public Notice jailDetainCountdown = Notice.actionbar("Pozostało {REMAINING_TIME} do uwolnienia!"); + @Description({" ", "# {PLAYER} - Administrator którego nie możesz uwięzić"}) + public Notice jailDetainAdmin = Notice.chat("Nie możesz uwięzić administratora {PLAYER}!"); + + @Description({" ", "# Sekcja odpowiedzialna za wiadomości dotyczące uwolnienia gracza"}) + @Description({" ", "# {PLAYER} - Gracz który został uwolniony"}) + public Notice jailReleaseBroadcast = Notice.chat("Gracz {PLAYER} został uwolniony!"); + public Notice jailReleasePrivate = Notice.actionbar("Zostałeś uwolniony!"); + public Notice jailReleaseAll = Notice.chat("Wszyscy gracze zostali uwolnieni!"); + public Notice jailReleaseNoPlayers = Notice.chat("Nikt nie jest uwięziony!"); + @Description({" ", "# {PLAYER} - Nazwa gracza"}) + public Notice jailIsNotPrisoner = Notice.chat("Gracz {PLAYER} nie jest uwięziony!"); + + @Description({" ", "# Sekcja odpowiedzialna za wiadomości dotyczące listy graczy w jail'u"}) + public Notice jailListHeader = Notice.chat("Lista graczy w jail'u:"); + public Notice jailListEmpty = Notice.chat("Nikt nie jest uwięziony!"); + @Description({" ", + "# {PLAYER} - Gracz który jest uwięziony, {DETAINED_BY} - Gracz który uwięził gracza, {REMAINING_TIME} - Czas pozostały do uwolnienia"}) + public Notice jailListPlayerEntry = Notice.chat( + "Gracz {PLAYER} został uwięziony przez {DETAINED_BY} na czas {REMAINING_TIME} !"); +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/privatechat/messages/ENPrivateMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/privatechat/messages/ENPrivateMessages.java new file mode 100644 index 000000000..7eef91591 --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/privatechat/messages/ENPrivateMessages.java @@ -0,0 +1,51 @@ +package com.eternalcode.core.feature.privatechat.messages; + +import com.eternalcode.multification.notice.Notice; +import lombok.Getter; +import lombok.experimental.Accessors; +import net.dzikoysk.cdn.entity.Contextual; +import net.dzikoysk.cdn.entity.Description; + +@Getter +@Accessors(fluent = true) +@Contextual +public class ENPrivateMessages implements PrivateChatMessages { + public Notice noReply = Notice.chat("You have no one to reply!"); + + @Description("# {TARGET} - Player that you want to send messages, {MESSAGE} - Message") + public Notice privateMessageYouToTarget = + Notice.chat("[You -> {TARGET}]: {MESSAGE}"); + + @Description({" ", "# {SENDER} - Message sender, {MESSAGE} - Message"}) + public Notice privateMessageTargetToYou = + Notice.chat("[{SENDER} -> You]: {MESSAGE}"); + + @Description("# {SENDER} - Sender, {TARGET} - Target, {MESSAGE} - Message") + public Notice socialSpyMessage = Notice.chat( + "[ss] [{SENDER} -> {TARGET}]: {MESSAGE}"); + + @Description(" ") + public Notice socialSpyEnable = Notice.chat("SocialSpy has been {STATE}!"); + public Notice socialSpyDisable = Notice.chat("SocialSpy has been {STATE}!"); + + @Description({" ", "# {PLAYER} - Ignored player"}) + public Notice ignorePlayer = Notice.chat("► {PLAYER} player has been ignored!"); + + @Description(" ") + public Notice ignoreAll = Notice.chat("All players have been ignored!"); + public Notice cantIgnoreYourself = Notice.chat("You can't ignore yourself!"); + + @Description({" ", "# {PLAYER} - Ignored player."}) + public Notice alreadyIgnorePlayer = Notice.chat("You already ignore this player!"); + + @Description("# {PLAYER} - Unignored player") + public Notice unIgnorePlayer = Notice.chat("{PLAYER} player has been uningored!"); + + @Description(" ") + public Notice unIgnoreAll = Notice.chat("All players have been uningored!"); + public Notice cantUnIgnoreYourself = Notice.chat("You can't unignore yourself!"); + + @Description({" ", "# {PLAYER} - Ignored player"}) + public Notice notIgnorePlayer = + Notice.chat("You don't ignore this player, so you can unignore him!"); +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/privatechat/messages/PLPrivateChatMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/privatechat/messages/PLPrivateChatMessages.java new file mode 100644 index 000000000..c73883738 --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/privatechat/messages/PLPrivateChatMessages.java @@ -0,0 +1,52 @@ +package com.eternalcode.core.feature.privatechat.messages; + +import com.eternalcode.multification.notice.Notice; +import lombok.Getter; +import lombok.experimental.Accessors; +import net.dzikoysk.cdn.entity.Contextual; +import net.dzikoysk.cdn.entity.Description; + +@Getter +@Accessors(fluent = true) +@Contextual +public class PLPrivateChatMessages implements PrivateChatMessages { + public Notice noReply = Notice.chat( + "Nie możesz nikomu odpowiadać, ponieważ nie otrzymałeś żadnej wiadomości prywatnej!"); + + @Description("# {TARGET} - Gracz do którego chcesz wysłać wiadomość, {MESSAGE} - Treść wiadomości") + public Notice privateMessageYouToTarget = + Notice.chat("[Ty -> {TARGET}]: {MESSAGE}"); + + @Description({" ", "# {SENDER} - Gracz który wysłał wiadomość, {MESSAGE} - Treść wiadomości"}) + public Notice privateMessageTargetToYou = + Notice.chat("[{SENDER} -> Ty]: {MESSAGE}"); + + @Description("# {SENDER} - Gracz który wysłał wiadomość, {TARGET} - Gracz do którego wysłał wiadomość, {MESSAGE} - Treść wiadomości") + public Notice socialSpyMessage = Notice.chat( + "[ss] [{SENDER} -> {TARGET}]: {MESSAGE}"); + + @Description(" ") + public Notice socialSpyEnable = Notice.chat("SocialSpy został {STATE}!"); + public Notice socialSpyDisable = Notice.chat("SocialSpy został {STATE}!"); + + @Description({" ", "# {PLAYER} - Gracz który jest zignorowany"}) + public Notice ignorePlayer = Notice.chat("Zignorowano gracza {PLAYER}!"); + + @Description(" ") + public Notice ignoreAll = Notice.chat("Zignorowano wszystkich graczy!"); + public Notice cantIgnoreYourself = Notice.chat("Nie możesz zignorować samego siebie!"); + + @Description({" ", "# {PLAYER} - Gracz który jest zignorowany"}) + public Notice alreadyIgnorePlayer = Notice.chat("Gracz {PLAYER} jest już zignorowany!"); + + @Description({" ", "# {PLAYER} - Gracz który jest zignorowany"}) + public Notice unIgnorePlayer = Notice.chat("Od ignorowano gracza {PLAYER}!"); + + @Description(" ") + public Notice unIgnoreAll = Notice.chat("Od ignorowano wszystkich graczy!"); + public Notice cantUnIgnoreYourself = Notice.chat("Nie możesz od ignorować samego siebie!"); + + @Description({" ", "# {PLAYER} - Gracz który jest zignorowany"}) + public Notice notIgnorePlayer = Notice.chat( + "Gracz {PLAYER} nie jest przez Ciebie zignorowany. Nie możesz go od ignorować!"); +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/privatechat/messages/PrivateChatMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/privatechat/messages/PrivateChatMessages.java new file mode 100644 index 000000000..afe4d9f27 --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/privatechat/messages/PrivateChatMessages.java @@ -0,0 +1,22 @@ +package com.eternalcode.core.feature.privatechat.messages; + +import com.eternalcode.multification.notice.Notice; + +public interface PrivateChatMessages { + Notice noReply(); + Notice privateMessageYouToTarget(); + Notice privateMessageTargetToYou(); + + Notice socialSpyMessage(); + Notice socialSpyEnable(); + Notice socialSpyDisable(); + + Notice ignorePlayer(); + Notice ignoreAll(); + Notice unIgnorePlayer(); + Notice unIgnoreAll(); + Notice alreadyIgnorePlayer(); + Notice notIgnorePlayer(); + Notice cantIgnoreYourself(); + Notice cantUnIgnoreYourself(); +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/randomteleport/messages/ENRandomTeleportMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/randomteleport/messages/ENRandomTeleportMessages.java new file mode 100644 index 000000000..cbbf84c83 --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/randomteleport/messages/ENRandomTeleportMessages.java @@ -0,0 +1,33 @@ +package com.eternalcode.core.feature.randomteleport.messages; + +import com.eternalcode.multification.notice.Notice; +import lombok.Getter; +import lombok.experimental.Accessors; +import net.dzikoysk.cdn.entity.Contextual; +import net.dzikoysk.cdn.entity.Description; + +@Getter +@Accessors(fluent = true) +@Contextual +public class ENRandomTeleportMessages implements RandomTeleportMessages { + public Notice randomTeleportStarted = Notice.builder() + .chat("Teleportation to a random location has started!") + .title("Random teleport") + .subtitle("Searching, please wait...") + .build(); + + public Notice randomTeleportFailed = + Notice.chat("A safe location could not be found, please try again!"); + + @Description({ + "# {PLAYER} - Player who has been teleported, {WORLD} - World name, {X} - X coordinate, {Y} - Y coordinate, {Z} - Z coordinate"}) + public Notice teleportedToRandomLocation = + Notice.chat("You have been teleported to a random location!"); + + @Description(" ") + public Notice teleportedSpecifiedPlayerToRandomLocation = Notice.chat( + "You have teleported {PLAYER} to a random location! His current location is: world: {WORLD}, x: {X}, y: {Y}, z: {Z}."); + + @Description({" ", "# {TIME} - Time to next use (cooldown)"}) + public Notice randomTeleportDelay = Notice.chat("You can use random teleport after {TIME}!"); +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/randomteleport/messages/PLRandomTeleportMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/randomteleport/messages/PLRandomTeleportMessages.java new file mode 100644 index 000000000..71f5e416e --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/randomteleport/messages/PLRandomTeleportMessages.java @@ -0,0 +1,34 @@ +package com.eternalcode.core.feature.randomteleport.messages; + +import com.eternalcode.multification.notice.Notice; +import lombok.Getter; +import lombok.experimental.Accessors; +import net.dzikoysk.cdn.entity.Contextual; +import net.dzikoysk.cdn.entity.Description; + +@Getter +@Accessors(fluent = true) +@Contextual +public class PLRandomTeleportMessages implements RandomTeleportMessages { + @Description(" ") + public Notice randomTeleportStarted = Notice.builder() + .chat("Rozpoczynanie procesu losowania lokalizacji...") + .title("Losowy teleport") + .subtitle("Wyszukiwanie lokalizacji, proszę czekać...") + .build(); + + public Notice randomTeleportFailed = + Notice.chat("Nie udało się znaleźć bezpiecznej lokalizacji, spróbuj ponownie!"); + + public Notice teleportedToRandomLocation = + Notice.chat("Zostałeś przeteleportowany na losową lokalizację!"); + + @Description({ + "# {PLAYER} - Gracz który został teleportowany, {WORLD} - Świat, {X} - Koordynat X, {Y} - Koordynat Y, {Z} - Koordynat Z"}) + public Notice teleportedSpecifiedPlayerToRandomLocation = Notice.chat( + "Przeteleportowałeś gracza {PLAYER} na losową lokalizację! Jego aktualna lokalizacja to: świat: {WORLD} x: {X}, y: {Y}, z: {Z}."); + + @Description({" ", "# {TIME} - Czas do następnego użycia komendy (cooldown)"}) + public Notice randomTeleportDelay = + Notice.chat("Możesz skorzystać z losowej teleportacji dopiero za {TIME}!"); +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/randomteleport/messages/RandomTeleportMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/randomteleport/messages/RandomTeleportMessages.java new file mode 100644 index 000000000..c72dcea26 --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/randomteleport/messages/RandomTeleportMessages.java @@ -0,0 +1,11 @@ +package com.eternalcode.core.feature.randomteleport.messages; + +import com.eternalcode.multification.notice.Notice; + +public interface RandomTeleportMessages { + Notice randomTeleportStarted(); + Notice randomTeleportFailed(); + Notice teleportedToRandomLocation(); + Notice teleportedSpecifiedPlayerToRandomLocation(); + Notice randomTeleportDelay(); +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/spawn/messages/ENSpawnMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/spawn/messages/ENSpawnMessages.java new file mode 100644 index 000000000..0beca9e2b --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/spawn/messages/ENSpawnMessages.java @@ -0,0 +1,21 @@ +package com.eternalcode.core.feature.spawn.messages; + +import com.eternalcode.multification.notice.Notice; +import lombok.Getter; +import lombok.experimental.Accessors; +import net.dzikoysk.cdn.entity.Contextual; +import net.dzikoysk.cdn.entity.Description; + +@Getter +@Accessors(fluent = true) +@Contextual +public class ENSpawnMessages implements SpawnMessages { + public Notice spawnSet = Notice.chat("Spawn set!"); + public Notice spawnNoSet = Notice.chat("Spawn is not set!"); + @Description({" ", "# {PLAYER} - Player who teleported you to spawn"}) + public Notice spawnTeleportedBy = + Notice.chat("You have been teleported to spawn by {PLAYER}!"); + @Description({" ", "# {PLAYER} - Teleported player"}) + public Notice spawnTeleportedOther = + Notice.chat("You teleported player {PLAYER} to spawn!"); +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/spawn/messages/PLSpawnMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/spawn/messages/PLSpawnMessages.java new file mode 100644 index 000000000..143d79867 --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/spawn/messages/PLSpawnMessages.java @@ -0,0 +1,21 @@ +package com.eternalcode.core.feature.spawn.messages; + +import com.eternalcode.multification.notice.Notice; +import lombok.Getter; +import lombok.experimental.Accessors; +import net.dzikoysk.cdn.entity.Contextual; +import net.dzikoysk.cdn.entity.Description; + +@Getter +@Accessors(fluent = true) +@Contextual +public class PLSpawnMessages implements SpawnMessages { + public Notice spawnSet = Notice.chat("Ustawiono spawn!"); + public Notice spawnNoSet = Notice.chat("Spawn nie został ustawiony!"); + @Description({" ", "# {PLAYER} - Gracz który teleportował cię na spawn"}) + public Notice spawnTeleportedBy = + Notice.chat("Zostałeś przeteleportowany na spawn przez gracza {PLAYER}!"); + @Description("# {PLAYER} - Gracz który został przeteleportowany na spawn") + public Notice spawnTeleportedOther = + Notice.chat("Gracz {PLAYER} został przeteleportowany na spawn!"); +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/spawn/messages/SpawnMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/spawn/messages/SpawnMessages.java new file mode 100644 index 000000000..08fe9ab1e --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/spawn/messages/SpawnMessages.java @@ -0,0 +1,12 @@ +package com.eternalcode.core.feature.spawn.messages; + +import com.eternalcode.multification.notice.Notice; + +public interface SpawnMessages { + // spawn + Notice spawnSet(); + Notice spawnNoSet(); + + Notice spawnTeleportedBy(); + Notice spawnTeleportedOther(); +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/essentials/SudoCommand.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/sudo/SudoCommand.java similarity index 97% rename from eternalcore-core/src/main/java/com/eternalcode/core/feature/essentials/SudoCommand.java rename to eternalcore-core/src/main/java/com/eternalcode/core/feature/sudo/SudoCommand.java index 64103f4d6..4e2e11652 100644 --- a/eternalcore-core/src/main/java/com/eternalcode/core/feature/essentials/SudoCommand.java +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/sudo/SudoCommand.java @@ -1,4 +1,4 @@ -package com.eternalcode.core.feature.essentials; +package com.eternalcode.core.feature.sudo; import com.eternalcode.annotations.scan.command.DescriptionDocs; import com.eternalcode.annotations.scan.feature.FeatureDocs; @@ -54,7 +54,7 @@ private void sendSudoSpy(Viewer viewer, String command) { this.server.getOnlinePlayers().stream() .filter(player -> player.hasPermission("eternalcore.sudo.spy")) .forEach(player -> this.noticeService.create() - .notice(translation -> translation.sudo().sudoMessage()) + .notice(translation -> translation.sudo().sudoMessageSpy()) .placeholder("{COMMAND}", command) .placeholder("{PLAYER}", viewer.getName()) .player(player.getUniqueId()) diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/sudo/messages/ENSudoMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/sudo/messages/ENSudoMessages.java new file mode 100644 index 000000000..5466868e1 --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/sudo/messages/ENSudoMessages.java @@ -0,0 +1,18 @@ +package com.eternalcode.core.feature.sudo.messages; + +import com.eternalcode.multification.notice.Notice; +import lombok.Getter; +import lombok.experimental.Accessors; +import net.dzikoysk.cdn.entity.Contextual; +import net.dzikoysk.cdn.entity.Description; + +@Getter +@Accessors(fluent = true) +@Contextual +public class ENSudoMessages implements SudoMessages { + @Description({"# {PLAYER} - Player who executed the command, {COMMAND} - Command that the player executed"}) + public Notice sudoMessageSpy = + Notice.chat("[Sudo] {PLAYER} executed command: {COMMAND}"); + public Notice sudoMessage = + Notice.chat("You executed command: {COMMAND} on player: {PLAYER}"); +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/sudo/messages/PLSudoMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/sudo/messages/PLSudoMessages.java new file mode 100644 index 000000000..629f0b326 --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/sudo/messages/PLSudoMessages.java @@ -0,0 +1,18 @@ +package com.eternalcode.core.feature.sudo.messages; + +import com.eternalcode.multification.notice.Notice; +import lombok.Getter; +import lombok.experimental.Accessors; +import net.dzikoysk.cdn.entity.Contextual; +import net.dzikoysk.cdn.entity.Description; + +@Getter +@Accessors(fluent = true) +@Contextual +public class PLSudoMessages implements SudoMessages { + @Description({"# {PLAYER} - Gracz który wykonał komendę, {COMMAND} - Komenda, którą wykonał gracz"}) + public Notice sudoMessageSpy = + Notice.chat("[Sudo] {PLAYER} wykonał komendę: {COMMAND}"); + public Notice sudoMessage = + Notice.chat("Wykonałeś komendę: {COMMAND} na graczu: {PLAYER}"); +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/sudo/messages/SudoMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/sudo/messages/SudoMessages.java new file mode 100644 index 000000000..886523a61 --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/sudo/messages/SudoMessages.java @@ -0,0 +1,8 @@ +package com.eternalcode.core.feature.sudo.messages; + +import com.eternalcode.multification.notice.Notice; + +public interface SudoMessages { + Notice sudoMessageSpy(); + Notice sudoMessage(); +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/teleportrequest/messages/ENTeleportRequestMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/teleportrequest/messages/ENTeleportRequestMessages.java new file mode 100644 index 000000000..1a72ebf12 --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/teleportrequest/messages/ENTeleportRequestMessages.java @@ -0,0 +1,67 @@ +package com.eternalcode.core.feature.teleportrequest.messages; + +import com.eternalcode.multification.notice.Notice; +import lombok.Getter; +import lombok.experimental.Accessors; +import net.dzikoysk.cdn.entity.Contextual; +import net.dzikoysk.cdn.entity.Description; + +@Getter +@Accessors(fluent = true) +@Contextual +public class ENTeleportRequestMessages implements TeleportRequestMessages { + public Notice tpaSelfMessage = Notice.chat("You can't teleport to yourself!"); + public Notice tpaAlreadySentMessage = + Notice.chat("You have already sent a teleportation request!"); + public Notice tpaSentMessage = + Notice.chat("You have sent a request for teleportation to a player: {PLAYER}!"); + + @Description({ + " ", + "# We used MiniMessages formatting in these messages", + "# The current request acceptance message allows the player to click on it to accept the teleport request with MiniMessages!", + "# More information about MiniMessages: https://docs.adventure.kyori.net/minimessage/format.html", + }) + @Description({" ", "# {PLAYER} - Player who sent the request to another player"}) + public Notice tpaReceivedMessage = Notice.builder() + .chat("You have received a request for teleportation from a player: {PLAYER}!") + .chat( + "Accept request for teleports?'>» /tpaccept {PLAYER} to accept! (Click)") + .chat( + "Decline a teleportation request?'>» /tpdeny {PLAYER} to deny! (Click)") + .build(); + + @Description(" ") + public Notice tpaDenyNoRequestMessage = + Notice.chat("You do not have a teleport request from this player!"); + + @Description({" ", "# {PLAYER} - Player who sent a request to teleport to another player"}) + public Notice tpaDenyDoneMessage = + Notice.chat("You have declined a teleport request from a player: {PLAYER}!"); + + @Description({" ", "# {PLAYER} - Player who declines the tpa request"}) + public Notice tpaDenyReceivedMessage = + Notice.chat("Player: {PLAYER} rejected your teleport request!"); + + @Description(" ") + public Notice tpaDenyAllDenied = Notice.chat("All players have denied your teleport request!"); + + @Description({" ", "# {PLAYER} - Player who sent tpa request to another player"}) + public Notice tpaAcceptMessage = + Notice.chat("You have accepted the teleportation from the player: {PLAYER}!"); + + @Description(" ") + public Notice tpaAcceptNoRequestMessage = + Notice.chat("This player has not sent you a teleport request!"); + + @Description({" ", "# {PLAYER} - Player who sent a request to teleport to another player"}) + public Notice tpaAcceptReceivedMessage = + Notice.chat("Player: {PLAYER} accepted your teleportation request!"); + + @Description(" ") + public Notice tpaAcceptAllAccepted = + Notice.chat("All players have accepted your teleport request!"); + + @Description(" ") + public Notice tpaTargetIgnoresYou = Notice.chat("{PLAYER} is ignoring you!"); +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/teleportrequest/messages/PLTeleportRequestMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/teleportrequest/messages/PLTeleportRequestMessages.java new file mode 100644 index 000000000..8bdb73462 --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/teleportrequest/messages/PLTeleportRequestMessages.java @@ -0,0 +1,66 @@ +package com.eternalcode.core.feature.teleportrequest.messages; + +import com.eternalcode.multification.notice.Notice; +import lombok.Getter; +import lombok.experimental.Accessors; +import net.dzikoysk.cdn.entity.Contextual; +import net.dzikoysk.cdn.entity.Description; + +@Getter +@Accessors(fluent = true) +@Contextual +public class PLTeleportRequestMessages implements TeleportRequestMessages { + public Notice tpaSelfMessage = Notice.chat("Nie możesz teleportować się samodzielnie!"); + public Notice tpaAlreadySentMessage = Notice.chat("Już wysłałeś prośbę o teleportację!"); + @Description({" ", "# {PLAYER} - Gracz który wysłał prośbę o teleportację"}) + public Notice tpaSentMessage = + Notice.chat("Wysłałeś prośbę o teleportację do gracza: {PLAYER}!"); + + @Description({ + " ", + "# W tych wiadomościach użyliśmy formatowania MiniMessages", + "# Obecna wiadomość od akceptacji prośby umożliwia graczowi kliknięcie w nią, aby zaakceptować prośbę o teleportację dzięki MiniMessages!", + "# Więcej informacji znajdziesz na stronie: https://docs.adventure.kyori.net/minimessage/format.html", + }) + @Description({" ", "# {PLAYER} - Gracz który wysłał prośbę o teleportacje do innego gracza"}) + public Notice tpaReceivedMessage = Notice.builder() + .chat("Otrzymałeś prośbę o teleportację od gracza: {PLAYER}!") + .chat( + "Akceptować prośbę o teleportacje?'>» /tpaccept {PLAYER} by ją zaakceptować! (Kliknij)") + .chat( + "Odrzucić prośbę o teleportacje?'>» /tpdeny {PLAYER} by ją odrzucić! (Kliknij)") + .build(); + + @Description(" ") + public Notice tpaDenyNoRequestMessage = + Notice.chat("Nie otrzymałeś prośby o teleportację od tego gracza!"); + + @Description({" ", "# {PLAYER} - Gracz który wysłał prośbę o teleportacje do innego gracza"}) + public Notice tpaDenyDoneMessage = + Notice.chat("Odrzuciłeś prośbę o teleportację od gracza: {PLAYER}!"); + + @Description({" ", "# {PLAYER} - Gracz który odrzucił prośbę o teleportacje"}) + public Notice tpaDenyReceivedMessage = + Notice.chat("Gracz: {PLAYER} odrzucił twoją prośbę o teleportację!"); + + @Description(" ") + public Notice tpaDenyAllDenied = Notice.chat("Odrzucono wszystkie prośby o teleportację!"); + + @Description({" ", "# {PLAYER} - Gracz który wysłał prośbę o teleportacje do innego gracza"}) + public Notice tpaAcceptMessage = + Notice.chat("Zaakceptowałeś prośbę o teleportację od gracza: {PLAYER}!"); + + @Description(" ") + public Notice tpaAcceptNoRequestMessage = + Notice.chat("Ten gracz nie wysłał do ciebie prośby o teleportację!"); + + @Description({" ", "# {PLAYER} - Gracz który wysłał prośbę o teleportacje do innego gracza"}) + public Notice tpaAcceptReceivedMessage = + Notice.chat("Gracz: {PLAYER} zaakceptował twoją prośbę o teleportację!"); + + @Description(" ") + public Notice tpaAcceptAllAccepted = Notice.chat("Zaakceptowano wszystkie prośby o teleportację!"); + + @Description(" ") + public Notice tpaTargetIgnoresYou = Notice.chat("{PLAYER} ignoruje Cię!"); +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/teleportrequest/messages/TeleportRequestMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/teleportrequest/messages/TeleportRequestMessages.java new file mode 100644 index 000000000..d45d45189 --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/teleportrequest/messages/TeleportRequestMessages.java @@ -0,0 +1,21 @@ +package com.eternalcode.core.feature.teleportrequest.messages; + +import com.eternalcode.multification.notice.Notice; + +public interface TeleportRequestMessages { + Notice tpaSelfMessage(); + Notice tpaAlreadySentMessage(); + Notice tpaSentMessage(); + Notice tpaReceivedMessage(); + Notice tpaTargetIgnoresYou(); + + Notice tpaDenyNoRequestMessage(); + Notice tpaDenyDoneMessage(); + Notice tpaDenyReceivedMessage(); + Notice tpaDenyAllDenied(); + + Notice tpaAcceptMessage(); + Notice tpaAcceptNoRequestMessage(); + Notice tpaAcceptReceivedMessage(); + Notice tpaAcceptAllAccepted(); +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/time/messages/ENTimeAndWeatherMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/time/messages/ENTimeAndWeatherMessages.java new file mode 100644 index 000000000..2f9ee7cdc --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/time/messages/ENTimeAndWeatherMessages.java @@ -0,0 +1,26 @@ +package com.eternalcode.core.feature.time.messages; + +import com.eternalcode.multification.notice.Notice; +import lombok.Getter; +import lombok.experimental.Accessors; +import net.dzikoysk.cdn.entity.Contextual; +import net.dzikoysk.cdn.entity.Description; + +@Getter +@Accessors(fluent = true) +@Contextual +public class ENTimeAndWeatherMessages implements TimeAndWeatherMessages { + @Description("# {WORLD} - World name") + public Notice timeSetDay = Notice.chat("Time set to day in the {WORLD}!"); + public Notice timeSetNight = Notice.chat("Time set to night in the {WORLD}!"); + + @Description("# {TIME} - Changed time in ticks") + public Notice timeSet = Notice.chat("Time set to {TIME}"); + public Notice timeAdd = Notice.chat("Time added {TIME}"); + + @Description("# {WORLD} - World name") + public Notice weatherSetRain = Notice.chat("Weather set to rain in the {WORLD}!"); + public Notice weatherSetSun = Notice.chat("Weather set to sun in the {WORLD}!"); + public Notice weatherSetThunder = + Notice.chat("Weather set to thunder in the {WORLD}!"); +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/time/messages/PLTimeAndWeatherMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/time/messages/PLTimeAndWeatherMessages.java new file mode 100644 index 000000000..887a1d61b --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/time/messages/PLTimeAndWeatherMessages.java @@ -0,0 +1,26 @@ +package com.eternalcode.core.feature.time.messages; + +import com.eternalcode.multification.notice.Notice; +import lombok.Getter; +import lombok.experimental.Accessors; +import net.dzikoysk.cdn.entity.Contextual; +import net.dzikoysk.cdn.entity.Description; + +@Getter +@Accessors(fluent = true) +@Contextual +public class PLTimeAndWeatherMessages implements TimeAndWeatherMessages { + @Description("# {WORLD} - Nazwa świata w którym zmieniono czas") + public Notice timeSetDay = Notice.chat("Ustawiono dzień w świecie {WORLD}!"); + public Notice timeSetNight = Notice.chat("Ustawiono noc w świecie {WORLD}!"); + + @Description({" ", "# {TIME} - Czas"}) + public Notice timeSet = Notice.chat("Ustawiono czas na {TIME}!"); + public Notice timeAdd = Notice.chat("Zmieniono czas o {TIME}!"); + + @Description({" ", "# {WORLD} - Świat w którym ustawiono pogode"}) + public Notice weatherSetRain = Notice.chat("Ustawiono deszcz w świecie {WORLD}!"); + public Notice weatherSetSun = + Notice.chat("Ustawiono słoneczną pogodę w świecie {WORLD}!"); + public Notice weatherSetThunder = Notice.chat("Ustawiono burze w świecie {WORLD}!"); +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/time/messages/TimeAndWeatherMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/time/messages/TimeAndWeatherMessages.java new file mode 100644 index 000000000..70ca483b4 --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/time/messages/TimeAndWeatherMessages.java @@ -0,0 +1,15 @@ +package com.eternalcode.core.feature.time.messages; + +import com.eternalcode.multification.notice.Notice; + +public interface TimeAndWeatherMessages { + Notice timeSetDay(); + Notice timeSetNight(); + + Notice timeSet(); + Notice timeAdd(); + + Notice weatherSetRain(); + Notice weatherSetSun(); + Notice weatherSetThunder(); +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/WarpInventory.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/WarpInventory.java index 51c25795d..aa4130621 100644 --- a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/WarpInventory.java +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/WarpInventory.java @@ -10,7 +10,8 @@ import com.eternalcode.core.injector.annotations.component.Service; import com.eternalcode.core.translation.AbstractTranslation; import com.eternalcode.core.translation.Translation; -import com.eternalcode.core.translation.Translation.WarpSection.WarpInventorySection; +import com.eternalcode.core.feature.warp.messages.WarpMessages; +import com.eternalcode.core.feature.warp.messages.WarpMessages.WarpInventorySection; import com.eternalcode.core.translation.TranslationManager; import dev.triumphteam.gui.builder.item.BaseItemBuilder; import dev.triumphteam.gui.builder.item.ItemBuilder; @@ -80,7 +81,7 @@ public void openInventory(Player player) { private Gui createInventory(Player player, Language language) { Translation translation = this.translationManager.getMessages(language); - Translation.WarpSection.WarpInventorySection warpSection = translation.warp().warpInventory(); + WarpMessages.WarpInventorySection warpSection = translation.warp().warpInventory(); int rowsCount; int size = warpSection.items().size(); @@ -221,7 +222,7 @@ public void addWarp(Warp warp) { for (Language language : this.translationManager.getAvailableLanguages()) { AbstractTranslation translation = (AbstractTranslation) this.translationManager.getMessages(language); - Translation.WarpSection.WarpInventorySection warpSection = translation.warp().warpInventory(); + WarpMessages.WarpInventorySection warpSection = translation.warp().warpInventory(); int size = warpSection.items().size(); int slot; @@ -267,7 +268,7 @@ public boolean removeWarp(String warpName) { for (Language language : this.translationManager.getAvailableLanguages()) { AbstractTranslation translation = (AbstractTranslation) this.translationManager.getMessages(language); - Translation.WarpSection.WarpInventorySection warpSection = translation.warp().warpInventory(); + WarpMessages.WarpInventorySection warpSection = translation.warp().warpInventory(); warpSection.removeItem(warpName); diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/messages/ENWarpMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/messages/ENWarpMessages.java new file mode 100644 index 000000000..7d2b3521d --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/messages/ENWarpMessages.java @@ -0,0 +1,86 @@ +package com.eternalcode.core.feature.warp.messages; + +import com.eternalcode.core.configuration.contextual.ConfigItem; +import com.eternalcode.core.feature.warp.WarpInventoryItem; +import com.eternalcode.multification.notice.Notice; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.Getter; +import net.dzikoysk.cdn.entity.Contextual; +import net.dzikoysk.cdn.entity.Description; +import org.bukkit.Material; + +@Getter +@Contextual +public class ENWarpMessages implements WarpMessages { + @Description("# {WARP} - Warp name") + public Notice warpAlreadyExists = Notice.chat("Warp {WARP} already exists!"); + public Notice create = Notice.chat("Warp {WARP} has been created."); + public Notice remove = Notice.chat("Warp {WARP} has been deleted."); + public Notice notExist = Notice.chat("This warp doesn't exist"); + public Notice itemAdded = Notice.chat("Warp has been added to GUI!"); + public Notice noWarps = Notice.chat("There are no warps!"); + public Notice itemLimit = + Notice.chat("You have reached the limit of warps! Your limit is {LIMIT}."); + public Notice noPermission = Notice.chat("You don't have permission to use this warp ({WARP})!"); + public Notice addPermissions = Notice.chat("Added permissions to warp {WARP}!"); + public Notice removePermission = + Notice.chat("Removed permission {PERMISSION} from warp {WARP}!"); + public Notice noPermissionsProvided = Notice.chat("No permissions provided!"); + public Notice permissionDoesNotExist = + Notice.chat("Permission {PERMISSION} doesn't exist!"); + public Notice permissionAlreadyExist = + Notice.chat("Permission {PERMISSION} already exists!"); + public Notice noPermissionAssigned = Notice.chat("There are no permissions assigned to this warp!"); + public Notice missingWarpArgument = Notice.chat("You must provide a warp name!"); + public Notice missingPermissionArgument = Notice.chat("You must provide a permission!"); + + @Description({" ", "# {WARPS} - List of warps (separated by commas)"}) + public Notice available = Notice.chat("Available warps: {WARPS}"); + + @Description({" ", "# Settings for warp inventory"}) + public ENWarpInventory warpInventory = new ENWarpInventory(); + + @Getter + @Contextual + public static class ENWarpInventory implements WarpInventorySection { + public String title = "» Available warps:"; + + @Description({" ", + "# Warps located inside GUI inventory can be customized here. More warps will be added on creation with /setwarp command. "}) + public Map items = new HashMap<>(); + + public void setItems(Map items) { + this.items = items; + } + + public ENWarpInventory.ENBorderSection border = new ENWarpInventory.ENBorderSection(); + public ENWarpInventory.ENDecorationItemsSection decorationItems = + new ENWarpInventory.ENDecorationItemsSection(); + + @Getter + @Contextual + public static class ENBorderSection implements BorderSection { + + @Description({" ", + "# Changes of border section may affect the appearance of the GUI inventory, after changes adjust slots of existing items."}) + public boolean enabled = true; + + public Material material = Material.GRAY_STAINED_GLASS_PANE; + + public FillType fillType = FillType.BORDER; + + public String name = ""; + + public List lore = Collections.emptyList(); + } + + @Getter + @Contextual + public static class ENDecorationItemsSection implements DecorationItemsSection { + public List items = List.of(); + } + } +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/messages/PLWarpMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/messages/PLWarpMessages.java new file mode 100644 index 000000000..67d662213 --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/messages/PLWarpMessages.java @@ -0,0 +1,86 @@ +package com.eternalcode.core.feature.warp.messages; + +import com.eternalcode.core.configuration.contextual.ConfigItem; +import com.eternalcode.core.feature.warp.WarpInventoryItem; +import com.eternalcode.multification.notice.Notice; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.Getter; +import net.dzikoysk.cdn.entity.Contextual; +import net.dzikoysk.cdn.entity.Description; +import org.bukkit.Material; + +@Getter +@Contextual +public class PLWarpMessages implements WarpMessages { + @Description("# {WARP} - Nazwa warpu") + public Notice warpAlreadyExists = Notice.chat("Warp o nazwie {WARP} już istnieje!"); + public Notice create = Notice.chat("Stworzono warp {WARP}!"); + public Notice remove = Notice.chat("Usunięto warp {WARP}!"); + public Notice notExist = Notice.chat("Nie odnaleziono takiego warpu!"); + public Notice itemAdded = Notice.chat("Dodano warp do GUI!"); + public Notice noWarps = Notice.chat("Nie ma dostępnych warpów!"); + public Notice itemLimit = Notice.chat("Osiągnąłeś limit warpów w GUI! Limit to: {LIMIT}!"); + public Notice noPermission = + Notice.chat("Nie masz uprawnień do skorzystania z tego warpa {WARP}!"); + public Notice addPermissions = Notice.chat("Dodano uprawnienia do warpa {WARP}!"); + public Notice removePermission = + Notice.chat("Usunięto uprawnienie {PERMISSION} z warpa {WARP}!"); + public Notice noPermissionsProvided = Notice.chat("Nie podano żadnych uprawnień!"); + public Notice permissionDoesNotExist = Notice.chat("Podane uprawnienie nie istnieje ({PERMISSION})!"); + public Notice permissionAlreadyExist = Notice.chat("Podane uprawnienie już istnieje ({PERMISSION})!"); + public Notice noPermissionAssigned = Notice.chat("Ten warp nie ma przypisanych żadnych permisji"); + public Notice missingWarpArgument = Notice.chat("Musisz podać nazwę warpu!"); + public Notice missingPermissionArgument = Notice.chat("Musisz podać uprawnienie!"); + + @Description({" ", "# {WARPS} - Lista dostępnych warpów"}) + public Notice available = Notice.chat("Dostepne warpy: {WARPS}!"); + + @Description({" ", "# Ustawienia gui listy dostępnych warpów"}) + public PLWarpInventory warpInventory = new PLWarpInventory(); + + @Getter + @Contextual + public static class PLWarpInventory implements WarpInventorySection { + public String title = "» Lista dostępnych warpów"; + + @Description({ + " ", + "# Poniższa lista określa przedmioty w GUI, które są wyświetlane w liście dostępnych warpów.", + "# Możesz edytować przedmioty, a dodawanie kolejnych warpów następuje automatycznie za pomocą komendy /setwarp", + }) + public Map items = new HashMap<>(); + + public void setItems(Map items) { + this.items = items; + } + + public PLWarpInventory.PLBorderSection border = new PLWarpInventory.PLBorderSection(); + public PLWarpInventory.PLDecorationItemsSection decorationItems = + new PLWarpInventory.PLDecorationItemsSection(); + + @Getter + @Contextual + public static class PLBorderSection implements BorderSection { + @Description({" ", + "# Zmiany w tej sekcji mogą wpłynąć na wygląd GUI, zwróć uwagę na zmiany slotów przedmiotów w GUI."}) + public boolean enabled = true; + + public Material material = Material.GRAY_STAINED_GLASS_PANE; + + public FillType fillType = FillType.BORDER; + + public String name = ""; + + public List lore = Collections.emptyList(); + } + + @Getter + @Contextual + public static class PLDecorationItemsSection implements DecorationItemsSection { + public List items = List.of(); + } + } +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/messages/WarpMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/messages/WarpMessages.java new file mode 100644 index 000000000..55f8fcf29 --- /dev/null +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/messages/WarpMessages.java @@ -0,0 +1,77 @@ +package com.eternalcode.core.feature.warp.messages; + +import com.eternalcode.core.configuration.contextual.ConfigItem; +import com.eternalcode.core.feature.warp.WarpInventoryItem; +import com.eternalcode.multification.notice.Notice; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.bukkit.Material; + +public interface WarpMessages { + Notice warpAlreadyExists(); + Notice notExist(); + Notice create(); + Notice remove(); + Notice available(); + Notice itemAdded(); + Notice noWarps(); + Notice itemLimit(); + Notice noPermission(); + Notice addPermissions(); + Notice removePermission(); + Notice permissionDoesNotExist(); + Notice permissionAlreadyExist(); + Notice noPermissionsProvided(); + Notice missingWarpArgument(); + Notice missingPermissionArgument(); + + WarpInventorySection warpInventory(); + + interface WarpInventorySection { + String title(); + + Map items(); + void setItems(Map items); + + default void addItem(String name, WarpInventoryItem item) { + Map items = new HashMap<>(this.items()); + items.put(name, item); + + this.setItems(items); + } + + default void removeItem(String name) { + Map items = new HashMap<>(this.items()); + items.remove(name); + + this.setItems(items); + } + + WarpInventorySection.BorderSection border(); + WarpInventorySection.DecorationItemsSection decorationItems(); + + interface BorderSection { + boolean enabled(); + + Material material(); + + WarpInventorySection.BorderSection.FillType fillType(); + + String name(); + + List lore(); + + enum FillType { + TOP, + BOTTOM, + BORDER, + ALL + } + } + + interface DecorationItemsSection { + List items(); + } + } +} diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/translation/Translation.java b/eternalcore-core/src/main/java/com/eternalcode/core/translation/Translation.java index b4ecbc73f..789f438e1 100644 --- a/eternalcore-core/src/main/java/com/eternalcode/core/translation/Translation.java +++ b/eternalcore-core/src/main/java/com/eternalcode/core/translation/Translation.java @@ -1,80 +1,33 @@ package com.eternalcode.core.translation; +import com.eternalcode.core.bridge.litecommand.argument.messages.ArgumentMessages; import com.eternalcode.core.configuration.contextual.ConfigItem; +import com.eternalcode.core.feature.adminchat.messages.AdminChatSection; import com.eternalcode.core.feature.afk.messages.AfkMessages; +import com.eternalcode.core.feature.automessage.messages.AutoMessageMessages; +import com.eternalcode.core.feature.helpop.messages.HelpOpSection; +import com.eternalcode.core.feature.home.messages.HomeMessages; +import com.eternalcode.core.feature.jail.messages.JailMessages; import com.eternalcode.core.feature.language.Language; -import com.eternalcode.core.feature.warp.WarpInventoryItem; +import com.eternalcode.core.feature.privatechat.messages.PrivateChatMessages; +import com.eternalcode.core.feature.randomteleport.messages.RandomTeleportMessages; +import com.eternalcode.core.feature.spawn.messages.SpawnMessages; +import com.eternalcode.core.feature.sudo.messages.SudoMessages; +import com.eternalcode.core.feature.teleportrequest.messages.TeleportRequestMessages; +import com.eternalcode.core.feature.time.messages.TimeAndWeatherMessages; +import com.eternalcode.core.feature.warp.messages.WarpMessages; import com.eternalcode.multification.notice.Notice; -import org.bukkit.Material; -import org.bukkit.event.entity.EntityDamageEvent; - -import java.util.Collection; -import java.util.HashMap; import java.util.List; import java.util.Map; +import org.bukkit.event.entity.EntityDamageEvent; public interface Translation { - Language getLanguage(); - - // argument section - ArgumentSection argument(); - - interface ArgumentSection { - Notice missingPlayerName(); - Notice permissionMessage(); - Notice usageMessage(); - Notice usageMessageHead(); - Notice usageMessageEntry(); - Notice offlinePlayer(); - Notice onlyPlayer(); - Notice numberBiggerThanOrEqualZero(); - Notice noItem(); - Notice noArgument(); - Notice noDamaged(); - Notice noDamagedItems(); - Notice noEnchantment(); - Notice noValidEnchantmentLevel(); - Notice invalidTimeFormat(); - Notice worldDoesntExist(); - Notice incorrectNumberOfChunks(); - Notice incorrectLocation(); - } - - // format section - Format format(); - interface Format { String enable(); String disable(); } - // HelpOp Section - HelpOpSection helpOp(); - - interface HelpOpSection { - Notice format(); - Notice send(); - Notice helpOpDelay(); - } - - // AdminChat Section - AdminChatSection adminChat(); - - interface AdminChatSection { - Notice format(); - } - - SudoSection sudo(); - - interface SudoSection { - Notice sudoMessageSpy(); - Notice sudoMessage(); - } - - // Teleport Section - TeleportSection teleport(); - interface TeleportSection { // teleport Notice teleportedToPlayer(); @@ -102,20 +55,6 @@ interface TeleportSection { Notice teleportedToRandomPlayer(); } - // Random Teleport Section - RandomTeleportSection randomTeleport(); - - interface RandomTeleportSection { - Notice randomTeleportStarted(); - Notice randomTeleportFailed(); - Notice teleportedToRandomLocation(); - Notice teleportedSpecifiedPlayerToRandomLocation(); - Notice randomTeleportDelay(); - } - - // Chat Section - ChatSection chat(); - interface ChatSection { Notice disabled(); Notice enabled(); @@ -141,142 +80,6 @@ interface ChatSection { Notice alertQueueSent(); } - // Warp Section - WarpSection warp(); - - interface WarpSection { - Notice warpAlreadyExists(); - Notice notExist(); - Notice create(); - Notice remove(); - Notice available(); - Notice itemAdded(); - Notice noWarps(); - Notice itemLimit(); - Notice noPermission(); - Notice addPermissions(); - Notice removePermission(); - Notice permissionDoesNotExist(); - Notice permissionAlreadyExist(); - Notice noPermissionsProvided(); - Notice missingWarpArgument(); - Notice missingPermissionArgument(); - - WarpInventorySection warpInventory(); - - interface WarpInventorySection { - String title(); - - Map items(); - void setItems(Map items); - - default void addItem(String name, WarpInventoryItem item) { - Map items = new HashMap<>(this.items()); - items.put(name, item); - - this.setItems(items); - } - - default void removeItem(String name) { - Map items = new HashMap<>(this.items()); - items.remove(name); - - this.setItems(items); - } - - BorderSection border(); - DecorationItemsSection decorationItems(); - - interface BorderSection { - boolean enabled(); - - Material material(); - - FillType fillType(); - - String name(); - - List lore(); - - enum FillType { - TOP, BOTTOM, BORDER, ALL - } - } - - interface DecorationItemsSection { - List items(); - } - } - } - - // Home section - HomeSection home(); - - interface HomeSection { - Notice homeList(); - Notice create(); - Notice delete(); - Notice limit(); - Notice overrideHomeLocation(); - Notice noHomesOwned(); - String noHomesOwnedPlaceholder(); - - Notice overrideHomeLocationAsAdmin(); - Notice playerNoOwnedHomes(); - Notice createAsAdmin(); - Notice deleteAsAdmin(); - Notice homeListAsAdmin(); - } - - // tpa section - TpaSection tpa(); - - interface TpaSection { - Notice tpaSelfMessage(); - Notice tpaAlreadySentMessage(); - Notice tpaSentMessage(); - Notice tpaReceivedMessage(); - Notice tpaTargetIgnoresYou(); - - Notice tpaDenyNoRequestMessage(); - Notice tpaDenyDoneMessage(); - Notice tpaDenyReceivedMessage(); - Notice tpaDenyAllDenied(); - - Notice tpaAcceptMessage(); - Notice tpaAcceptNoRequestMessage(); - Notice tpaAcceptReceivedMessage(); - Notice tpaAcceptAllAccepted(); - } - - // private section - PrivateChatSection privateChat(); - - interface PrivateChatSection { - Notice noReply(); - Notice privateMessageYouToTarget(); - Notice privateMessageTargetToYou(); - - Notice socialSpyMessage(); - Notice socialSpyEnable(); - Notice socialSpyDisable(); - - Notice ignorePlayer(); - Notice ignoreAll(); - Notice unIgnorePlayer(); - Notice unIgnoreAll(); - Notice alreadyIgnorePlayer(); - Notice notIgnorePlayer(); - Notice cantIgnoreYourself(); - Notice cantUnIgnoreYourself(); - } - - // afk section - AfkMessages afk(); - - // event section - EventSection event(); - interface EventSection { List deathMessage(); List unknownDeathCause(); @@ -289,18 +92,12 @@ interface EventSection { Notice welcome(); } - // inventory section - InventorySection inventory(); - interface InventorySection { Notice inventoryClearMessage(); Notice inventoryClearMessageBy(); String disposalTitle(); } - // player section - PlayerSection player(); - interface PlayerSection { // feed Notice feedMessage(); @@ -359,21 +156,6 @@ interface PlayerSection { Notice safeChunksMessage(); } - // spawn section - SpawnSection spawn(); - - interface SpawnSection { - // spawn - Notice spawnSet(); - Notice spawnNoSet(); - - Notice spawnTeleportedBy(); - Notice spawnTeleportedOther(); - } - - // item section - ItemSection item(); - interface ItemSection { // item name & lore Notice itemClearNameMessage(); @@ -403,73 +185,60 @@ interface ItemSection { Notice enchantedMessageBy(); } - // time and weather - TimeAndWeatherSection timeAndWeather(); - - interface TimeAndWeatherSection { - Notice timeSetDay(); - Notice timeSetNight(); - - Notice timeSet(); - Notice timeAdd(); - - Notice weatherSetRain(); - Notice weatherSetSun(); - Notice weatherSetThunder(); - } - - // language section - LanguageSection language(); - interface LanguageSection { Notice languageChanged(); List decorationItems(); } - // container section - ContainerSection container(); - interface ContainerSection { Notice genericContainerOpened(); Notice genericContainerOpenedBy(); Notice genericContainerOpenedFor(); } + Language getLanguage(); + // argument section + ArgumentMessages argument(); + // format section + Format format(); + // HelpOp Section + HelpOpSection helpOp(); + // AdminChat Section + AdminChatSection adminChat(); + SudoMessages sudo(); + // Teleport Section + TeleportSection teleport(); + // Random Teleport Section + RandomTeleportMessages randomTeleport(); + // Chat Section + ChatSection chat(); + // Warp Section + WarpMessages warp(); + // Home section + HomeMessages home(); + // tpa section + TeleportRequestMessages tpa(); + // private section + PrivateChatMessages privateChat(); + // afk section + AfkMessages afk(); + // event section + EventSection event(); + // inventory section + InventorySection inventory(); + // player section + PlayerSection player(); + // spawn section + SpawnMessages spawn(); + // item section + ItemSection item(); + // time and weather + TimeAndWeatherMessages timeAndWeather(); + // language section + LanguageSection language(); + // container section + ContainerSection container(); + AutoMessageMessages autoMessage(); - AutoMessageSection autoMessage(); - - interface AutoMessageSection { - Collection messages(); - - Notice enabled(); - Notice disabled(); - } - - JailSection jailSection(); - - interface JailSection { - Notice jailLocationSet(); - Notice jailLocationRemove(); - Notice jailLocationNotSet(); - Notice jailLocationOverride(); - - Notice jailDetainBroadcast(); - Notice jailDetainPrivate(); - Notice jailDetainCountdown(); - Notice jailDetainOverride(); - Notice jailDetainAdmin(); - - Notice jailReleaseBroadcast(); - Notice jailReleasePrivate(); - Notice jailReleaseAll(); - Notice jailReleaseNoPlayers(); - Notice jailIsNotPrisoner(); - - Notice jailListHeader(); - Notice jailListEmpty(); - Notice jailListPlayerEntry(); - - Notice jailCannotUseCommand(); - } - + JailMessages jailSection(); } diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/translation/TranslationManager.java b/eternalcore-core/src/main/java/com/eternalcode/core/translation/TranslationManager.java index 64988ebe9..31c6fadc4 100644 --- a/eternalcore-core/src/main/java/com/eternalcode/core/translation/TranslationManager.java +++ b/eternalcore-core/src/main/java/com/eternalcode/core/translation/TranslationManager.java @@ -3,8 +3,6 @@ import com.eternalcode.annotations.scan.feature.FeatureDocs; import com.eternalcode.core.feature.language.Language; import com.eternalcode.core.feature.language.LanguageService; -import com.eternalcode.core.user.User; -import com.eternalcode.core.viewer.Viewer; import com.eternalcode.multification.translation.TranslationProvider; import java.util.Collections; import java.util.Set; diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/translation/implementation/ENTranslation.java b/eternalcore-core/src/main/java/com/eternalcode/core/translation/implementation/ENTranslation.java index dd9e676b8..9e417fe44 100644 --- a/eternalcore-core/src/main/java/com/eternalcode/core/translation/implementation/ENTranslation.java +++ b/eternalcore-core/src/main/java/com/eternalcode/core/translation/implementation/ENTranslation.java @@ -1,24 +1,32 @@ package com.eternalcode.core.translation.implementation; +import com.eternalcode.core.bridge.litecommand.argument.messages.ENArgumentMessages; import com.eternalcode.core.configuration.contextual.ConfigItem; +import com.eternalcode.core.feature.adminchat.messages.ENAdminChatMessages; import com.eternalcode.core.feature.afk.messages.ENAfkMessages; +import com.eternalcode.core.feature.automessage.messages.ENAutoMessageMessages; +import com.eternalcode.core.feature.helpop.messages.ENHelpOpMessages; +import com.eternalcode.core.feature.home.messages.ENHomeMessages; +import com.eternalcode.core.feature.jail.messages.ENJailMessages; import com.eternalcode.core.feature.language.Language; -import com.eternalcode.core.feature.warp.WarpInventoryItem; +import com.eternalcode.core.feature.privatechat.messages.ENPrivateMessages; +import com.eternalcode.core.feature.randomteleport.messages.ENRandomTeleportMessages; +import com.eternalcode.core.feature.spawn.messages.ENSpawnMessages; +import com.eternalcode.core.feature.sudo.messages.ENSudoMessages; +import com.eternalcode.core.feature.teleportrequest.messages.ENTeleportRequestMessages; +import com.eternalcode.core.feature.time.messages.ENTimeAndWeatherMessages; +import com.eternalcode.core.feature.warp.messages.ENWarpMessages; import com.eternalcode.core.translation.AbstractTranslation; -import com.eternalcode.multification.bukkit.notice.BukkitNotice; import com.eternalcode.multification.notice.Notice; import lombok.Getter; import lombok.experimental.Accessors; import net.dzikoysk.cdn.entity.Contextual; import net.dzikoysk.cdn.entity.Description; import org.bukkit.Material; -import org.bukkit.Sound; import org.bukkit.event.entity.EntityDamageEvent; import java.util.Arrays; -import java.util.Collection; import java.util.Collections; -import java.util.HashMap; import java.util.List; import java.util.Map; @@ -96,36 +104,7 @@ public class ENTranslation extends AbstractTranslation { " " }) @Description("# This section is responsible for all messages used during bad of a command argument") - public ENArgumentSection argument = new ENArgumentSection(); - - @Getter - @Contextual - public static class ENArgumentSection implements ArgumentSection { - @Description("# {PERMISSIONS} - Required permission") - public Notice permissionMessage = Notice.chat("You don't have permission to perform this command! ({PERMISSIONS})"); - - @Description({" ", "# {USAGE} - Correct usage"}) - public Notice usageMessage = Notice.chat("Correct usage: {USAGE}"); - public Notice usageMessageHead = Notice.chat("Correct usage:"); - public Notice usageMessageEntry = Notice.chat("{USAGE}"); - - @Description(" ") - public Notice missingPlayerName = Notice.chat("You must provide a player name!"); - public Notice offlinePlayer = Notice.chat("This player is currently offline!"); - public Notice onlyPlayer = Notice.chat("Command is only for players!"); - public Notice numberBiggerThanOrEqualZero = Notice.chat("The number must be greater than or equal to 0!"); - public Notice noItem = Notice.chat("You need item to use this command!"); - public Notice noMaterial = Notice.chat("This item doesn't exist"); - public Notice noArgument = Notice.chat("This argument doesn't exist"); - public Notice noDamaged = Notice.chat("This item can't be repaired"); - public Notice noDamagedItems = Notice.chat("You need damaged items to use this command!"); - public Notice noEnchantment = Notice.chat("This enchantment doesn't exist"); - public Notice noValidEnchantmentLevel = Notice.chat("This enchantment level is not supported!"); - public Notice invalidTimeFormat = Notice.chat("Invalid time format!"); - public Notice worldDoesntExist = Notice.chat("World {WORLD} doesn't exist!"); - public Notice incorrectNumberOfChunks = Notice.chat("Incorrect number of chunks!"); - public Notice incorrectLocation = Notice.chat("Incorrect location format! ({LOCATION})"); - } + public ENArgumentMessages argument = new ENArgumentMessages(); @Description({ " ", @@ -145,46 +124,19 @@ public static class ENFormatSection implements Format { " ", "# This section is responsible for the player support chat /helpop", }) - public ENHelpOpSection helpOp = new ENHelpOpSection(); - - @Getter - @Contextual - public static class ENHelpOpSection implements HelpOpSection { - @Description("# {PLAYER} - Player who send message on /helpop, {TEXT} - message") - public Notice format = Notice.chat("[HelpOp] {PLAYER}: {TEXT}"); - @Description(" ") - public Notice send = Notice.chat("This message has been successfully sent to administration"); - @Description("# {TIME} - Time to next use (cooldown)") - public Notice helpOpDelay = Notice.chat("You can use this command for: {TIME}"); - } + public ENHelpOpMessages helpOp = new ENHelpOpMessages(); @Description({ " ", "# This section is responsible for the communication between administration", }) - public ENAdminChatSection adminChat = new ENAdminChatSection(); - - @Getter - @Contextual - public static class ENAdminChatSection implements AdminChatSection { - @Description({"# {PLAYER} - Player who sent message on adminchat, {TEXT} - message"}) - public Notice format = Notice.chat("[AdminChat] {PLAYER}: {TEXT}"); - } + public ENAdminChatMessages adminChat = new ENAdminChatMessages(); @Description({ " ", "# This section is responsible for the messages of the /sudo command", }) - public ENSudoSection sudo = new ENSudoSection(); - - @Getter - @Contextual - public static class ENSudoSection implements SudoSection { - @Description({"# {PLAYER} - Player who executed the command, {COMMAND} - Command that the player executed"}) - public Notice sudoMessageSpy = Notice.chat("[Sudo] {PLAYER} executed command: {COMMAND}"); - public Notice sudoMessage = Notice.chat("You executed command: {COMMAND} on player: {PLAYER}"); - } - + public ENSudoMessages sudo = new ENSudoMessages(); @Description({ " ", @@ -238,30 +190,7 @@ public static class ENTeleportSection implements TeleportSection { " ", "# This section is responsible for messages related to random teleport", }) - public ENRandomTeleportSection randomTeleport = new ENRandomTeleportSection(); - - @Getter - @Contextual - public static class ENRandomTeleportSection implements RandomTeleportSection { - public Notice randomTeleportStarted = Notice.builder() - .chat("Teleportation to a random location has started!") - .title("Random teleport") - .subtitle("Searching, please wait...") - .build(); - - public Notice randomTeleportFailed = Notice.chat("A safe location could not be found, please try again!"); - - - @Description({"# {PLAYER} - Player who has been teleported, {WORLD} - World name, {X} - X coordinate, {Y} - Y coordinate, {Z} - Z coordinate"}) - public Notice teleportedToRandomLocation = Notice.chat("You have been teleported to a random location!"); - - @Description(" ") - public Notice teleportedSpecifiedPlayerToRandomLocation = Notice.chat("You have teleported {PLAYER} to a random location! His current location is: world: {WORLD}, x: {X}, y: {Y}, z: {Z}."); - - @Description({" ", "# {TIME} - Time to next use (cooldown)"}) - public Notice randomTeleportDelay = Notice.chat("You can use random teleport after {TIME}!"); - - } + public ENRandomTeleportMessages randomTeleport = new ENRandomTeleportMessages(); public ENChatSection chat = new ENChatSection(); @@ -316,207 +245,25 @@ public static class ENChatSection implements ChatSection { "# This section is responsible for handling tpa requests,", "# It gives you the ability to edit queries of this type", }) - public ENTpaSection tpa = new ENTpaSection(); - - @Getter - @Contextual - public static class ENTpaSection implements TpaSection { - public Notice tpaSelfMessage = Notice.chat("You can't teleport to yourself!"); - public Notice tpaAlreadySentMessage = Notice.chat("You have already sent a teleportation request!"); - public Notice tpaSentMessage = Notice.chat("You have sent a request for teleportation to a player: {PLAYER}!"); - - @Description({ - " ", - "# We used MiniMessages formatting in these messages", - "# The current request acceptance message allows the player to click on it to accept the teleport request with MiniMessages!", - "# More information about MiniMessages: https://docs.adventure.kyori.net/minimessage/format.html", - }) - @Description({" ", "# {PLAYER} - Player who sent the request to another player"}) - public Notice tpaReceivedMessage = Notice.builder() - .chat("You have received a request for teleportation from a player: {PLAYER}!") - .chat("Accept request for teleports?'>» /tpaccept {PLAYER} to accept! (Click)") - .chat("Decline a teleportation request?'>» /tpdeny {PLAYER} to deny! (Click)") - .build(); - - @Description(" ") - public Notice tpaDenyNoRequestMessage = Notice.chat("You do not have a teleport request from this player!"); - - @Description({" ", "# {PLAYER} - Player who sent a request to teleport to another player"}) - public Notice tpaDenyDoneMessage = Notice.chat("You have declined a teleport request from a player: {PLAYER}!"); - - @Description({" ", "# {PLAYER} - Player who declines the tpa request"}) - public Notice tpaDenyReceivedMessage = Notice.chat("Player: {PLAYER} rejected your teleport request!"); - - @Description(" ") - public Notice tpaDenyAllDenied = Notice.chat("All players have denied your teleport request!"); - - @Description({" ", "# {PLAYER} - Player who sent tpa request to another player"}) - public Notice tpaAcceptMessage = Notice.chat("You have accepted the teleportation from the player: {PLAYER}!"); - - @Description(" ") - public Notice tpaAcceptNoRequestMessage = Notice.chat("This player has not sent you a teleport request!"); - - @Description({" ", "# {PLAYER} - Player who sent a request to teleport to another player"}) - public Notice tpaAcceptReceivedMessage = Notice.chat("Player: {PLAYER} accepted your teleportation request!"); - - @Description(" ") - public Notice tpaAcceptAllAccepted = Notice.chat("All players have accepted your teleport request!"); - - @Description(" ") - public Notice tpaTargetIgnoresYou = Notice.chat("{PLAYER} is ignoring you!"); - } + public ENTeleportRequestMessages tpa = new ENTeleportRequestMessages(); @Description({ " ", "# This section is responsible for setting and editing fast travel points - warp", }) - public ENWarpSection warp = new ENWarpSection(); - - @Getter - @Contextual - public static class ENWarpSection implements WarpSection { - @Description("# {WARP} - Warp name") - public Notice warpAlreadyExists = Notice.chat("Warp {WARP} already exists!"); - public Notice create = Notice.chat("Warp {WARP} has been created."); - public Notice remove = Notice.chat("Warp {WARP} has been deleted."); - public Notice notExist = Notice.chat("This warp doesn't exist"); - public Notice itemAdded = Notice.chat("Warp has been added to GUI!"); - public Notice noWarps = Notice.chat("There are no warps!"); - public Notice itemLimit = Notice.chat("You have reached the limit of warps! Your limit is {LIMIT}."); - public Notice noPermission = Notice.chat("You don't have permission to use this warp ({WARP})!"); - public Notice addPermissions = Notice.chat("Added permissions to warp {WARP}!"); - public Notice removePermission = Notice.chat("Removed permission {PERMISSION} from warp {WARP}!"); - public Notice noPermissionsProvided = Notice.chat("No permissions provided!"); - public Notice permissionDoesNotExist = Notice.chat("Permission {PERMISSION} doesn't exist!"); - public Notice permissionAlreadyExist = Notice.chat("Permission {PERMISSION} already exists!"); - public Notice noPermissionAssigned = Notice.chat("There are no permissions assigned to this warp!"); - public Notice missingWarpArgument = Notice.chat("You must provide a warp name!"); - public Notice missingPermissionArgument = Notice.chat("You must provide a permission!"); - - @Description({" ", "# {WARPS} - List of warps (separated by commas)"}) - public Notice available = Notice.chat("Available warps: {WARPS}"); - - @Description({" ", "# Settings for warp inventory"}) - public ENWarpInventory warpInventory = new ENWarpInventory(); - - @Getter - @Contextual - public static class ENWarpInventory implements WarpInventorySection { - public String title = "» Available warps:"; - - @Description({" ", "# Warps located inside GUI inventory can be customized here. More warps will be added on creation with /setwarp command. "}) - public Map items = new HashMap<>(); - - public void setItems(Map items) { - this.items = items; - } - - public ENBorderSection border = new ENBorderSection(); - public ENDecorationItemsSection decorationItems = new ENDecorationItemsSection(); - - @Getter - @Contextual - public static class ENBorderSection implements BorderSection { - - @Description({" ", "# Changes of border section may affect the appearance of the GUI inventory, after changes adjust slots of existing items."}) - public boolean enabled = true; - - public Material material = Material.GRAY_STAINED_GLASS_PANE; - - public BorderSection.FillType fillType = BorderSection.FillType.BORDER; - - public String name = ""; - - public List lore = Collections.emptyList(); - } - - @Getter - @Contextual - public static class ENDecorationItemsSection implements DecorationItemsSection { - public List items = List.of(); - } - } - } + public ENWarpMessages warp = new ENWarpMessages(); @Description({ " ", "# The following section is responsible for setting and editing personal fast travel points - home", }) - public ENHomeSection home = new ENHomeSection(); - - @Getter - @Contextual - public static class ENHomeSection implements HomeSection { - @Description("# {HOMES} - List of homes (separated by commas)") - public Notice homeList = Notice.chat("Available homes: {HOMES}"); - - @Description({" ", "# {HOME} - Home name"}) - public Notice create = Notice.chat("Home {HOME} has been created."); - public Notice delete = Notice.chat("Home {HOME} has been deleted."); - public Notice overrideHomeLocation = Notice.chat("Home {HOME} has been overridden."); - @Description({" ", "# {LIMIT} - Homes limit"}) - public Notice limit = Notice.chat("You have reached the limit of homes! Your limit is {LIMIT}."); - public Notice noHomesOwned = Notice.chat("You don't have any homes."); - - @Description({" ", "# Placeholders messages"}) - public String noHomesOwnedPlaceholder = "You don't have any homes."; - - @Description({ - " ", - "# Home Admin Section, you can edit player homes as admin", - "# {HOME} - Home name, {PLAYER} - Player name, {HOMES} - List of homes (separated by commas)" - }) - public Notice overrideHomeLocationAsAdmin = Notice.chat("Home {HOME} has been overridden for {PLAYER}."); - public Notice playerNoOwnedHomes = Notice.chat("Player {PLAYER} doesn't have any homes."); - public Notice createAsAdmin = Notice.chat("Home {HOME} has been created for {PLAYER}."); - public Notice deleteAsAdmin = Notice.chat("Home {HOME} has been deleted for {PLAYER}."); - public Notice homeListAsAdmin = Notice.chat("Available homes for {PLAYER}: {HOMES}"); - } + public ENHomeMessages home = new ENHomeMessages(); @Description({ " ", "# This section is responsible for setting and editing private messages." }) - public ENPrivateSection privateChat = new ENPrivateSection(); - - @Getter - @Contextual - public static class ENPrivateSection implements PrivateChatSection { - public Notice noReply = Notice.chat("You have no one to reply!"); - - @Description("# {TARGET} - Player that you want to send messages, {MESSAGE} - Message") - public Notice privateMessageYouToTarget = Notice.chat("[You -> {TARGET}]: {MESSAGE}"); - - @Description({" ", "# {SENDER} - Message sender, {MESSAGE} - Message"}) - public Notice privateMessageTargetToYou = Notice.chat("[{SENDER} -> You]: {MESSAGE}"); - - @Description("# {SENDER} - Sender, {TARGET} - Target, {MESSAGE} - Message") - public Notice socialSpyMessage = Notice.chat("[ss] [{SENDER} -> {TARGET}]: {MESSAGE}"); - - @Description(" ") - public Notice socialSpyEnable = Notice.chat("SocialSpy has been {STATE}!"); - public Notice socialSpyDisable = Notice.chat("SocialSpy has been {STATE}!"); - - @Description({" ", "# {PLAYER} - Ignored player"}) - public Notice ignorePlayer = Notice.chat("► {PLAYER} player has been ignored!"); - - @Description(" ") - public Notice ignoreAll = Notice.chat("All players have been ignored!"); - public Notice cantIgnoreYourself = Notice.chat("You can't ignore yourself!"); - - @Description({" ", "# {PLAYER} - Ignored player."}) - public Notice alreadyIgnorePlayer = Notice.chat("You already ignore this player!"); - - @Description("# {PLAYER} - Unignored player") - public Notice unIgnorePlayer = Notice.chat("{PLAYER} player has been uningored!"); - - @Description(" ") - public Notice unIgnoreAll = Notice.chat("All players have been uningored!"); - public Notice cantUnIgnoreYourself = Notice.chat("You can't unignore yourself!"); - - @Description({" ", "# {PLAYER} - Ignored player"}) - public Notice notIgnorePlayer = Notice.chat("You don't ignore this player, so you can unignore him!"); - } + public ENPrivateMessages privateChat = new ENPrivateMessages(); @Description({ " ", @@ -705,18 +452,7 @@ public static class ENPlayerSection implements PlayerSection { } @Description({" ", "# This section is responsible for spawn-related stuff."}) - public ENSpawnSection spawn = new ENSpawnSection(); - - @Getter - @Contextual - public static class ENSpawnSection implements SpawnSection { - public Notice spawnSet = Notice.chat("Spawn set!"); - public Notice spawnNoSet = Notice.chat("Spawn is not set!"); - @Description({" ", "# {PLAYER} - Player who teleported you to spawn"}) - public Notice spawnTeleportedBy = Notice.chat("You have been teleported to spawn by {PLAYER}!"); - @Description({" ", "# {PLAYER} - Teleported player"}) - public Notice spawnTeleportedOther = Notice.chat("You teleported player {PLAYER} to spawn!"); - } + public ENSpawnMessages spawn = new ENSpawnMessages(); @Description({ " ", @@ -772,24 +508,7 @@ public static class ENItemSection implements ItemSection { @Description({" ", "# Messages sent on time and weather change."}) - public ENTimeAndWeatherMessageSection timeAndWeather = new ENTimeAndWeatherMessageSection(); - - @Getter - @Contextual - public static class ENTimeAndWeatherMessageSection implements TimeAndWeatherSection { - @Description("# {WORLD} - World name") - public Notice timeSetDay = Notice.chat("Time set to day in the {WORLD}!"); - public Notice timeSetNight = Notice.chat("Time set to night in the {WORLD}!"); - - @Description("# {TIME} - Changed time in ticks") - public Notice timeSet = Notice.chat("Time set to {TIME}"); - public Notice timeAdd = Notice.chat("Time added {TIME}"); - - @Description("# {WORLD} - World name") - public Notice weatherSetRain = Notice.chat("Weather set to rain in the {WORLD}!"); - public Notice weatherSetSun = Notice.chat("Weather set to sun in the {WORLD}!"); - public Notice weatherSetThunder = Notice.chat("Weather set to thunder in the {WORLD}!"); - } + public ENTimeAndWeatherMessages timeAndWeather = new ENTimeAndWeatherMessages(); @Description({" ", "# Messages responsible for containers"}) public ENContainerSection container = new ENContainerSection(); @@ -829,89 +548,8 @@ public static class ENLanguageSection implements LanguageSection { } @Description({" ", "# Auto message"}) - public ENAutoMessageSection autoMessage = new ENAutoMessageSection(); - - @Getter - @Contextual - public static class ENAutoMessageSection implements AutoMessageSection { - - @Description({ - "", - "# If you want to useplaceholder %server_online% you need to install", - "# PlaceholderAPI plugin and download placeholders for Server", - "# like /papi ecloud download Server", - }) - public Map messages = Map.of( - "1", BukkitNotice.builder() - .actionBar("» There are %server_online% people online on the server!") - .sound(Sound.ITEM_ARMOR_EQUIP_IRON, 1.0f, 1.0f) - .build(), - - "2", BukkitNotice.builder() - .chat("» You need help from an admin?") - .chat("» Type command /helpop to ask!") - .chat("» Click to execute!") - .sound(Sound.BLOCK_ANVIL_BREAK, 1.0f, 1.0f) - .build() - ); - - public Notice enabled = Notice.chat("Enabled auto messages!"); - public Notice disabled = Notice.chat("Disabled auto messages!"); - - @Override - public Collection messages() { - return this.messages.values(); - } - - @Override - public Notice enabled() { - return this.enabled; - } - - @Override - public Notice disabled() { - return this.disabled; - } - } - + public ENAutoMessageMessages autoMessage = new ENAutoMessageMessages(); @Description({" ", "# This section is responsible for handling jail-related stuff."}) - public ENJailSection jailSection = new ENJailSection(); - - @Getter - @Contextual - public static class ENJailSection implements JailSection { - @Description({" ", "# Section responsible for location of jail setup"}) - public Notice jailLocationSet = Notice.chat("Jail location has been set!"); - public Notice jailLocationRemove = Notice.chat("Jail location has been removed!"); - public Notice jailLocationNotSet = Notice.chat("Jail location is not set!"); - public Notice jailLocationOverride = Notice.chat("Jail location has been overridden!"); - - @Description({" ", "# Section responsible for detaining players"}) - public Notice jailDetainPrivate = Notice.chat("You have been jailed!"); - public Notice jailCannotUseCommand = Notice.chat("You can't use this command! You are in jail!"); - @Description({" ", "# {PLAYER} - Player who has been detained"}) - public Notice jailDetainOverride = Notice.chat("You have overridden the jail for {PLAYER} !"); - @Description({" ", "# {PLAYER} - Player who has been detained"}) - public Notice jailDetainBroadcast = Notice.chat("Player {PLAYER} has been jailed!"); - @Description({" ", "# {REMAINING_TIME} - Time left to release"}) - public Notice jailDetainCountdown = Notice.actionbar(" You are in jail! Time left: {REMAINING_TIME}!"); - @Description({" ", "# {PLAYER} - Admin who you can't detain"}) - public Notice jailDetainAdmin = Notice.chat("You can't jail {PLAYER} because he is an admin!"); - - @Description({" ", "# Section responsible for releasing players from jail"}) - @Description({" ", "# {PLAYER} - Player who has been released from jail"}) - public Notice jailReleaseBroadcast = Notice.chat("Player {PLAYER} has been granted freedom!"); - public Notice jailReleasePrivate = Notice.actionbar(" You have been released from jail!"); - public Notice jailReleaseAll = Notice.chat("All players have been released from jail!"); - public Notice jailReleaseNoPlayers = Notice.chat("No players found in jail!"); - @Description({" ", "# {PLAYER} - Player nickname"}) - public Notice jailIsNotPrisoner = Notice.chat("Player {PLAYER} is not a prisoner!"); - - @Description({" ", "# Section responsible for listing players in jail"}) - public Notice jailListHeader = Notice.chat("Players in jail: "); - public Notice jailListEmpty = Notice.chat("No players found in jail!"); - @Description({" ", "# {PLAYER} - Player who has been detained", "# {REMAINING_TIME} - Time of detention", "# {DETAINED_BY} - Player who detained the player"}) - public Notice jailListPlayerEntry = Notice.chat("{PLAYER} ({REMAINING_TIME}) detained by {DETAINED_BY} !"); - } + public ENJailMessages jailSection = new ENJailMessages(); } diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/translation/implementation/PLTranslation.java b/eternalcore-core/src/main/java/com/eternalcode/core/translation/implementation/PLTranslation.java index 431f05047..3fc92185f 100644 --- a/eternalcore-core/src/main/java/com/eternalcode/core/translation/implementation/PLTranslation.java +++ b/eternalcore-core/src/main/java/com/eternalcode/core/translation/implementation/PLTranslation.java @@ -1,24 +1,32 @@ package com.eternalcode.core.translation.implementation; +import com.eternalcode.core.bridge.litecommand.argument.messages.PLArgumentMessages; import com.eternalcode.core.configuration.contextual.ConfigItem; +import com.eternalcode.core.feature.adminchat.messages.PLAdminChatMessages; import com.eternalcode.core.feature.afk.messages.PLAfkMessages; +import com.eternalcode.core.feature.automessage.messages.PLAutoMessageMessages; +import com.eternalcode.core.feature.helpop.messages.PLHelpOpMessages; +import com.eternalcode.core.feature.home.messages.PLHomeMessages; +import com.eternalcode.core.feature.jail.messages.PLJailMessages; import com.eternalcode.core.feature.language.Language; -import com.eternalcode.core.feature.warp.WarpInventoryItem; +import com.eternalcode.core.feature.privatechat.messages.PLPrivateChatMessages; +import com.eternalcode.core.feature.randomteleport.messages.PLRandomTeleportMessages; +import com.eternalcode.core.feature.spawn.messages.PLSpawnMessages; +import com.eternalcode.core.feature.sudo.messages.PLSudoMessages; +import com.eternalcode.core.feature.teleportrequest.messages.PLTeleportRequestMessages; +import com.eternalcode.core.feature.time.messages.PLTimeAndWeatherMessages; +import com.eternalcode.core.feature.warp.messages.PLWarpMessages; import com.eternalcode.core.translation.AbstractTranslation; -import com.eternalcode.multification.bukkit.notice.BukkitNotice; import com.eternalcode.multification.notice.Notice; import lombok.Getter; import lombok.experimental.Accessors; import net.dzikoysk.cdn.entity.Contextual; import net.dzikoysk.cdn.entity.Description; import org.bukkit.Material; -import org.bukkit.Sound; import org.bukkit.event.entity.EntityDamageEvent; import java.util.Arrays; -import java.util.Collection; import java.util.Collections; -import java.util.HashMap; import java.util.List; import java.util.Map; @@ -93,36 +101,7 @@ public class PLTranslation extends AbstractTranslation { }) @Description("# Ta sekcja odpowiada za wszystkie wiadomości wykorzystywane podczas złego użycia argumentu komendy") - public PLArgumentSection argument = new PLArgumentSection(); - - @Getter - @Contextual - public static class PLArgumentSection implements ArgumentSection { - @Description("# {PERMISSIONS} - Wyświetla wymagane uprawnienia") - public Notice permissionMessage = Notice.chat("Nie masz uprawnień do tej komendy! ({PERMISSIONS})"); - - @Description({" ", "# {USAGE} - Wyświetla poprawne użycie komendy"}) - public Notice usageMessage = Notice.chat("Poprawne użycie: {USAGE}"); - public Notice usageMessageHead = Notice.chat("Poprawne użycie:"); - public Notice usageMessageEntry = Notice.chat("{USAGE}"); - - @Description(" ") - public Notice missingPlayerName = Notice.chat("Musisz podać nazwę gracza!"); - public Notice offlinePlayer = Notice.chat("Ten gracz jest obecnie offline!"); - public Notice onlyPlayer = Notice.chat("Ta komenda jest dostępna tylko dla graczy!"); - public Notice numberBiggerThanOrEqualZero = Notice.chat("Liczba musi być równa lub większa od 0!"); - public Notice noItem = Notice.chat("Musisz trzymać przedmiot w dłoni!"); - public Notice noMaterial = Notice.chat("Taki materiał nie istnieje!"); - public Notice noArgument = Notice.chat("Taki argument nie istnieje!"); - public Notice noDamaged = Notice.chat("Ten przedmiot nie może być naprawiony!"); - public Notice noDamagedItems = Notice.chat("Musisz posiadać uszkodzone przedmioty!"); - public Notice noEnchantment = Notice.chat("Takie zaklęcie nie istnieje!"); - public Notice noValidEnchantmentLevel = Notice.chat("Ten poziom zaklęcia nie jest wspierany!"); - public Notice invalidTimeFormat = Notice.chat("Nieprawidłowy format czasu!"); - public Notice worldDoesntExist = Notice.chat("Świat {WORLD} nie istnieje!"); - public Notice incorrectNumberOfChunks = Notice.chat("Niepoprawna liczba chunków!"); - public Notice incorrectLocation = Notice.chat("Niepoprawna lokalizacja! ({LOCATION})"); - } + public PLArgumentMessages argument = new PLArgumentMessages(); @Description({ " ", @@ -142,45 +121,19 @@ public static class PLFormatSection implements Format { " ", "# Ta sekcja odpowiada za czat pomocy dla graczy, który jest widoczny dla administracji" }) - public PLHelpOpSection helpOp = new PLHelpOpSection(); - - @Getter - @Contextual - public static class PLHelpOpSection implements HelpOpSection { - @Description({"# {PLAYER} - Gracz który wysłał wiadomość na helpop, {TEXT} - Treść wysłanej wiadomości"}) - public Notice format = Notice.chat("[HelpOp] {PLAYER}: {TEXT}"); - @Description(" ") - public Notice send = Notice.chat("Wiadomość została wysłana do administracji"); - @Description("# {TIME} - Czas do końca blokady (cooldown)") - public Notice helpOpDelay = Notice.chat("Możesz użyć tej komendy dopiero za {TIME}!"); - } + public PLHelpOpMessages helpOp = new PLHelpOpMessages(); @Description({ " ", "# Ta sekcja odpowiada za czat komunikacji między administracją" }) - public PLAdminChatSection adminChat = new PLAdminChatSection(); - - @Getter - @Contextual - public static class PLAdminChatSection implements AdminChatSection { - @Description({"# {PLAYER} - Gracz który wysłał wiadomość na czacie administracji, {TEXT} - Treść wysłanej wiadomości"}) - public Notice format = Notice.chat("[Administracja] {PLAYER}: {TEXT}"); - } + public PLAdminChatMessages adminChat = new PLAdminChatMessages(); @Description({ " ", "# Ta sekcja odpowiada za wiadmości komendy /sudo" }) - public PLSudoSection sudo = new PLSudoSection(); - - @Getter - @Contextual - public static class PLSudoSection implements SudoSection { - @Description({"# {PLAYER} - Gracz który wykonał komendę, {COMMAND} - Komenda, którą wykonał gracz"}) - public Notice sudoMessageSpy = Notice.chat("[Sudo] {PLAYER} wykonał komendę: {COMMAND}"); - public Notice sudoMessage = Notice.chat("Wykonałeś komendę: {COMMAND} na graczu: {PLAYER}"); - } + public PLSudoMessages sudo = new PLSudoMessages(); @Description({ " ", @@ -238,28 +191,7 @@ public static class PLTeleportSection implements TeleportSection { " ", "# Ta sekcja odpowiada za edycję komunikatów losowej teleportacji", }) - public PLRandomTeleportSection randomTeleport = new PLRandomTeleportSection(); - - @Getter - @Contextual - public static class PLRandomTeleportSection implements RandomTeleportSection { - @Description(" ") - public Notice randomTeleportStarted = Notice.builder() - .chat("Rozpoczynanie procesu losowania lokalizacji...") - .title("Losowy teleport") - .subtitle("Wyszukiwanie lokalizacji, proszę czekać...") - .build(); - - public Notice randomTeleportFailed = Notice.chat("Nie udało się znaleźć bezpiecznej lokalizacji, spróbuj ponownie!"); - - public Notice teleportedToRandomLocation = Notice.chat("Zostałeś przeteleportowany na losową lokalizację!"); - - @Description({"# {PLAYER} - Gracz który został teleportowany, {WORLD} - Świat, {X} - Koordynat X, {Y} - Koordynat Y, {Z} - Koordynat Z"}) - public Notice teleportedSpecifiedPlayerToRandomLocation = Notice.chat("Przeteleportowałeś gracza {PLAYER} na losową lokalizację! Jego aktualna lokalizacja to: świat: {WORLD} x: {X}, y: {Y}, z: {Z}."); - - @Description({" ", "# {TIME} - Czas do następnego użycia komendy (cooldown)"}) - public Notice randomTeleportDelay = Notice.chat("Możesz skorzystać z losowej teleportacji dopiero za {TIME}!"); - } + public PLRandomTeleportMessages randomTeleport = new PLRandomTeleportMessages(); @Description({ " ", @@ -318,214 +250,25 @@ public static class PLChatSection implements ChatSection { "# Ta sekcja odpowiada za obsługę zapytań tpa,", "# Daje możliwość edycji dotyczących tego typu zapytań ", }) - public PLTpaSection tpa = new PLTpaSection(); - - @Getter - @Contextual - public static class PLTpaSection implements TpaSection { - public Notice tpaSelfMessage = Notice.chat("Nie możesz teleportować się samodzielnie!"); - public Notice tpaAlreadySentMessage = Notice.chat("Już wysłałeś prośbę o teleportację!"); - @Description({" ", "# {PLAYER} - Gracz który wysłał prośbę o teleportację"}) - public Notice tpaSentMessage = Notice.chat("Wysłałeś prośbę o teleportację do gracza: {PLAYER}!"); - - @Description({ - " ", - "# W tych wiadomościach użyliśmy formatowania MiniMessages", - "# Obecna wiadomość od akceptacji prośby umożliwia graczowi kliknięcie w nią, aby zaakceptować prośbę o teleportację dzięki MiniMessages!", - "# Więcej informacji znajdziesz na stronie: https://docs.adventure.kyori.net/minimessage/format.html", - }) - @Description({" ", "# {PLAYER} - Gracz który wysłał prośbę o teleportacje do innego gracza"}) - public Notice tpaReceivedMessage = Notice.builder() - .chat("Otrzymałeś prośbę o teleportację od gracza: {PLAYER}!") - .chat("Akceptować prośbę o teleportacje?'>» /tpaccept {PLAYER} by ją zaakceptować! (Kliknij)") - .chat("Odrzucić prośbę o teleportacje?'>» /tpdeny {PLAYER} by ją odrzucić! (Kliknij)") - .build(); - - @Description(" ") - public Notice tpaDenyNoRequestMessage = Notice.chat("Nie otrzymałeś prośby o teleportację od tego gracza!"); - - @Description({" ", "# {PLAYER} - Gracz który wysłał prośbę o teleportacje do innego gracza"}) - public Notice tpaDenyDoneMessage = Notice.chat("Odrzuciłeś prośbę o teleportację od gracza: {PLAYER}!"); - - @Description({" ", "# {PLAYER} - Gracz który odrzucił prośbę o teleportacje"}) - public Notice tpaDenyReceivedMessage = Notice.chat("Gracz: {PLAYER} odrzucił twoją prośbę o teleportację!"); - - @Description(" ") - public Notice tpaDenyAllDenied = Notice.chat("Odrzucono wszystkie prośby o teleportację!"); - - @Description({" ", "# {PLAYER} - Gracz który wysłał prośbę o teleportacje do innego gracza"}) - public Notice tpaAcceptMessage = Notice.chat("Zaakceptowałeś prośbę o teleportację od gracza: {PLAYER}!"); - - @Description(" ") - public Notice tpaAcceptNoRequestMessage = Notice.chat("Ten gracz nie wysłał do ciebie prośby o teleportację!"); - - @Description({" ", "# {PLAYER} - Gracz który wysłał prośbę o teleportacje do innego gracza"}) - public Notice tpaAcceptReceivedMessage = Notice.chat("Gracz: {PLAYER} zaakceptował twoją prośbę o teleportację!"); - - @Description(" ") - public Notice tpaAcceptAllAccepted = Notice.chat("Zaakceptowano wszystkie prośby o teleportację!"); - - @Description(" ") - public Notice tpaTargetIgnoresYou = Notice.chat("{PLAYER} ignoruje Cię!"); - } + public PLTeleportRequestMessages tpa = new PLTeleportRequestMessages(); @Description({ " ", "# Ta sekcja odpowiada za ustawianie i edycję punktów szybkiej podróży - warp", }) - public PLWarpSection warp = new PLWarpSection(); - - @Getter - @Contextual - public static class PLWarpSection implements WarpSection { - @Description("# {WARP} - Nazwa warpu") - public Notice warpAlreadyExists = Notice.chat("Warp o nazwie {WARP} już istnieje!"); - public Notice create = Notice.chat("Stworzono warp {WARP}!"); - public Notice remove = Notice.chat("Usunięto warp {WARP}!"); - public Notice notExist = Notice.chat("Nie odnaleziono takiego warpu!"); - public Notice itemAdded = Notice.chat("Dodano warp do GUI!"); - public Notice noWarps = Notice.chat("Nie ma dostępnych warpów!"); - public Notice itemLimit = Notice.chat("Osiągnąłeś limit warpów w GUI! Limit to: {LIMIT}!"); - public Notice noPermission = Notice.chat("Nie masz uprawnień do skorzystania z tego warpa {WARP}!"); - public Notice addPermissions = Notice.chat("Dodano uprawnienia do warpa {WARP}!"); - public Notice removePermission = Notice.chat("Usunięto uprawnienie {PERMISSION} z warpa {WARP}!"); - public Notice noPermissionsProvided = Notice.chat("Nie podano żadnych uprawnień!"); - public Notice permissionDoesNotExist = Notice.chat("Podane uprawnienie nie istnieje ({PERMISSION})!"); - public Notice permissionAlreadyExist = Notice.chat("Podane uprawnienie już istnieje ({PERMISSION})!"); - public Notice noPermissionAssigned = Notice.chat("Ten warp nie ma przypisanych żadnych permisji"); - public Notice missingWarpArgument = Notice.chat("Musisz podać nazwę warpu!"); - public Notice missingPermissionArgument = Notice.chat("Musisz podać uprawnienie!"); - - @Description({" ", "# {WARPS} - Lista dostępnych warpów"}) - public Notice available = Notice.chat("Dostepne warpy: {WARPS}!"); - - - @Description({" ", "# Ustawienia gui listy dostępnych warpów"}) - public PLWarpInventory warpInventory = new PLWarpInventory(); - - @Getter - @Contextual - public static class PLWarpInventory implements WarpInventorySection { - public String title = "» Lista dostępnych warpów"; - - @Description({ - " ", - "# Poniższa lista określa przedmioty w GUI, które są wyświetlane w liście dostępnych warpów.", - "# Możesz edytować przedmioty, a dodawanie kolejnych warpów następuje automatycznie za pomocą komendy /setwarp", - }) - public Map items = new HashMap<>(); - - public void setItems(Map items) { - this.items = items; - } - - public PLBorderSection border = new PLBorderSection(); - public PLDecorationItemsSection decorationItems = new PLDecorationItemsSection(); - - @Getter - @Contextual - public static class PLBorderSection implements BorderSection { - @Description({" ", "# Zmiany w tej sekcji mogą wpłynąć na wygląd GUI, zwróć uwagę na zmiany slotów przedmiotów w GUI."}) - public boolean enabled = true; - - public Material material = Material.GRAY_STAINED_GLASS_PANE; - - public BorderSection.FillType fillType = BorderSection.FillType.BORDER; - - public String name = ""; - - public List lore = Collections.emptyList(); - } - - @Getter - @Contextual - public static class PLDecorationItemsSection implements DecorationItemsSection { - public List items = List.of(); - } - } - } + public PLWarpMessages warp = new PLWarpMessages(); @Description({ " ", "# Poniższa sekcja odpowiada za ustawianie i edycję osobistych punktów szybkiej podróży - home", }) - public PLHomeSection home = new PLHomeSection(); - - @Getter - @Contextual - public static class PLHomeSection implements HomeSection { - @Description({" ", "# {HOMES} - Lista domów"}) - public Notice homeList = Notice.chat("Lista domów: {HOMES}!"); - - @Description({" ", "# {HOME} - Nazwa domu"}) - public Notice create = Notice.chat("Stworzono dom o nazwie {HOME}!"); - public Notice delete = Notice.chat("Usunięto dom o nazwie {HOME}!"); - public Notice overrideHomeLocation = Notice.chat("Nadpisałeś lokalizację domu {HOME}!"); - - @Description({" ", "# {LIMIT} - Limit domów"}) - public Notice limit = Notice.chat("Osiągnąłeś limit domów! Twój limit to {LIMIT}."); - public Notice noHomesOwned = Notice.chat("Nie posiadasz żadnego domu!"); - - @Description({" ", "# Wiadomości placeholderów"}) - public String noHomesOwnedPlaceholder = "Nie posiadasz żadnego domu."; - - @Description({ - " ", - "# Sekcja wiadomości administracyjnych dla domów graczy", - "# {HOME} - Nazwa domu, {PLAYER} - Gracz, {HOMES} - Lista domów" - }) - public Notice overrideHomeLocationAsAdmin = Notice.chat("Nadpisałeś lokalizację domu {HOME} dla gracza {PLAYER}!"); - public Notice playerNoOwnedHomes = Notice.chat("Gracz {PLAYER} nie posiada żadnego domu!"); - public Notice createAsAdmin = Notice.chat("Stworzono dom {HOME} dla gracza {PLAYER}!"); - public Notice deleteAsAdmin = Notice.chat("Usunięto dom {HOME} dla gracza {PLAYER}!"); - public Notice homeListAsAdmin = Notice.chat("Lista domów gracza {PLAYER}: {HOMES}!"); - } + public PLHomeMessages home = new PLHomeMessages(); @Description({ " ", "# Ta sekcja odpowiada za ustawianie i edycję wiadomości prywatnych", }) - public PLPrivateChatSection privateChat = new PLPrivateChatSection(); - - @Getter - @Contextual - public static class PLPrivateChatSection implements PrivateChatSection { - public Notice noReply = Notice.chat("Nie możesz nikomu odpowiadać, ponieważ nie otrzymałeś żadnej wiadomości prywatnej!"); - - @Description("# {TARGET} - Gracz do którego chcesz wysłać wiadomość, {MESSAGE} - Treść wiadomości") - public Notice privateMessageYouToTarget = Notice.chat("[Ty -> {TARGET}]: {MESSAGE}"); - - @Description({" ", "# {SENDER} - Gracz który wysłał wiadomość, {MESSAGE} - Treść wiadomości"}) - public Notice privateMessageTargetToYou = Notice.chat("[{SENDER} -> Ty]: {MESSAGE}"); - - - @Description("# {SENDER} - Gracz który wysłał wiadomość, {TARGET} - Gracz do którego wysłał wiadomość, {MESSAGE} - Treść wiadomości") - public Notice socialSpyMessage = Notice.chat("[ss] [{SENDER} -> {TARGET}]: {MESSAGE}"); - - @Description(" ") - public Notice socialSpyEnable = Notice.chat("SocialSpy został {STATE}!"); - public Notice socialSpyDisable = Notice.chat("SocialSpy został {STATE}!"); - - @Description({" ", "# {PLAYER} - Gracz który jest zignorowany"}) - public Notice ignorePlayer = Notice.chat("Zignorowano gracza {PLAYER}!"); - - @Description(" ") - public Notice ignoreAll = Notice.chat("Zignorowano wszystkich graczy!"); - public Notice cantIgnoreYourself = Notice.chat("Nie możesz zignorować samego siebie!"); - - @Description({" ", "# {PLAYER} - Gracz który jest zignorowany"}) - public Notice alreadyIgnorePlayer = Notice.chat("Gracz {PLAYER} jest już zignorowany!"); - - @Description({" ", "# {PLAYER} - Gracz który jest zignorowany"}) - public Notice unIgnorePlayer = Notice.chat("Od ignorowano gracza {PLAYER}!"); - - @Description(" ") - public Notice unIgnoreAll = Notice.chat("Od ignorowano wszystkich graczy!"); - public Notice cantUnIgnoreYourself = Notice.chat("Nie możesz od ignorować samego siebie!"); - - @Description({" ", "# {PLAYER} - Gracz który jest zignorowany"}) - public Notice notIgnorePlayer = Notice.chat("Gracz {PLAYER} nie jest przez Ciebie zignorowany. Nie możesz go od ignorować!"); - } + public PLPrivateChatMessages privateChat = new PLPrivateChatMessages(); @Description({ " ", @@ -724,18 +467,7 @@ public static class PLPlayerSection implements PlayerSection { } @Description({" ", "# Ta sekcja odpowiada za zmianę punktu spawn oraz teleportację graczy na spawn"}) - public PLSpawnSection spawn = new PLSpawnSection(); - - @Getter - @Contextual - public static class PLSpawnSection implements SpawnSection { - public Notice spawnSet = Notice.chat("Ustawiono spawn!"); - public Notice spawnNoSet = Notice.chat("Spawn nie został ustawiony!"); - @Description({" ", "# {PLAYER} - Gracz który teleportował cię na spawn"}) - public Notice spawnTeleportedBy = Notice.chat("Zostałeś przeteleportowany na spawn przez gracza {PLAYER}!"); - @Description("# {PLAYER} - Gracz który został przeteleportowany na spawn") - public Notice spawnTeleportedOther = Notice.chat("Gracz {PLAYER} został przeteleportowany na spawn!"); - } + public PLSpawnMessages spawn = new PLSpawnMessages(); @Description({ " ", @@ -792,24 +524,7 @@ public static class PLItemSection implements ItemSection { " ", "# Komunikaty odpowiedzialne za ustawianie czasu i pogody", }) - public PLTimeAndWeatherMessageSection timeAndWeather = new PLTimeAndWeatherMessageSection(); - - @Getter - @Contextual - public static class PLTimeAndWeatherMessageSection implements TimeAndWeatherSection { - @Description("# {WORLD} - Nazwa świata w którym zmieniono czas") - public Notice timeSetDay = Notice.chat("Ustawiono dzień w świecie {WORLD}!"); - public Notice timeSetNight = Notice.chat("Ustawiono noc w świecie {WORLD}!"); - - @Description({" ", "# {TIME} - Czas"}) - public Notice timeSet = Notice.chat("Ustawiono czas na {TIME}!"); - public Notice timeAdd = Notice.chat("Zmieniono czas o {TIME}!"); - - @Description({" ", "# {WORLD} - Świat w którym ustawiono pogode"}) - public Notice weatherSetRain = Notice.chat("Ustawiono deszcz w świecie {WORLD}!"); - public Notice weatherSetSun = Notice.chat("Ustawiono słoneczną pogodę w świecie {WORLD}!"); - public Notice weatherSetThunder = Notice.chat("Ustawiono burze w świecie {WORLD}!"); - } + public PLTimeAndWeatherMessages timeAndWeather = new PLTimeAndWeatherMessages(); @Description({ " ", @@ -853,87 +568,8 @@ public static class PLLanguageSection implements LanguageSection { } @Description({" ", "# Automatyczne wiadomości "}) - public PLAutoMessageSection autoMessage = new PLAutoMessageSection(); - - @Getter - @Contextual - public static class PLAutoMessageSection implements AutoMessageSection { - @Description({ - "", - "# Jeżeli chcesz użyć placeholder'a %server_online% musisz zainstalować plugin", - "# PlaceholderAPI oraz pobrać placeholdery dla Server'a", - "# za pomocą komendy /papi ecloud download Server", - }) - public Map messages = Map.of( - "1", BukkitNotice.builder() - .actionBar("» Na serwerze jest: %server_online% graczy online!") - .sound(Sound.ITEM_ARMOR_EQUIP_IRON, 1.0f, 1.0f) - .build(), - - "2", BukkitNotice.builder() - .chat("» Potrzebujesz pomocy od admina?") - .chat("» Użyj komendy /helpop aby zgłosić problem!") - .chat("» Kliknij aby wykonać!") - .sound(Sound.BLOCK_ANVIL_BREAK, 1.0f, 1.0f) - .build() - ); - - public Notice enabled = Notice.chat("Włączono automatyczne wiadomości!"); - public Notice disabled = Notice.chat("Wyłączono automatyczne wiadomości!"); - - @Override - public Collection messages() { - return this.messages.values(); - } - - @Override - public Notice enabled() { - return this.enabled; - } - - @Override - public Notice disabled() { - return this.disabled; - } - } + public PLAutoMessageMessages autoMessage = new PLAutoMessageMessages(); @Description({" ", "# Ta sekcja odpowiada za wiadomości dotyczące jail'a"}) - public PLJailSection jailSection = new PLJailSection(); - - @Getter - @Contextual - public static class PLJailSection implements JailSection { - @Description({" ", "# Sekcja odpowiedzialna za ustawianie lokalizacji jail'a"}) - public Notice jailLocationSet = Notice.chat("Ustawiono lokalizację jail'a!"); - public Notice jailLocationRemove = Notice.chat("Usunięto lokalizację jail'a!"); - public Notice jailLocationNotSet = Notice.chat("Lokalizacja jail'a nie została ustawiona!"); - public Notice jailLocationOverride = Notice.chat("Nadpisałeś lokalizację jail'a!"); - - @Description({" ", "# Sekcja odpowiedzialna za wiadomości dotyczące uwięzienia gracza"}) - public Notice jailDetainPrivate = Notice.chat("Zostałeś uwięziony!"); - public Notice jailCannotUseCommand = Notice.chat("Nie możesz użyć tej komendy!"); - @Description({" ", "# {PLAYER} - Gracz który został uwięziony"}) - public Notice jailDetainBroadcast = Notice.chat("Gracz {PLAYER} został uwięziony!"); - @Description({" ", "# {PLAYER} - Gracz który został uwięziony"}) - public Notice jailDetainOverride = Notice.chat("Napisałeś nadaną karę graczowi {PLAYER}!"); - @Description({" ", "# {REMAINING_TIME} - Pozostały czas do uwolnienia"}) - public Notice jailDetainCountdown = Notice.actionbar("Pozostało {REMAINING_TIME} do uwolnienia!"); - @Description({" ", "# {PLAYER} - Administrator którego nie możesz uwięzić"}) - public Notice jailDetainAdmin = Notice.chat("Nie możesz uwięzić administratora {PLAYER}!"); - - @Description({" ", "# Sekcja odpowiedzialna za wiadomości dotyczące uwolnienia gracza"}) - @Description({" ", "# {PLAYER} - Gracz który został uwolniony"}) - public Notice jailReleaseBroadcast = Notice.chat("Gracz {PLAYER} został uwolniony!"); - public Notice jailReleasePrivate = Notice.actionbar("Zostałeś uwolniony!"); - public Notice jailReleaseAll = Notice.chat("Wszyscy gracze zostali uwolnieni!"); - public Notice jailReleaseNoPlayers = Notice.chat("Nikt nie jest uwięziony!"); - @Description({" ", "# {PLAYER} - Nazwa gracza"}) - public Notice jailIsNotPrisoner = Notice.chat("Gracz {PLAYER} nie jest uwięziony!"); - - @Description({" ", "# Sekcja odpowiedzialna za wiadomości dotyczące listy graczy w jail'u"}) - public Notice jailListHeader = Notice.chat("Lista graczy w jail'u:"); - public Notice jailListEmpty = Notice.chat("Nikt nie jest uwięziony!"); - @Description({" ", "# {PLAYER} - Gracz który jest uwięziony, {DETAINED_BY} - Gracz który uwięził gracza, {REMAINING_TIME} - Czas pozostały do uwolnienia"}) - public Notice jailListPlayerEntry = Notice.chat("Gracz {PLAYER} został uwięziony przez {DETAINED_BY} na czas {REMAINING_TIME} !"); - } + public PLJailMessages jailSection = new PLJailMessages(); }