Skip to content

Commit 4bca47d

Browse files
vLuckyyyRollczi
andauthored
GH-906 Reorganize package structure and messages. (#906)
* Move some packages and config sections * Make config's great again. * Fix warp messages. * update warp's * fix setslot. --------- Co-authored-by: Rollczi <[email protected]>
1 parent a4b8b10 commit 4bca47d

File tree

77 files changed

+1560
-1171
lines changed

Some content is hidden

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

77 files changed

+1560
-1171
lines changed

eternalcore-core/src/main/java/com/eternalcode/core/bridge/litecommand/argument/GameModeArgument.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.eternalcode.core.bridge.litecommand.argument;
22

3-
import com.eternalcode.core.feature.essentials.gamemode.GameModeArgumentSettings;
3+
import com.eternalcode.core.feature.gamemode.GameModeArgumentSettings;
44
import com.eternalcode.core.injector.annotations.Inject;
55
import com.eternalcode.core.injector.annotations.lite.LiteArgument;
66
import com.eternalcode.core.translation.Translation;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.eternalcode.core.bridge.litecommand.argument.messages;
2+
3+
import com.eternalcode.multification.notice.Notice;
4+
5+
public interface ArgumentMessages {
6+
Notice missingPlayerName();
7+
Notice permissionMessage();
8+
Notice usageMessage();
9+
Notice usageMessageHead();
10+
Notice usageMessageEntry();
11+
Notice offlinePlayer();
12+
Notice onlyPlayer();
13+
Notice numberBiggerThanOrEqualZero();
14+
Notice noItem();
15+
Notice noArgument();
16+
Notice noDamaged();
17+
Notice noDamagedItems();
18+
Notice noEnchantment();
19+
Notice noValidEnchantmentLevel();
20+
Notice invalidTimeFormat();
21+
Notice worldDoesntExist();
22+
Notice incorrectNumberOfChunks();
23+
Notice incorrectLocation();
24+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
package com.eternalcode.core.bridge.litecommand.argument.messages;
2+
3+
import com.eternalcode.multification.notice.Notice;
4+
import lombok.Getter;
5+
import lombok.experimental.Accessors;
6+
import net.dzikoysk.cdn.entity.Contextual;
7+
import net.dzikoysk.cdn.entity.Description;
8+
9+
@Getter
10+
@Accessors(fluent = true)
11+
@Contextual
12+
public class ENArgumentMessages implements ArgumentMessages {
13+
@Description("# {PERMISSIONS} - Required permission")
14+
public Notice permissionMessage = Notice.chat("<red>✘ <dark_red>You don't have permission to perform this command! <red>({PERMISSIONS})");
15+
16+
@Description({" ", "# {USAGE} - Correct usage"})
17+
public Notice usageMessage = Notice.chat("<gold>✘ <white>Correct usage: <gold>{USAGE}");
18+
public Notice usageMessageHead = Notice.chat("<green>► <white>Correct usage:");
19+
public Notice usageMessageEntry = Notice.chat("<green>► <white>{USAGE}");
20+
21+
@Description(" ")
22+
public Notice missingPlayerName = Notice.chat("<red>✘ <dark_red>You must provide a player name!");
23+
public Notice offlinePlayer = Notice.chat("<red>✘ <dark_red>This player is currently offline!");
24+
public Notice onlyPlayer = Notice.chat("<red>✘ <dark_red>Command is only for players!");
25+
public Notice numberBiggerThanOrEqualZero = Notice.chat("<red>✘ <dark_red>The number must be greater than or equal to 0!");
26+
public Notice noItem = Notice.chat("<red>✘ <dark_red>You need item to use this command!");
27+
public Notice noMaterial = Notice.chat("<red>✘ <dark_red>This item doesn't exist");
28+
public Notice noArgument = Notice.chat("<red>✘ <dark_red>This argument doesn't exist");
29+
public Notice noDamaged = Notice.chat("<red>✘ <dark_red>This item can't be repaired");
30+
public Notice noDamagedItems = Notice.chat("<red>✘ <dark_red>You need damaged items to use this command!");
31+
public Notice noEnchantment = Notice.chat("<red>✘ <dark_red>This enchantment doesn't exist");
32+
public Notice noValidEnchantmentLevel = Notice.chat("<red>✘ <dark_red>This enchantment level is not supported!");
33+
public Notice invalidTimeFormat = Notice.chat("<red>✘ <dark_red>Invalid time format!");
34+
public Notice worldDoesntExist = Notice.chat("<red>✘ <dark_red>World <red>{WORLD} <dark_red>doesn't exist!");
35+
public Notice incorrectNumberOfChunks = Notice.chat("<red>✘ <dark_red>Incorrect number of chunks!");
36+
public Notice incorrectLocation = Notice.chat("<red>✘ <dark_red>Incorrect location format! <red>({LOCATION})");
37+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
package com.eternalcode.core.bridge.litecommand.argument.messages;
2+
3+
import com.eternalcode.multification.notice.Notice;
4+
import lombok.Getter;
5+
import lombok.experimental.Accessors;
6+
import net.dzikoysk.cdn.entity.Contextual;
7+
import net.dzikoysk.cdn.entity.Description;
8+
9+
@Getter
10+
@Accessors(fluent = true)
11+
@Contextual
12+
public class PLArgumentMessages implements ArgumentMessages {
13+
@Description("# {PERMISSIONS} - Wyświetla wymagane uprawnienia")
14+
public Notice permissionMessage =
15+
Notice.chat("<red>✘ <dark_red>Nie masz uprawnień do tej komendy! <red>({PERMISSIONS})");
16+
17+
@Description({" ", "# {USAGE} - Wyświetla poprawne użycie komendy"})
18+
public Notice usageMessage = Notice.chat("<gold>✘ <white>Poprawne użycie: <gold>{USAGE}");
19+
public Notice usageMessageHead = Notice.chat("<gold>✘ <white>Poprawne użycie:");
20+
public Notice usageMessageEntry = Notice.chat("<gold>✘ <white>{USAGE}");
21+
22+
@Description(" ")
23+
public Notice missingPlayerName = Notice.chat("<red>✘ <dark_red>Musisz podać nazwę gracza!");
24+
public Notice offlinePlayer = Notice.chat("<red>✘ <dark_red>Ten gracz jest obecnie offline!");
25+
public Notice onlyPlayer = Notice.chat("<red>✘ <dark_red>Ta komenda jest dostępna tylko dla graczy!");
26+
public Notice numberBiggerThanOrEqualZero = Notice.chat("<red>✘ <dark_red>Liczba musi być równa lub większa od 0!");
27+
public Notice noItem = Notice.chat("<red>✘ <dark_red>Musisz trzymać przedmiot w dłoni!");
28+
public Notice noMaterial = Notice.chat("<red>✘ <dark_red>Taki materiał nie istnieje!");
29+
public Notice noArgument = Notice.chat("<red>✘ <dark_red>Taki argument nie istnieje!");
30+
public Notice noDamaged = Notice.chat("<red>✘ <dark_red>Ten przedmiot nie może być naprawiony!");
31+
public Notice noDamagedItems = Notice.chat("<red>✘ <dark_red>Musisz posiadać uszkodzone przedmioty!");
32+
public Notice noEnchantment = Notice.chat("<red>✘ <dark_red>Takie zaklęcie nie istnieje!");
33+
public Notice noValidEnchantmentLevel = Notice.chat("<red>✘ <dark_red>Ten poziom zaklęcia nie jest wspierany!");
34+
public Notice invalidTimeFormat = Notice.chat("<red>✘ <dark_red>Nieprawidłowy format czasu!");
35+
public Notice worldDoesntExist = Notice.chat("<red>✘ <dark_red>Świat <dark_red>{WORLD} <red>nie istnieje!");
36+
public Notice incorrectNumberOfChunks = Notice.chat("<red>✘ <dark_red>Niepoprawna liczba chunków!");
37+
public Notice incorrectLocation = Notice.chat("<red>✘ <dark_red>Niepoprawna lokalizacja! <red>({LOCATION})");
38+
}

eternalcore-core/src/main/java/com/eternalcode/core/bridge/litecommand/configurator/config/CommandConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.eternalcode.core.bridge.litecommand.configurator.config;
22

33
import com.eternalcode.core.configuration.ReloadableConfig;
4-
import com.eternalcode.core.feature.essentials.gamemode.GameModeArgumentSettings;
4+
import com.eternalcode.core.feature.gamemode.GameModeArgumentSettings;
55
import com.eternalcode.core.injector.annotations.Bean;
66
import com.eternalcode.core.injector.annotations.component.ConfigurationFile;
77
import net.dzikoysk.cdn.entity.Contextual;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.eternalcode.core.feature.adminchat.messages;
2+
3+
import com.eternalcode.multification.notice.Notice;
4+
5+
public interface AdminChatSection {
6+
Notice format();
7+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package com.eternalcode.core.feature.adminchat.messages;
2+
3+
import com.eternalcode.multification.notice.Notice;
4+
import lombok.Getter;
5+
import lombok.experimental.Accessors;
6+
import net.dzikoysk.cdn.entity.Contextual;
7+
import net.dzikoysk.cdn.entity.Description;
8+
9+
@Getter
10+
@Accessors(fluent = true)
11+
@Contextual
12+
public class ENAdminChatMessages implements AdminChatSection {
13+
@Description({"# {PLAYER} - Player who sent message on adminchat, {TEXT} - message"})
14+
public Notice format =
15+
Notice.chat("<dark_gray>[<dark_red>AdminChat<dark_gray>] <red>{PLAYER}<dark_gray>: <white>{TEXT}");
16+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package com.eternalcode.core.feature.adminchat.messages;
2+
3+
import com.eternalcode.multification.notice.Notice;
4+
import lombok.Getter;
5+
import lombok.experimental.Accessors;
6+
import net.dzikoysk.cdn.entity.Contextual;
7+
import net.dzikoysk.cdn.entity.Description;
8+
9+
@Getter
10+
@Accessors(fluent = true)
11+
@Contextual
12+
public class PLAdminChatMessages implements AdminChatSection {
13+
@Description({
14+
"# {PLAYER} - Gracz który wysłał wiadomość na czacie administracji, {TEXT} - Treść wysłanej wiadomości"})
15+
public Notice format =
16+
Notice.chat("<dark_gray>[<dark_red>Administracja<dark_gray>] <red>{PLAYER}<dark_gray>: <white>{TEXT}");
17+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package com.eternalcode.core.feature.afk.messages;
2+
3+
import com.eternalcode.multification.notice.Notice;
4+
5+
public interface AfkMessages {
6+
7+
Notice afkOn();
8+
9+
Notice afkOff();
10+
11+
Notice afkDelay();
12+
13+
String afkKickReason();
14+
15+
String afkEnabledPlaceholder();
16+
17+
String afkDisabledPlaceholder();
18+
19+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package com.eternalcode.core.feature.afk.messages;
2+
3+
import com.eternalcode.multification.notice.Notice;
4+
import lombok.Getter;
5+
import lombok.experimental.Accessors;
6+
import net.dzikoysk.cdn.entity.Contextual;
7+
import net.dzikoysk.cdn.entity.Description;
8+
9+
@Getter
10+
@Accessors(fluent = true)
11+
@Contextual
12+
public class ENAfkMessages implements AfkMessages {
13+
14+
@Description("# {PLAYER} - Player who is in AFK")
15+
public Notice afkOn = Notice.chat("<green>► <white>{PLAYER} is AFK!");
16+
public Notice afkOff = Notice.chat("<green>► <white>{PLAYER} is no more AFK!");
17+
18+
@Description({" ", "# {TIME} - Time after the player can execute the command."})
19+
public Notice afkDelay = Notice.chat("<red>► <dark_red>You can use this command only after <red>{TIME}!");
20+
21+
@Description({" "})
22+
public String afkKickReason = "<red>You have been kicked due to inactivity!";
23+
24+
@Description({" ", "# Placeholder used in %eternalcore_afk_formatted% to indicate AFK status"})
25+
public String afkEnabledPlaceholder = "<red><b>AFK";
26+
public String afkDisabledPlaceholder = "";
27+
28+
}

0 commit comments

Comments
 (0)