Search in sources :

Example 1 with PlaceholderCooldownManager

use of com.loohp.interactivechat.objectholders.PlaceholderCooldownManager in project InteractiveChat by LOOHP.

the class InteractiveChat method onEnable.

@Override
public void onEnable() {
    plugin = this;
    externalProcessor = new ProcessExternalMessage();
    getServer().getPluginManager().registerEvents(new Debug(), this);
    Metrics metrics = new Metrics(this, BSTATS_PLUGIN_ID);
    exactMinecraftVersion = Bukkit.getVersion().substring(Bukkit.getVersion().indexOf("(") + 5, Bukkit.getVersion().indexOf(")"));
    version = MCVersion.fromPackageName(getServer().getClass().getPackage().getName());
    if (!version.isSupported()) {
        getServer().getConsoleSender().sendMessage(ChatColor.RED + "[InteractiveChat] This version of minecraft is unsupported! (" + version.toString() + ")");
    }
    if (!getDataFolder().exists()) {
        getDataFolder().mkdirs();
    }
    try {
        ConfigManager.setup();
    } catch (IOException e) {
        e.printStackTrace();
        getServer().getPluginManager().disablePlugin(this);
        return;
    }
    protocolManager = ProtocolLibrary.getProtocolManager();
    getCommand("interactivechat").setExecutor(new Commands());
    bungeecordMode = ConfigManager.getConfig().getBoolean("Settings.Bungeecord");
    if (bungeecordMode) {
        getServer().getConsoleSender().sendMessage(ChatColor.GREEN + "[InteractiveChat] Registering Plugin Messaging Channels for bungeecord...");
        getServer().getMessenger().registerOutgoingPluginChannel(this, "interchat:main");
        getServer().getMessenger().registerIncomingPluginChannel(this, "interchat:main", bungeeMessageListener = new BungeeMessageListener(this));
        getServer().getPluginManager().registerEvents(new ServerPingListener(), this);
        ServerPingListener.listen();
        Bukkit.getScheduler().runTaskTimerAsynchronously(plugin, () -> {
            if (parsePAPIOnMainThread) {
                Bukkit.getScheduler().runTask(plugin, () -> {
                    for (Player player : Bukkit.getOnlinePlayers()) {
                        PlaceholderParser.parse(ICPlayerFactory.getICPlayer(player), usePlayerNameHoverText);
                        PlaceholderParser.parse(ICPlayerFactory.getICPlayer(player), usePlayerNameClickValue);
                    }
                });
            } else {
                for (Player player : Bukkit.getOnlinePlayers()) {
                    PlaceholderParser.parse(ICPlayerFactory.getICPlayer(player), usePlayerNameHoverText);
                    PlaceholderParser.parse(ICPlayerFactory.getICPlayer(player), usePlayerNameClickValue);
                }
            }
        }, 0, 100);
    }
    BiConsumer<String, Inventory> inventoryRemovalListener = (hash, inv) -> {
        Bukkit.getScheduler().runTask(InteractiveChat.plugin, () -> closeInventoryViews(inv));
    };
    itemDisplay.registerRemovalListener(inventoryRemovalListener);
    inventoryDisplay.registerRemovalListener(inventoryRemovalListener);
    inventoryDisplay1Upper.registerRemovalListener(inventoryRemovalListener);
    inventoryDisplay1Lower.registerRemovalListener(inventoryRemovalListener);
    enderDisplay.registerRemovalListener(inventoryRemovalListener);
    mapDisplay.registerRemovalListener((hash, item) -> {
        Bukkit.getScheduler().runTask(InteractiveChat.plugin, () -> {
            for (Player player : Bukkit.getOnlinePlayers()) {
                boolean removed = MapViewer.MAP_VIEWERS.remove(player, item);
                if (removed) {
                    // noinspection deprecation
                    player.getInventory().setItemInHand(player.getInventory().getItemInHand());
                }
            }
        });
    });
    YamlConfiguration storage = ConfigManager.getStorageConfig();
    database = new Database(false, getDataFolder(), storage.getString("StorageType"), storage.getString("MYSQL.Host"), storage.getString("MYSQL.Database"), storage.getString("MYSQL.Username"), storage.getString("MYSQL.Password"), storage.getInt("MYSQL.Port"));
    database.setup();
    placeholderCooldownManager = new PlaceholderCooldownManager();
    getServer().getPluginManager().registerEvents(new ChatEvents(), this);
    getServer().getPluginManager().registerEvents(new InventoryEvents(), this);
    getServer().getPluginManager().registerEvents(new PlayerUtils(), this);
    getServer().getPluginManager().registerEvents(new OutChatPacket(), this);
    getServer().getPluginManager().registerEvents(new MapViewer(), this);
    OutChatPacket.chatMessageListener();
    if (!version.isLegacy()) {
        OutTabCompletePacket.tabCompleteListener();
    }
    RegisteredServiceProvider<Permission> rsp = getServer().getServicesManager().getRegistration(Permission.class);
    perms = rsp.getProvider();
    if (isPluginEnabled("SuperVanish") || isPluginEnabled("PremiumVanish")) {
        getServer().getConsoleSender().sendMessage(ChatColor.AQUA + "[InteractiveChat] InteractiveChat has hooked into SuperVanish/PremiumVanish!");
        vanishHook = true;
    }
    if (isPluginEnabled("CMI", false)) {
        getServer().getConsoleSender().sendMessage(ChatColor.AQUA + "[InteractiveChat] InteractiveChat has hooked into CMI!");
        cmiHook = true;
    }
    if (isPluginEnabled("Essentials")) {
        getServer().getConsoleSender().sendMessage(ChatColor.AQUA + "[InteractiveChat] InteractiveChat has hooked into Essentials!");
        essentialsHook = true;
        getServer().getPluginManager().registerEvents(new EssentialsNicknames(), this);
        EssentialsNicknames._init_();
    }
    if (isPluginEnabled("EssentialsDiscord")) {
        getServer().getConsoleSender().sendMessage(ChatColor.AQUA + "[InteractiveChat] InteractiveChat has hooked into EssentialsDiscord!");
        essentialsDiscordHook = true;
        getServer().getPluginManager().registerEvents(new EssentialsDiscord(), this);
    }
    if (isPluginEnabled("DiscordSRV")) {
        getServer().getConsoleSender().sendMessage(ChatColor.AQUA + "[InteractiveChat] InteractiveChat has hooked into DiscordSRV!");
        DiscordSRV.api.subscribe(new DiscordSRVEvents());
        discordSrvHook = true;
    }
    if (isPluginEnabled("ViaVersion")) {
        getServer().getConsoleSender().sendMessage(ChatColor.AQUA + "[InteractiveChat] InteractiveChat has hooked into ViaVersion!");
        viaVersionHook = true;
    }
    if (isPluginEnabled("ProtocolSupport")) {
        getServer().getConsoleSender().sendMessage(ChatColor.AQUA + "[InteractiveChat] InteractiveChat has hooked into ProtocolSupport!");
        protocolSupportHook = true;
    }
    if (isPluginEnabled("eco")) {
        getServer().getConsoleSender().sendMessage(ChatColor.AQUA + "[InteractiveChat] InteractiveChat has hooked into Eco (Core)!");
        ecoHook = true;
    }
    if (isPluginEnabled("LuckPerms")) {
        getServer().getConsoleSender().sendMessage(ChatColor.AQUA + "[InteractiveChat] InteractiveChat has hooked into LuckPerms!");
        new LuckPermsEvents(this);
        luckPermsHook = true;
    }
    if (isPluginEnabled("MysqlPlayerDataBridge")) {
        getServer().getConsoleSender().sendMessage(ChatColor.AQUA + "[InteractiveChat] InteractiveChat has hooked into MysqlPlayerDataBridge!");
        mysqlPDBHook = true;
    }
    if (isPluginEnabled("VentureChat")) {
        VentureChatInjection._init_();
        getServer().getConsoleSender().sendMessage(ChatColor.LIGHT_PURPLE + "[InteractiveChat] InteractiveChat has injected into VentureChat!");
        ventureChatHook = true;
    }
    if (isPluginEnabled("dynmap")) {
        getServer().getConsoleSender().sendMessage(ChatColor.LIGHT_PURPLE + "[InteractiveChat] InteractiveChat has injected into Dynmap!");
        DynmapListener._init_();
        dynmapHook = true;
    }
    PlayernameDisplay.setup();
    MentionDisplay.setup();
    Charts.setup(metrics);
    if (updaterEnabled) {
        getServer().getPluginManager().registerEvents(new Updater(), this);
    }
    ClientSettingPacket.clientSettingsListener();
    playerDataManager = new PlayerDataManager(this, database);
    nicknameManager = new NicknameManager(uuid -> InteractiveChatAPI.getNicknames(uuid), () -> InteractiveChatAPI.getOnlineICPlayers().stream().filter(each -> each.isLocal()).map(each -> each.getUniqueId()).collect(Collectors.toSet()), 5000, (uuid, nicknames) -> {
        if (InteractiveChat.bungeecordMode) {
            Player bukkitPlayer = Bukkit.getPlayer(uuid);
            if (bukkitPlayer != null) {
                Set<String> nicks = new HashSet<>(nicknames);
                if (InteractiveChat.useBukkitDisplayName) {
                    nicks.add(bukkitPlayer.getDisplayName());
                }
                try {
                    BungeeMessageSender.forwardNicknames(System.currentTimeMillis(), uuid, nicks);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }
    });
    if (getServer().getPluginManager().getPlugin("PlaceholderAPI") != null) {
        new Placeholders().register();
    }
    getServer().getConsoleSender().sendMessage(ChatColor.GREEN + "[InteractiveChat] InteractiveChat has been Enabled!");
    Bukkit.getScheduler().runTaskTimerAsynchronously(this, () -> {
        if (queueRemoteUpdate && Bukkit.getOnlinePlayers().size() > 0) {
            try {
                if (BungeeMessageSender.resetAndForwardPlaceholderList(System.currentTimeMillis(), InteractiveChat.placeholderList.values())) {
                    queueRemoteUpdate = false;
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }, 0, 100);
    try {
        Logger logger = LogManager.getRootLogger();
        LogFilter filter = new LogFilter();
        Method method = logger.getClass().getMethod("addFilter", Filter.class);
        method.invoke(logger, filter);
    } catch (Exception e) {
        Bukkit.getConsoleSender().sendMessage(ChatColor.YELLOW + "[InteractiveChat] Unable to add filter to logger, safely skipping...");
    }
    gc();
}
Also used : Plugin(org.bukkit.plugin.Plugin) InventoryUtils(com.loohp.interactivechat.utils.InventoryUtils) PlayerUtils(com.loohp.interactivechat.utils.PlayerUtils) ValuePairs(com.loohp.interactivechat.objectholders.ValuePairs) InteractiveChatAPI(com.loohp.interactivechat.api.InteractiveChatAPI) Player(org.bukkit.entity.Player) Inventory(org.bukkit.inventory.Inventory) ClientSettingPacket(com.loohp.interactivechat.listeners.ClientSettingPacket) ICPlayer(com.loohp.interactivechat.objectholders.ICPlayer) InteractiveChatComponentSerializer(com.loohp.interactivechat.utils.InteractiveChatComponentSerializer) Map(java.util.Map) MentionPair(com.loohp.interactivechat.objectholders.MentionPair) NicknameManager(com.loohp.interactivechat.objectholders.NicknameManager) Method(java.lang.reflect.Method) PlayerDataManager(com.loohp.interactivechat.data.PlayerDataManager) PlaceholderCooldownManager(com.loohp.interactivechat.objectholders.PlaceholderCooldownManager) ChatEvents(com.loohp.interactivechat.listeners.ChatEvents) Bukkit(org.bukkit.Bukkit) Placeholders(com.loohp.interactivechat.placeholderapi.Placeholders) CommandSender(org.bukkit.command.CommandSender) BungeeMessageListener(com.loohp.interactivechat.bungeemessaging.BungeeMessageListener) YamlConfiguration(com.loohp.yamlconfiguration.YamlConfiguration) Filter(org.apache.logging.log4j.core.Filter) Updater(com.loohp.interactivechat.updater.Updater) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Set(java.util.Set) EssentialsDiscord(com.loohp.interactivechat.hooks.essentials.EssentialsDiscord) ConcurrentCacheHashMap(com.loohp.interactivechat.objectholders.ConcurrentCacheHashMap) InventoryEvents(com.loohp.interactivechat.listeners.InventoryEvents) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) OutTabCompletePacket(com.loohp.interactivechat.listeners.OutTabCompletePacket) ItemStack(org.bukkit.inventory.ItemStack) JavaPlugin(org.bukkit.plugin.java.JavaPlugin) ComponentSerializer(net.md_5.bungee.chat.ComponentSerializer) List(java.util.List) Logger(org.apache.logging.log4j.Logger) Optional(java.util.Optional) Pattern(java.util.regex.Pattern) ProtocolManager(com.comphenix.protocol.ProtocolManager) Charts(com.loohp.interactivechat.metrics.Charts) Permission(net.milkbowl.vault.permission.Permission) ProtocolLibrary(com.comphenix.protocol.ProtocolLibrary) BungeeMessageSender(com.loohp.interactivechat.bungeemessaging.BungeeMessageSender) DynmapListener(com.loohp.interactivechat.hooks.dynmap.DynmapListener) MCVersion(com.loohp.interactivechat.utils.MCVersion) MentionDisplay(com.loohp.interactivechat.modules.MentionDisplay) HashMap(java.util.HashMap) ClickEvent(net.kyori.adventure.text.event.ClickEvent) EssentialsNicknames(com.loohp.interactivechat.hooks.essentials.EssentialsNicknames) Function(java.util.function.Function) ArrayList(java.util.ArrayList) Database(com.loohp.interactivechat.data.Database) HashSet(java.util.HashSet) LinkedHashMap(java.util.LinkedHashMap) DiscordSRV(github.scarsz.discordsrv.DiscordSRV) ProcessExternalMessage(com.loohp.interactivechat.modules.ProcessExternalMessage) Component(net.kyori.adventure.text.Component) BiConsumer(java.util.function.BiConsumer) ICPlaceholder(com.loohp.interactivechat.objectholders.ICPlaceholder) LegacyComponentSerializer(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer) WeakHashMap(java.util.WeakHashMap) VentureChatInjection(com.loohp.interactivechat.hooks.venturechat.VentureChatInjection) OutChatPacket(com.loohp.interactivechat.listeners.OutChatPacket) ConfigManager(com.loohp.interactivechat.config.ConfigManager) LuckPermsEvents(com.loohp.interactivechat.hooks.luckperms.LuckPermsEvents) Metrics(com.loohp.interactivechat.metrics.Metrics) Debug(com.loohp.interactivechat.debug.Debug) IOException(java.io.IOException) MapViewer(com.loohp.interactivechat.listeners.MapViewer) AtomicLong(java.util.concurrent.atomic.AtomicLong) PlayernameDisplay(com.loohp.interactivechat.modules.PlayernameDisplay) EventPriority(org.bukkit.event.EventPriority) ICPlayerFactory(com.loohp.interactivechat.objectholders.ICPlayerFactory) DiscordSRVEvents(com.loohp.interactivechat.hooks.discordsrv.DiscordSRVEvents) LogFilter(com.loohp.interactivechat.objectholders.LogFilter) ChatColor(org.bukkit.ChatColor) PlaceholderParser(com.loohp.interactivechat.utils.PlaceholderParser) LogManager(org.apache.logging.log4j.LogManager) RegisteredServiceProvider(org.bukkit.plugin.RegisteredServiceProvider) Collections(java.util.Collections) ServerPingListener(com.loohp.interactivechat.bungeemessaging.ServerPingListener) Set(java.util.Set) HashSet(java.util.HashSet) ServerPingListener(com.loohp.interactivechat.bungeemessaging.ServerPingListener) ProcessExternalMessage(com.loohp.interactivechat.modules.ProcessExternalMessage) YamlConfiguration(com.loohp.yamlconfiguration.YamlConfiguration) EssentialsDiscord(com.loohp.interactivechat.hooks.essentials.EssentialsDiscord) Logger(org.apache.logging.log4j.Logger) Metrics(com.loohp.interactivechat.metrics.Metrics) Updater(com.loohp.interactivechat.updater.Updater) Database(com.loohp.interactivechat.data.Database) Permission(net.milkbowl.vault.permission.Permission) Debug(com.loohp.interactivechat.debug.Debug) PlayerUtils(com.loohp.interactivechat.utils.PlayerUtils) Player(org.bukkit.entity.Player) ICPlayer(com.loohp.interactivechat.objectholders.ICPlayer) InventoryEvents(com.loohp.interactivechat.listeners.InventoryEvents) ChatEvents(com.loohp.interactivechat.listeners.ChatEvents) DiscordSRVEvents(com.loohp.interactivechat.hooks.discordsrv.DiscordSRVEvents) IOException(java.io.IOException) Method(java.lang.reflect.Method) EssentialsNicknames(com.loohp.interactivechat.hooks.essentials.EssentialsNicknames) NicknameManager(com.loohp.interactivechat.objectholders.NicknameManager) IOException(java.io.IOException) PlayerDataManager(com.loohp.interactivechat.data.PlayerDataManager) Placeholders(com.loohp.interactivechat.placeholderapi.Placeholders) MapViewer(com.loohp.interactivechat.listeners.MapViewer) OutChatPacket(com.loohp.interactivechat.listeners.OutChatPacket) LuckPermsEvents(com.loohp.interactivechat.hooks.luckperms.LuckPermsEvents) BungeeMessageListener(com.loohp.interactivechat.bungeemessaging.BungeeMessageListener) PlaceholderCooldownManager(com.loohp.interactivechat.objectholders.PlaceholderCooldownManager) Inventory(org.bukkit.inventory.Inventory) LogFilter(com.loohp.interactivechat.objectholders.LogFilter)

Example 2 with PlaceholderCooldownManager

use of com.loohp.interactivechat.objectholders.PlaceholderCooldownManager in project InteractiveChat-DiscordSRV-Addon by LOOHP.

the class OutboundToDiscordEvents method processGameMessage.

@SuppressWarnings("deprecation")
public Component processGameMessage(ICPlayer icSender, Component component) {
    boolean reserializer = DiscordSRV.config().getBoolean("Experiment_MCDiscordReserializer_ToDiscord");
    PlaceholderCooldownManager cooldownManager = InteractiveChatDiscordSrvAddon.plugin.placeholderCooldownManager;
    long now = cooldownManager.checkMessage(icSender.getUniqueId(), PlainTextComponentSerializer.plainText().serialize(component)).getTimeNow();
    GameMessagePreProcessEvent gameMessagePreProcessEvent = new GameMessagePreProcessEvent(icSender, component, false);
    Bukkit.getPluginManager().callEvent(gameMessagePreProcessEvent);
    if (gameMessagePreProcessEvent.isCancelled()) {
        return null;
    }
    component = ComponentFlattening.flatten(gameMessagePreProcessEvent.getComponent());
    String plain = InteractiveChatComponentSerializer.plainText().serialize(component);
    if (InteractiveChat.useItem && PlayerUtils.hasPermission(icSender.getUniqueId(), "interactivechat.module.item", true, 200)) {
        Debug.debug("onGameToDiscord processing item display");
        if (!cooldownManager.isPlaceholderOnCooldownAt(icSender.getUniqueId(), InteractiveChat.placeholderList.values().stream().filter(each -> each.getKeyword().equals(InteractiveChat.itemPlaceholder)).findFirst().get(), now)) {
            Matcher matcher = InteractiveChat.itemPlaceholder.matcher(plain);
            if (matcher.find()) {
                ItemStack item = PlayerUtils.getHeldItem(icSender);
                boolean isAir = item.getType().equals(Material.AIR);
                XMaterial xMaterial = XMaterialUtils.matchXMaterial(item);
                String itemStr = PlainTextComponentSerializer.plainText().serialize(ComponentStringUtils.convertTranslatables(ComponentModernizing.modernize(ItemStackUtils.getDisplayName(item)), InteractiveChatDiscordSrvAddon.plugin.resourceManager.getLanguageManager().getTranslateFunction().ofLanguage(InteractiveChatDiscordSrvAddon.plugin.language)));
                itemStr = ComponentStringUtils.stripColorAndConvertMagic(itemStr);
                int amount = item.getAmount();
                if (isAir) {
                    amount = 1;
                }
                String replaceText = PlaceholderParser.parse(icSender, (amount == 1 ? ComponentStringUtils.stripColorAndConvertMagic(InteractiveChat.itemSingularReplaceText) : ComponentStringUtils.stripColorAndConvertMagic(InteractiveChat.itemReplaceText).replace("{Amount}", String.valueOf(amount))).replace("{Item}", itemStr));
                if (reserializer) {
                    replaceText = MessageUtil.reserializeToDiscord(github.scarsz.discordsrv.dependencies.kyori.adventure.text.Component.text(replaceText));
                }
                AtomicBoolean replaced = new AtomicBoolean(false);
                Component replaceComponent = LegacyComponentSerializer.legacySection().deserialize(replaceText);
                component = ComponentReplacing.replace(component, InteractiveChat.itemPlaceholder.pattern(), true, (groups) -> {
                    replaced.set(true);
                    return replaceComponent;
                });
                if (replaced.get() && InteractiveChatDiscordSrvAddon.plugin.itemImage) {
                    int inventoryId = DATA_ID_PROVIDER.getNext();
                    int position = matcher.start();
                    String title = PlaceholderParser.parse(icSender, ComponentStringUtils.stripColorAndConvertMagic(InteractiveChat.itemTitle));
                    Inventory inv = null;
                    if (item.hasItemMeta() && item.getItemMeta() instanceof BlockStateMeta) {
                        BlockState bsm = ((BlockStateMeta) item.getItemMeta()).getBlockState();
                        if (bsm instanceof InventoryHolder) {
                            Inventory container = ((InventoryHolder) bsm).getInventory();
                            if (!container.isEmpty()) {
                                inv = Bukkit.createInventory(null, InventoryUtils.toMultipleOf9(container.getSize()));
                                for (int j = 0; j < container.getSize(); j++) {
                                    if (container.getItem(j) != null) {
                                        if (!container.getItem(j).getType().equals(Material.AIR)) {
                                            inv.setItem(j, container.getItem(j).clone());
                                        }
                                    }
                                }
                            }
                        }
                    }
                    GameMessageProcessItemEvent gameMessageProcessItemEvent = new GameMessageProcessItemEvent(icSender, title, component, false, inventoryId, item.clone(), inv);
                    Bukkit.getPluginManager().callEvent(gameMessageProcessItemEvent);
                    if (!gameMessageProcessItemEvent.isCancelled()) {
                        component = gameMessageProcessItemEvent.getComponent();
                        title = gameMessageProcessItemEvent.getTitle();
                        if (gameMessageProcessItemEvent.hasInventory()) {
                            DATA.put(inventoryId, new ImageDisplayData(icSender, position, title, ImageDisplayType.ITEM_CONTAINER, gameMessageProcessItemEvent.getItemStack().clone(), new TitledInventoryWrapper(ItemStackUtils.getDisplayName(item, null), gameMessageProcessItemEvent.getInventory())));
                        } else {
                            DATA.put(inventoryId, new ImageDisplayData(icSender, position, title, ImageDisplayType.ITEM, gameMessageProcessItemEvent.getItemStack().clone()));
                        }
                    }
                    component = component.append(Component.text("<ICD=" + inventoryId + ">"));
                }
            }
        }
    }
    if (InteractiveChat.useInventory && PlayerUtils.hasPermission(icSender.getUniqueId(), "interactivechat.module.inventory", true, 200)) {
        Debug.debug("onGameToDiscord processing inventory display");
        if (!cooldownManager.isPlaceholderOnCooldownAt(icSender.getUniqueId(), InteractiveChat.placeholderList.values().stream().filter(each -> each.getKeyword().equals(InteractiveChat.invPlaceholder)).findFirst().get(), now)) {
            Matcher matcher = InteractiveChat.invPlaceholder.matcher(plain);
            if (matcher.find()) {
                String replaceText = PlaceholderParser.parse(icSender, ComponentStringUtils.stripColorAndConvertMagic(InteractiveChat.invReplaceText));
                if (reserializer) {
                    replaceText = MessageUtil.reserializeToDiscord(github.scarsz.discordsrv.dependencies.kyori.adventure.text.Component.text(replaceText));
                }
                AtomicBoolean replaced = new AtomicBoolean(false);
                Component replaceComponent = LegacyComponentSerializer.legacySection().deserialize(replaceText);
                component = ComponentReplacing.replace(component, InteractiveChat.invPlaceholder.pattern(), true, (groups) -> {
                    replaced.set(true);
                    return replaceComponent;
                });
                if (replaced.get() && InteractiveChatDiscordSrvAddon.plugin.invImage) {
                    int inventoryId = DATA_ID_PROVIDER.getNext();
                    int position = matcher.start();
                    Inventory inv = Bukkit.createInventory(null, 45);
                    for (int j = 0; j < icSender.getInventory().getSize(); j++) {
                        if (icSender.getInventory().getItem(j) != null) {
                            if (!icSender.getInventory().getItem(j).getType().equals(Material.AIR)) {
                                inv.setItem(j, icSender.getInventory().getItem(j).clone());
                            }
                        }
                    }
                    String title = PlaceholderParser.parse(icSender, ComponentStringUtils.stripColorAndConvertMagic(InteractiveChat.invTitle));
                    GameMessageProcessPlayerInventoryEvent gameMessageProcessPlayerInventoryEvent = new GameMessageProcessPlayerInventoryEvent(icSender, title, component, false, inventoryId, inv);
                    Bukkit.getPluginManager().callEvent(gameMessageProcessPlayerInventoryEvent);
                    if (!gameMessageProcessPlayerInventoryEvent.isCancelled()) {
                        component = gameMessageProcessPlayerInventoryEvent.getComponent();
                        title = gameMessageProcessPlayerInventoryEvent.getTitle();
                        DATA.put(inventoryId, new ImageDisplayData(icSender, position, title, ImageDisplayType.INVENTORY, true, new TitledInventoryWrapper(Component.translatable(TranslationKeyUtils.getDefaultContainerTitle()), gameMessageProcessPlayerInventoryEvent.getInventory())));
                    }
                    component = component.append(Component.text("<ICD=" + inventoryId + ">"));
                }
            }
        }
    }
    if (InteractiveChat.useEnder && PlayerUtils.hasPermission(icSender.getUniqueId(), "interactivechat.module.enderchest", true, 200)) {
        Debug.debug("onGameToDiscord processing enderchest display");
        if (!cooldownManager.isPlaceholderOnCooldownAt(icSender.getUniqueId(), InteractiveChat.placeholderList.values().stream().filter(each -> each.getKeyword().equals(InteractiveChat.enderPlaceholder)).findFirst().get(), now)) {
            Matcher matcher = InteractiveChat.enderPlaceholder.matcher(plain);
            if (matcher.find()) {
                String replaceText = PlaceholderParser.parse(icSender, ComponentStringUtils.stripColorAndConvertMagic(InteractiveChat.enderReplaceText));
                if (reserializer) {
                    replaceText = MessageUtil.reserializeToDiscord(github.scarsz.discordsrv.dependencies.kyori.adventure.text.Component.text(replaceText));
                }
                AtomicBoolean replaced = new AtomicBoolean(false);
                Component replaceComponent = LegacyComponentSerializer.legacySection().deserialize(replaceText);
                component = ComponentReplacing.replace(component, InteractiveChat.enderPlaceholder.pattern(), true, (groups) -> {
                    replaced.set(true);
                    return replaceComponent;
                });
                if (replaced.get() && InteractiveChatDiscordSrvAddon.plugin.enderImage) {
                    int inventoryId = DATA_ID_PROVIDER.getNext();
                    int position = matcher.start();
                    Inventory inv = Bukkit.createInventory(null, InventoryUtils.toMultipleOf9(icSender.getEnderChest().getSize()));
                    for (int j = 0; j < icSender.getEnderChest().getSize(); j++) {
                        if (icSender.getEnderChest().getItem(j) != null) {
                            if (!icSender.getEnderChest().getItem(j).getType().equals(Material.AIR)) {
                                inv.setItem(j, icSender.getEnderChest().getItem(j).clone());
                            }
                        }
                    }
                    String title = PlaceholderParser.parse(icSender, ComponentStringUtils.stripColorAndConvertMagic(InteractiveChat.enderTitle));
                    GameMessageProcessInventoryEvent gameMessageProcessInventoryEvent = new GameMessageProcessInventoryEvent(icSender, title, component, false, inventoryId, inv);
                    Bukkit.getPluginManager().callEvent(gameMessageProcessInventoryEvent);
                    if (!gameMessageProcessInventoryEvent.isCancelled()) {
                        component = gameMessageProcessInventoryEvent.getComponent();
                        title = gameMessageProcessInventoryEvent.getTitle();
                        DATA.put(inventoryId, new ImageDisplayData(icSender, position, title, ImageDisplayType.ENDERCHEST, new TitledInventoryWrapper(Component.translatable(TranslationKeyUtils.getEnderChestContainerTitle()), gameMessageProcessInventoryEvent.getInventory())));
                    }
                    component = component.append(Component.text("<ICD=" + inventoryId + ">"));
                }
            }
        }
    }
    Debug.debug("onGameToDiscord processing custom placeholders");
    for (ICPlaceholder placeholder : InteractiveChatAPI.getICPlaceholderList()) {
        if (!placeholder.isBuildIn()) {
            CustomPlaceholder customP = (CustomPlaceholder) placeholder;
            if (!InteractiveChat.useCustomPlaceholderPermissions || (InteractiveChat.useCustomPlaceholderPermissions && PlayerUtils.hasPermission(icSender.getUniqueId(), customP.getPermission(), true, 200))) {
                boolean onCooldown = cooldownManager.isPlaceholderOnCooldownAt(icSender.getUniqueId(), customP, now);
                Matcher matcher = customP.getKeyword().matcher(plain);
                if (matcher.find() && !onCooldown) {
                    String replaceText;
                    if (customP.getReplace().isEnabled()) {
                        replaceText = ChatColorUtils.translateAlternateColorCodes('&', PlaceholderParser.parse(icSender, customP.getReplace().getReplaceText()));
                    } else {
                        replaceText = null;
                    }
                    List<Component> toAppend = new LinkedList<>();
                    Set<String> shown = new HashSet<>();
                    component = ComponentReplacing.replace(component, customP.getKeyword().pattern(), true, (result, matchedComponents) -> {
                        String replaceString = replaceText == null ? result.group() : CustomStringUtils.applyReplacementRegex(replaceText, result, 1);
                        if (!shown.contains(replaceString)) {
                            shown.add(replaceString);
                            int position = result.start();
                            if (InteractiveChatDiscordSrvAddon.plugin.hoverEnabled && !InteractiveChatDiscordSrvAddon.plugin.hoverIgnore.contains(customP.getPosition())) {
                                HoverClickDisplayData.Builder hoverClick = new HoverClickDisplayData.Builder().player(icSender).postion(position).color(DiscordDataRegistry.DISCORD_HOVER_COLOR).displayText(ChatColorUtils.stripColor(replaceString));
                                boolean usingHoverClick = false;
                                if (customP.getHover().isEnabled()) {
                                    usingHoverClick = true;
                                    String hoverText = ChatColorUtils.translateAlternateColorCodes('&', PlaceholderParser.parse(icSender, CustomStringUtils.applyReplacementRegex(customP.getHover().getText(), result, 1)));
                                    Color color = ColorUtils.getFirstColor(hoverText);
                                    hoverClick.hoverText(LegacyComponentSerializer.legacySection().deserialize(hoverText));
                                    if (color != null) {
                                        hoverClick.color(color);
                                    }
                                }
                                if (customP.getClick().isEnabled()) {
                                    usingHoverClick = true;
                                    hoverClick.clickAction(customP.getClick().getAction()).clickValue(CustomStringUtils.applyReplacementRegex(customP.getClick().getValue(), result, 1));
                                }
                                if (usingHoverClick) {
                                    int hoverId = DATA_ID_PROVIDER.getNext();
                                    DATA.put(hoverId, hoverClick.build());
                                    toAppend.add(Component.text("<ICD=" + hoverId + ">"));
                                }
                            }
                        }
                        return replaceText == null ? Component.empty().children(matchedComponents) : LegacyComponentSerializer.legacySection().deserialize(replaceString);
                    });
                    for (Component componentToAppend : toAppend) {
                        component = component.append(componentToAppend);
                    }
                }
            }
        }
    }
    if (InteractiveChat.t && WebData.getInstance() != null) {
        for (CustomPlaceholder customP : WebData.getInstance().getSpecialPlaceholders()) {
            boolean onCooldown = cooldownManager.isPlaceholderOnCooldownAt(icSender.getUniqueId(), customP, now);
            Matcher matcher = customP.getKeyword().matcher(plain);
            if (matcher.find() && !onCooldown) {
                String replaceText;
                if (customP.getReplace().isEnabled()) {
                    replaceText = ChatColorUtils.translateAlternateColorCodes('&', PlaceholderParser.parse(icSender, customP.getReplace().getReplaceText()));
                } else {
                    replaceText = null;
                }
                List<Component> toAppend = new LinkedList<>();
                Set<String> shown = new HashSet<>();
                component = ComponentReplacing.replace(component, customP.getKeyword().pattern(), true, (result, matchedComponents) -> {
                    String replaceString = replaceText == null ? result.group() : CustomStringUtils.applyReplacementRegex(replaceText, result, 1);
                    if (!shown.contains(replaceString)) {
                        shown.add(replaceString);
                        int position = result.start();
                        if (InteractiveChatDiscordSrvAddon.plugin.hoverEnabled && !InteractiveChatDiscordSrvAddon.plugin.hoverIgnore.contains(customP.getPosition())) {
                            HoverClickDisplayData.Builder hoverClick = new HoverClickDisplayData.Builder().player(icSender).postion(position).color(DiscordDataRegistry.DISCORD_HOVER_COLOR).displayText(ChatColorUtils.stripColor(replaceString));
                            boolean usingHoverClick = false;
                            if (customP.getHover().isEnabled()) {
                                usingHoverClick = true;
                                String hoverText = ChatColorUtils.translateAlternateColorCodes('&', PlaceholderParser.parse(icSender, CustomStringUtils.applyReplacementRegex(customP.getHover().getText(), result, 1)));
                                Color color = ColorUtils.getFirstColor(hoverText);
                                hoverClick.hoverText(LegacyComponentSerializer.legacySection().deserialize(hoverText));
                                if (color != null) {
                                    hoverClick.color(color);
                                }
                            }
                            if (customP.getClick().isEnabled()) {
                                usingHoverClick = true;
                                hoverClick.clickAction(customP.getClick().getAction()).clickValue(CustomStringUtils.applyReplacementRegex(customP.getClick().getValue(), result, 1));
                            }
                            if (usingHoverClick) {
                                int hoverId = DATA_ID_PROVIDER.getNext();
                                DATA.put(hoverId, hoverClick.build());
                                toAppend.add(Component.text("<ICD=" + hoverId + ">"));
                            }
                        }
                    }
                    return replaceText == null ? Component.empty().children(matchedComponents) : LegacyComponentSerializer.legacySection().deserialize(replaceString);
                });
                for (Component componentToAppend : toAppend) {
                    component = component.append(componentToAppend);
                }
            }
        }
    }
    DiscordSRV srv = InteractiveChatDiscordSrvAddon.discordsrv;
    if (InteractiveChatDiscordSrvAddon.plugin.translateMentions) {
        Debug.debug("onGameToDiscord processing mentions");
        List<MentionPair> distinctMentionPairs = new ArrayList<>();
        Set<UUID> processedReceivers = new HashSet<>();
        synchronized (InteractiveChat.mentionPair) {
            for (MentionPair pair : InteractiveChat.mentionPair) {
                if (!processedReceivers.contains(pair.getReciever())) {
                    distinctMentionPairs.add(pair);
                    processedReceivers.add(pair.getReciever());
                }
            }
        }
        for (MentionPair pair : distinctMentionPairs) {
            if (pair.getSender().equals(icSender.getUniqueId())) {
                UUID receiverUUID = pair.getReciever();
                Set<String> names = new HashSet<>();
                ICPlayer receiver = ICPlayerFactory.getICPlayer(receiverUUID);
                if (receiver != null) {
                    names.add(ChatColorUtils.stripColor(receiver.getName()));
                    List<String> list = InteractiveChatAPI.getNicknames(receiver.getUniqueId());
                    for (String name : list) {
                        names.add(ChatColorUtils.stripColor(name));
                    }
                }
                String userId = srv.getAccountLinkManager().getDiscordId(receiverUUID);
                if (userId != null) {
                    User user = srv.getJda().getUserById(userId);
                    if (user != null) {
                        String discordMention = user.getAsMention();
                        for (String name : names) {
                            component = ComponentReplacing.replace(component, CustomStringUtils.escapeMetaCharacters(Registry.MENTION_TAG_CONVERTER.getTagStyle(InteractiveChat.mentionPrefix + name)), true, LegacyComponentSerializer.legacySection().deserialize(discordMention));
                        }
                    }
                }
            }
        }
    }
    GameMessagePostProcessEvent gameMessagePostProcessEvent = new GameMessagePostProcessEvent(icSender, component, false);
    Bukkit.getPluginManager().callEvent(gameMessagePostProcessEvent);
    if (gameMessagePostProcessEvent.isCancelled()) {
        return null;
    }
    component = gameMessagePostProcessEvent.getComponent();
    return component;
}
Also used : GameMessageProcessPlayerInventoryEvent(com.loohp.interactivechatdiscordsrvaddon.api.events.GameMessageProcessPlayerInventoryEvent) Color(java.awt.Color) AchievementMessagePreProcessEvent(github.scarsz.discordsrv.api.events.AchievementMessagePreProcessEvent) InventoryUtils(com.loohp.interactivechat.utils.InventoryUtils) PlayerUtils(com.loohp.interactivechat.utils.PlayerUtils) HoverClickDisplayData(com.loohp.interactivechatdiscordsrvaddon.objectholders.HoverClickDisplayData) TextChannel(github.scarsz.discordsrv.dependencies.jda.api.entities.TextChannel) Event(org.bukkit.event.Event) DeathMessagePostProcessEvent(github.scarsz.discordsrv.api.events.DeathMessagePostProcessEvent) ICPlayer(com.loohp.interactivechat.objectholders.ICPlayer) Matcher(java.util.regex.Matcher) AttachmentData(com.loohp.interactivechatdiscordsrvaddon.objectholders.AttachmentData) ImageDisplayData(com.loohp.interactivechatdiscordsrvaddon.objectholders.ImageDisplayData) AchievementUtils(com.loohp.interactivechatdiscordsrvaddon.utils.AchievementUtils) Map(java.util.Map) ComponentStringUtils(com.loohp.interactivechatdiscordsrvaddon.utils.ComponentStringUtils) Material(org.bukkit.Material) BlockStateMeta(org.bukkit.inventory.meta.BlockStateMeta) Debug(com.loohp.interactivechatdiscordsrvaddon.debug.Debug) DiscordToolTip(com.loohp.interactivechatdiscordsrvaddon.utils.DiscordItemStackUtils.DiscordToolTip) WebhookMessageBuilder(club.minnced.discord.webhook.send.WebhookMessageBuilder) Message(github.scarsz.discordsrv.dependencies.jda.api.entities.Message) Set(java.util.Set) ItemStack(org.bukkit.inventory.ItemStack) InteractiveChat(com.loohp.interactivechat.InteractiveChat) MessageEmbed(github.scarsz.discordsrv.dependencies.jda.api.entities.MessageEmbed) CustomStringUtils(com.loohp.interactivechat.utils.CustomStringUtils) GameMessageProcessItemEvent(com.loohp.interactivechatdiscordsrvaddon.api.events.GameMessageProcessItemEvent) ImageUtils(com.loohp.interactivechatdiscordsrvaddon.graphics.ImageUtils) WebhookClient(club.minnced.discord.webhook.WebhookClient) DiscordMessageContent(com.loohp.interactivechatdiscordsrvaddon.objectholders.DiscordMessageContent) ArrayList(java.util.ArrayList) LinkedHashMap(java.util.LinkedHashMap) AchievementMessagePostProcessEvent(github.scarsz.discordsrv.api.events.AchievementMessagePostProcessEvent) LanguageUtils(com.loohp.interactivechat.utils.LanguageUtils) VentureChatMessagePreProcessEvent(github.scarsz.discordsrv.api.events.VentureChatMessagePreProcessEvent) ItemStackUtils(com.loohp.interactivechat.utils.ItemStackUtils) LinkedHashSet(java.util.LinkedHashSet) ColorUtils(com.loohp.interactivechat.utils.ColorUtils) User(github.scarsz.discordsrv.dependencies.jda.api.entities.User) ComponentFlattening(com.loohp.interactivechat.utils.ComponentFlattening) Component(com.loohp.interactivechat.libs.net.kyori.adventure.text.Component) GameChatMessagePreProcessEvent(github.scarsz.discordsrv.api.events.GameChatMessagePreProcessEvent) WebhookUtil(github.scarsz.discordsrv.util.WebhookUtil) DiscordDescription(com.loohp.interactivechatdiscordsrvaddon.utils.DiscordItemStackUtils.DiscordDescription) AdvancementData(com.loohp.interactivechatdiscordsrvaddon.objectholders.AdvancementData) IOException(java.io.IOException) DiscordDisplayData(com.loohp.interactivechatdiscordsrvaddon.objectholders.DiscordDisplayData) InventoryHolder(org.bukkit.inventory.InventoryHolder) DiscordDataRegistry(com.loohp.interactivechatdiscordsrvaddon.registry.DiscordDataRegistry) EventPriority(org.bukkit.event.EventPriority) PlaceholderParser(com.loohp.interactivechat.utils.PlaceholderParser) LegacyComponentSerializer(com.loohp.interactivechat.libs.net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer) DiscordItemStackUtils(com.loohp.interactivechatdiscordsrvaddon.utils.DiscordItemStackUtils) ComponentReplacing(com.loohp.interactivechat.utils.ComponentReplacing) InteractiveChatAPI(com.loohp.interactivechat.api.InteractiveChatAPI) WebData(com.loohp.interactivechat.objectholders.WebData) ListenerAdapter(github.scarsz.discordsrv.dependencies.jda.api.hooks.ListenerAdapter) Player(org.bukkit.entity.Player) ImageDisplayType(com.loohp.interactivechatdiscordsrvaddon.objectholders.ImageDisplayType) Inventory(org.bukkit.inventory.Inventory) ComponentModernizing(com.loohp.interactivechat.utils.ComponentModernizing) EventHandler(org.bukkit.event.EventHandler) InteractiveChatComponentSerializer(com.loohp.interactivechat.utils.InteractiveChatComponentSerializer) MentionPair(com.loohp.interactivechat.objectholders.MentionPair) XMaterial(com.loohp.interactivechat.libs.com.cryptomorin.xseries.XMaterial) PlaceholderCooldownManager(com.loohp.interactivechat.objectholders.PlaceholderCooldownManager) Bukkit(org.bukkit.Bukkit) BufferedImage(java.awt.image.BufferedImage) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) XMaterialUtils(com.loohp.interactivechat.utils.XMaterialUtils) UUID(java.util.UUID) ChannelType(github.scarsz.discordsrv.dependencies.jda.api.entities.ChannelType) Subscribe(github.scarsz.discordsrv.api.Subscribe) ImageGeneration(com.loohp.interactivechatdiscordsrvaddon.graphics.ImageGeneration) PlayerDeathEvent(org.bukkit.event.entity.PlayerDeathEvent) List(java.util.List) ListenerPriority(github.scarsz.discordsrv.api.ListenerPriority) Entry(java.util.Map.Entry) GameMessagePostProcessEvent(com.loohp.interactivechatdiscordsrvaddon.api.events.GameMessagePostProcessEvent) DiscordGuildMessagePostProcessEvent(github.scarsz.discordsrv.api.events.DiscordGuildMessagePostProcessEvent) DeathMessageUtils(com.loohp.interactivechatdiscordsrvaddon.utils.DeathMessageUtils) MessageFormat(github.scarsz.discordsrv.objects.MessageFormat) ItemMeta(org.bukkit.inventory.meta.ItemMeta) CustomPlaceholder(com.loohp.interactivechat.objectholders.CustomPlaceholder) Registry(com.loohp.interactivechat.registry.Registry) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) GameMessagePreProcessEvent(com.loohp.interactivechatdiscordsrvaddon.api.events.GameMessagePreProcessEvent) InteractiveChatDiscordSrvAddon(com.loohp.interactivechatdiscordsrvaddon.InteractiveChatDiscordSrvAddon) MessageUtil(github.scarsz.discordsrv.util.MessageUtil) HashSet(java.util.HashSet) AdvancementType(com.loohp.interactivechatdiscordsrvaddon.objectholders.AdvancementType) PlainTextComponentSerializer(com.loohp.interactivechat.libs.net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer) DiscordSRV(github.scarsz.discordsrv.DiscordSRV) DiscordImageEvent(com.loohp.interactivechatdiscordsrvaddon.api.events.DiscordImageEvent) MessageAction(github.scarsz.discordsrv.dependencies.jda.api.requests.restaction.MessageAction) ICPlaceholder(com.loohp.interactivechat.objectholders.ICPlaceholder) LinkedList(java.util.LinkedList) Listener(org.bukkit.event.Listener) IDProvider(com.loohp.interactivechatdiscordsrvaddon.objectholders.IDProvider) DiscordGuildMessageSentEvent(github.scarsz.discordsrv.api.events.DiscordGuildMessageSentEvent) ResourceRegistry(com.loohp.interactivechatdiscordsrvaddon.registry.ResourceRegistry) BlockState(org.bukkit.block.BlockState) URLRequestUtils(com.loohp.interactivechatdiscordsrvaddon.utils.URLRequestUtils) MineverseChatPlayer(mineverse.Aust1n46.chat.api.MineverseChatPlayer) AdvancementUtils(com.loohp.interactivechatdiscordsrvaddon.utils.AdvancementUtils) TitledInventoryWrapper(com.loohp.interactivechatdiscordsrvaddon.wrappers.TitledInventoryWrapper) ICPlayerFactory(com.loohp.interactivechat.objectholders.ICPlayerFactory) ChatColorUtils(com.loohp.interactivechat.utils.ChatColorUtils) TranslationKeyUtils(com.loohp.interactivechatdiscordsrvaddon.utils.TranslationKeyUtils) Comparator(java.util.Comparator) ModelDisplayPosition(com.loohp.interactivechatdiscordsrvaddon.resources.models.ModelDisplay.ModelDisplayPosition) MessageReceivedEvent(github.scarsz.discordsrv.dependencies.jda.api.events.message.MessageReceivedEvent) Collections(java.util.Collections) GameMessageProcessInventoryEvent(com.loohp.interactivechatdiscordsrvaddon.api.events.GameMessageProcessInventoryEvent) ICPlayer(com.loohp.interactivechat.objectholders.ICPlayer) User(github.scarsz.discordsrv.dependencies.jda.api.entities.User) Matcher(java.util.regex.Matcher) WebhookMessageBuilder(club.minnced.discord.webhook.send.WebhookMessageBuilder) ArrayList(java.util.ArrayList) GameMessageProcessPlayerInventoryEvent(com.loohp.interactivechatdiscordsrvaddon.api.events.GameMessageProcessPlayerInventoryEvent) ICPlaceholder(com.loohp.interactivechat.objectholders.ICPlaceholder) CustomPlaceholder(com.loohp.interactivechat.objectholders.CustomPlaceholder) GameMessageProcessInventoryEvent(com.loohp.interactivechatdiscordsrvaddon.api.events.GameMessageProcessInventoryEvent) Component(com.loohp.interactivechat.libs.net.kyori.adventure.text.Component) UUID(java.util.UUID) InventoryHolder(org.bukkit.inventory.InventoryHolder) LinkedHashSet(java.util.LinkedHashSet) HashSet(java.util.HashSet) GameMessagePostProcessEvent(com.loohp.interactivechatdiscordsrvaddon.api.events.GameMessagePostProcessEvent) GameMessagePreProcessEvent(com.loohp.interactivechatdiscordsrvaddon.api.events.GameMessagePreProcessEvent) Color(java.awt.Color) DiscordSRV(github.scarsz.discordsrv.DiscordSRV) XMaterial(com.loohp.interactivechat.libs.com.cryptomorin.xseries.XMaterial) LinkedList(java.util.LinkedList) BlockStateMeta(org.bukkit.inventory.meta.BlockStateMeta) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) TitledInventoryWrapper(com.loohp.interactivechatdiscordsrvaddon.wrappers.TitledInventoryWrapper) BlockState(org.bukkit.block.BlockState) GameMessageProcessItemEvent(com.loohp.interactivechatdiscordsrvaddon.api.events.GameMessageProcessItemEvent) MentionPair(com.loohp.interactivechat.objectholders.MentionPair) ItemStack(org.bukkit.inventory.ItemStack) PlaceholderCooldownManager(com.loohp.interactivechat.objectholders.PlaceholderCooldownManager) ImageDisplayData(com.loohp.interactivechatdiscordsrvaddon.objectholders.ImageDisplayData) Inventory(org.bukkit.inventory.Inventory) HoverClickDisplayData(com.loohp.interactivechatdiscordsrvaddon.objectholders.HoverClickDisplayData)

Aggregations

InteractiveChatAPI (com.loohp.interactivechat.api.InteractiveChatAPI)2 ICPlaceholder (com.loohp.interactivechat.objectholders.ICPlaceholder)2 ICPlayer (com.loohp.interactivechat.objectholders.ICPlayer)2 ICPlayerFactory (com.loohp.interactivechat.objectholders.ICPlayerFactory)2 MentionPair (com.loohp.interactivechat.objectholders.MentionPair)2 PlaceholderCooldownManager (com.loohp.interactivechat.objectholders.PlaceholderCooldownManager)2 InteractiveChatComponentSerializer (com.loohp.interactivechat.utils.InteractiveChatComponentSerializer)2 InventoryUtils (com.loohp.interactivechat.utils.InventoryUtils)2 WebhookClient (club.minnced.discord.webhook.WebhookClient)1 WebhookMessageBuilder (club.minnced.discord.webhook.send.WebhookMessageBuilder)1 ProtocolLibrary (com.comphenix.protocol.ProtocolLibrary)1 ProtocolManager (com.comphenix.protocol.ProtocolManager)1 InteractiveChat (com.loohp.interactivechat.InteractiveChat)1 BungeeMessageListener (com.loohp.interactivechat.bungeemessaging.BungeeMessageListener)1 BungeeMessageSender (com.loohp.interactivechat.bungeemessaging.BungeeMessageSender)1 ServerPingListener (com.loohp.interactivechat.bungeemessaging.ServerPingListener)1 ConfigManager (com.loohp.interactivechat.config.ConfigManager)1 Database (com.loohp.interactivechat.data.Database)1 PlayerDataManager (com.loohp.interactivechat.data.PlayerDataManager)1 Debug (com.loohp.interactivechat.debug.Debug)1