mirror of
https://github.com/Shiewk/SModeration.git
synced 2026-04-28 05:54:16 +02:00
Remove the chat prefix
This commit is contained in:
@@ -11,7 +11,6 @@ import de.shiewk.smoderation.paper.util.SchedulerUtil;
|
||||
import io.papermc.paper.command.brigadier.Commands;
|
||||
import io.papermc.paper.plugin.lifecycle.event.types.LifecycleEvents;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import net.kyori.adventure.text.TextComponent;
|
||||
import net.kyori.adventure.text.format.NamedTextColor;
|
||||
import net.kyori.adventure.text.format.TextColor;
|
||||
import net.kyori.adventure.text.logger.slf4j.ComponentLogger;
|
||||
@@ -35,11 +34,14 @@ import java.util.Objects;
|
||||
|
||||
import static de.shiewk.smoderation.paper.command.VanishCommand.isVanished;
|
||||
import static de.shiewk.smoderation.paper.command.VanishCommand.toggleVanish;
|
||||
import static net.kyori.adventure.text.Component.text;
|
||||
import static org.bukkit.Bukkit.getPluginManager;
|
||||
|
||||
public final class SModerationPaper extends JavaPlugin {
|
||||
|
||||
public static final TextColor PRIMARY_COLOR = TextColor.color(212, 0, 255);
|
||||
public static final TextColor SECONDARY_COLOR = TextColor.color(52, 143, 255);
|
||||
public static final TextColor INACTIVE_COLOR = NamedTextColor.GRAY;
|
||||
|
||||
public static final Gson gson = new Gson();
|
||||
public static final PunishmentContainer container = new PunishmentContainer();
|
||||
public static ComponentLogger LOGGER = null;
|
||||
@@ -47,11 +49,6 @@ public final class SModerationPaper extends JavaPlugin {
|
||||
public static File SAVE_FILE = null;
|
||||
private static SkinTextureProvider textureProvider = null;
|
||||
|
||||
public static final TextColor PRIMARY_COLOR = TextColor.color(212, 0, 255);
|
||||
public static final TextColor SECONDARY_COLOR = TextColor.color(52, 143, 255);
|
||||
public static final TextColor INACTIVE_COLOR = NamedTextColor.GRAY;
|
||||
public static final TextComponent CHAT_PREFIX = text("SM \u00BB ").color(PRIMARY_COLOR);
|
||||
|
||||
private final TranslatorManager translatorManager = new TranslatorManager(
|
||||
Key.key("smoderation", "translations"),
|
||||
createMiniMessage(),
|
||||
@@ -161,7 +158,6 @@ public final class SModerationPaper extends JavaPlugin {
|
||||
private MiniMessage createMiniMessage() {
|
||||
return MiniMessage.builder()
|
||||
.tags(TagResolver.builder()
|
||||
.resolver(TagResolver.resolver("prefix", Tag.inserting(CHAT_PREFIX)))
|
||||
.resolver(TagResolver.resolver("primary", Tag.styling(style -> style.color(PRIMARY_COLOR))))
|
||||
.resolver(TagResolver.resolver("secondary", Tag.styling(style -> style.color(SECONDARY_COLOR))))
|
||||
.resolver(TagResolver.standard())
|
||||
|
||||
Reference in New Issue
Block a user