summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/config/features/chat/PlayerMessagesConfig.java
blob: a3463476bfb89a57b2a94bdeabf68453578c8c74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
package at.hannibal2.skyhanni.config.features.chat;

import at.hannibal2.skyhanni.config.FeatureToggle;
import com.google.gson.annotations.Expose;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorDraggableList;
import io.github.notenoughupdates.moulconfig.annotations.ConfigOption;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class PlayerMessagesConfig {

    @Expose
    @ConfigOption(name = "Enable Chat Formatting", desc = "Enable player chat modifications. Required for all settings below.")
    @ConfigEditorBoolean
    @FeatureToggle
    public boolean enable = false;

    @Expose
    @ConfigOption(
        name = "Part Order",
        desc = "Drag text to change the chat message format order for chat messages."
    )
    @ConfigEditorDraggableList
    public List<MessagePart> partsOrder = new ArrayList<>(Arrays.asList(
        MessagePart.SKYBLOCK_LEVEL,
        MessagePart.PRIVATE_ISLAND_RANK,
        MessagePart.PRIVATE_ISLAND_GUEST,
        MessagePart.PLAYER_NAME,
        MessagePart.GUILD_RANK,
        MessagePart.EMBLEM
    ));

    public enum MessagePart {
        SKYBLOCK_LEVEL("SkyBlock Level"),
        EMBLEM("Emblem"),
        PLAYER_NAME("§bPlayer Name"),
        GUILD_RANK("Guild Rank"),
        PRIVATE_ISLAND_RANK("Private Island Rank"),
        PRIVATE_ISLAND_GUEST("Private Island Guest"),
        CRIMSON_FACTION("Crimson Faction"),
        MODE_IRONMAN("Ironman Mode"),
        BINGO_LEVEL("Bingo Level"),
        ;

        private final String str;

        MessagePart(String str) {
            this.str = str;
        }

        @Override
        public String toString() {
            return str;
        }
    }

    @Expose
    @ConfigOption(name = "Hide Level Brackets", desc = "Hide the gray brackets in front of and behind the level numbers.")
    @ConfigEditorBoolean
    public boolean hideLevelBrackets = false;

    @Expose
    @ConfigOption(name = "Level Color As Name", desc = "Use the color of the SkyBlock level for the player color.")
    @ConfigEditorBoolean
    public boolean useLevelColorForName = false;

    @Expose
    @ConfigOption(name = "Player Rank Hider", desc = "Hide player ranks in all chat messages.")
    @ConfigEditorBoolean
    @FeatureToggle
    public boolean playerRankHider = false;

    @Expose
    @ConfigOption(name = "Ignore YouTube Rank", desc = "Do not remove the YouTube rank from chat.")
    @ConfigEditorBoolean
    public boolean ignoreYouTube = false;

    @Expose
    @ConfigOption(name = "Chat Filter", desc = "Scan messages sent by players for blacklisted words and gray out the message if any are found.")
    @ConfigEditorBoolean
    @FeatureToggle
    public boolean chatFilter = false;

    @Expose
    @ConfigOption(name = "Same Chat Color", desc = "Make all chat messages white regardless of rank.")
    @ConfigEditorBoolean
    @FeatureToggle
    public boolean sameChatColor = true;
}