mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-03 14:38:51 +00:00
Remove default per-locale channel formats
This commit is contained in:
5 files changed
+4
-22
No files matched your search
@@ -22,7 +22,6 @@ package net.draycia.carbon.common.channels;
|
|||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
@@ -60,9 +59,6 @@ public class PartyChatChannel extends ConfigChatChannel {
|
|||||||
"default_format", "(party: <party_name>) <display_name>: <message>",
|
"default_format", "(party: <party_name>) <display_name>: <message>",
|
||||||
"console", "[party: <party_name>] <username>: <message>"
|
"console", "[party: <party_name>] <username>: <message>"
|
||||||
);
|
);
|
||||||
this.messageSource.locales = Map.of(
|
|
||||||
Locale.US, Map.of("default_format", "(party: <party_name>) <display_name>: <message>")
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+4
-6
@@ -63,15 +63,13 @@ public class ConfigChannelMessageSource implements IMessageSource<SourcedAudienc
|
|||||||
"discord", "<message>"
|
"discord", "<message>"
|
||||||
);
|
);
|
||||||
|
|
||||||
// TODO: Move the default to the advanced config?
|
|
||||||
@Comment("""
|
@Comment("""
|
||||||
Per-Language chat formats.
|
Per-Language chat formats.
|
||||||
You can safely delete this section if you don't want to use this feature.
|
You can safely leave this section empty if you don't want to use this feature.
|
||||||
Will fall back to the defaults section if no format was found for the player.
|
Each locale section can be configured in the same way as the above 'basic' section.
|
||||||
|
Will fall back to the 'basic' section if no format was found for the player's locale.
|
||||||
""")
|
""")
|
||||||
public Map<Locale, Map<String, String>> locales = Map.of(
|
public Map<Locale, Map<String, String>> locales = Map.of(Locale.getDefault(), Map.of());
|
||||||
Locale.US, Map.of("default_format", "<display_name>: <message>")
|
|
||||||
);
|
|
||||||
|
|
||||||
private static final String FALLBACK_FORMAT = "<red><</red><username><red>></red> <message>";
|
private static final String FALLBACK_FORMAT = "<red><</red><username><red>></red> <message>";
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ package net.draycia.carbon.paper.integration.towny;
|
|||||||
|
|
||||||
import com.palmergames.bukkit.towny.object.Nation;
|
import com.palmergames.bukkit.towny.object.Nation;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import net.draycia.carbon.api.users.CarbonPlayer;
|
import net.draycia.carbon.api.users.CarbonPlayer;
|
||||||
import net.draycia.carbon.common.channels.messages.ConfigChannelMessageSource;
|
import net.draycia.carbon.common.channels.messages.ConfigChannelMessageSource;
|
||||||
@@ -49,9 +48,6 @@ public class AllianceChannel extends NationChannel {
|
|||||||
"default_format", "(alliance) <display_name>: <message>",
|
"default_format", "(alliance) <display_name>: <message>",
|
||||||
"console", "[alliance] <username>: <message>"
|
"console", "[alliance] <username>: <message>"
|
||||||
);
|
);
|
||||||
this.messageSource.locales = Map.of(
|
|
||||||
Locale.US, Map.of("default_format", "(alliance) <display_name>: <message>")
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ package net.draycia.carbon.paper.integration.towny;
|
|||||||
import com.palmergames.bukkit.towny.object.Nation;
|
import com.palmergames.bukkit.towny.object.Nation;
|
||||||
import com.palmergames.bukkit.towny.object.Resident;
|
import com.palmergames.bukkit.towny.object.Resident;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import net.draycia.carbon.api.users.CarbonPlayer;
|
import net.draycia.carbon.api.users.CarbonPlayer;
|
||||||
import net.draycia.carbon.common.channels.messages.ConfigChannelMessageSource;
|
import net.draycia.carbon.common.channels.messages.ConfigChannelMessageSource;
|
||||||
@@ -50,9 +49,6 @@ public class NationChannel extends ResidentListChannel<Nation> {
|
|||||||
"default_format", "(nation: %townyadvanced_nation_unformatted%) <display_name>: <message>",
|
"default_format", "(nation: %townyadvanced_nation_unformatted%) <display_name>: <message>",
|
||||||
"console", "[nation: %townyadvanced_nation_unformatted%] <username>: <message>"
|
"console", "[nation: %townyadvanced_nation_unformatted%] <username>: <message>"
|
||||||
);
|
);
|
||||||
this.messageSource.locales = Map.of(
|
|
||||||
Locale.US, Map.of("default_format", "(nation: %townyadvanced_nation_unformatted%) <display_name>: <message>")
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ package net.draycia.carbon.paper.integration.towny;
|
|||||||
import com.palmergames.bukkit.towny.object.Resident;
|
import com.palmergames.bukkit.towny.object.Resident;
|
||||||
import com.palmergames.bukkit.towny.object.Town;
|
import com.palmergames.bukkit.towny.object.Town;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import net.draycia.carbon.api.users.CarbonPlayer;
|
import net.draycia.carbon.api.users.CarbonPlayer;
|
||||||
import net.draycia.carbon.common.channels.messages.ConfigChannelMessageSource;
|
import net.draycia.carbon.common.channels.messages.ConfigChannelMessageSource;
|
||||||
@@ -50,9 +49,6 @@ public class TownChannel extends ResidentListChannel<Town> {
|
|||||||
"default_format", "(town: %townyadvanced_town_unformatted%) <display_name>: <message>",
|
"default_format", "(town: %townyadvanced_town_unformatted%) <display_name>: <message>",
|
||||||
"console", "[town: %townyadvanced_town_unformatted%] <username>: <message>"
|
"console", "[town: %townyadvanced_town_unformatted%] <username>: <message>"
|
||||||
);
|
);
|
||||||
this.messageSource.locales = Map.of(
|
|
||||||
Locale.US, Map.of("default_format", "(town: %townyadvanced_town_unformatted%) <display_name>: <message>")
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in new issue
Block a user