java.lang.IllegalArgumentException: Plugin already initialized!

Discussion in 'Plugin Development' started by yukishiro, Dec 11, 2023.

Thread Status:
Not open for further replies.
  1. Offline

    yukishiro

    Code:
    Error occurred while enabling AnixitPlayerMenu v1.0 (Is it up to date?)
    java.lang.IllegalArgumentException: Plugin already initialized!
        at org.bukkit.plugin.java.PluginClassLoader.initialize(PluginClassLoader.java:187) ~[patched_1.12.2.jar:git-Paper-1620]
        at org.bukkit.plugin.java.JavaPlugin.<init>(JavaPlugin.java:60) ~[patched_1.12.2.jar:git-Paper-1620]
        at me.yukishiro.anixitplayermenu.AnixitPlayerMenu.<init>(AnixitPlayerMenu.java:27) ~[?:?]
        at me.yukishiro.anixitplayermenu.LinkManager.<init>(LinkManager.java:23) ~[?:?]
        at me.yukishiro.anixitplayermenu.AnixitPlayerMenu.onEnable(AnixitPlayerMenu.java:40) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[patched_1.12.2.jar:git-Paper-1620]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:316) ~[patched_1.12.2.jar:git-Paper-1620]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) ~[patched_1.12.2.jar:git-Paper-1620]
        at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugin(CraftServer.java:395) ~[patched_1.12.2.jar:git-Paper-1620]
        at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugins(CraftServer.java:344) ~[patched_1.12.2.jar:git-Paper-1620]
        at net.minecraft.server.v1_12_R1.MinecraftServer.t(MinecraftServer.java:442) ~[patched_1.12.2.jar:git-Paper-1620]
        at net.minecraft.server.v1_12_R1.MinecraftServer.l(MinecraftServer.java:403) ~[patched_1.12.2.jar:git-Paper-1620]
        at net.minecraft.server.v1_12_R1.MinecraftServer.a(MinecraftServer.java:341) ~[patched_1.12.2.jar:git-Paper-1620]
        at net.minecraft.server.v1_12_R1.DedicatedServer.init(DedicatedServer.java:289) ~[patched_1.12.2.jar:git-Paper-1620]
        at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:616) ~[patched_1.12.2.jar:git-Paper-1620]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_351]
    Caused by: java.lang.IllegalStateException: Initial initialization
        at org.bukkit.plugin.java.PluginClassLoader.initialize(PluginClassLoader.java:190) ~[patched_1.12.2.jar:git-Paper-1620]
        at org.bukkit.plugin.java.JavaPlugin.<init>(JavaPlugin.java:60) ~[patched_1.12.2.jar:git-Paper-1620]
        at me.yukishiro.anixitplayermenu.AnixitPlayerMenu.<init>(AnixitPlayerMenu.java:27) ~[?:?]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_351]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_351]
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_351]
        at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_351]
        at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_351]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:94) ~[patched_1.12.2.jar:git-Paper-1620]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:127) ~[patched_1.12.2.jar:git-Paper-1620]
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:329) ~[patched_1.12.2.jar:git-Paper-1620]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) ~[patched_1.12.2.jar:git-Paper-1620]
        at org.bukkit.craftbukkit.v1_12_R1.CraftServer.loadPlugins(CraftServer.java:318) ~[patched_1.12.2.jar:git-Paper-1620]
        at net.minecraft.server.v1_12_R1.DedicatedServer.init(DedicatedServer.java:222) ~[patched_1.12.2.jar:git-Paper-1620]
        ... 2 more
    
    there is 1 plugin on the server idk what is the problem
    Code:
    public final class AnixitPlayerMenu extends JavaPlugin implements Listener {
    
    private LinkManager linkManager;
    private IgnoreManager ignoreManager;
    private Map<Player, String> linkInputMap;
    private Handlers handlers;
    public Player PlayerToIgnore;
    
    
    @Overridepublic void onEnable() {
    getLogger().info("[AnixitPlayerMenu] plugin enabled!");
    getServer().getPluginManager().registerEvents(this, this);
    this.linkManager = new LinkManager();
    this.ignoreManager = new IgnoreManager();
    this.linkInputMap = new HashMap<>();
    this.handlers = new Handlers(this, linkManager, ignoreManager);
    }
    
    @EventHandlerpublic void onCommand(PlayerCommandPreprocessEvent event) {
    Player player = event.getPlayer();
    String command = event.getMessage().toLowerCase();
    
    if (command.equals("/profile")) {
    openMenu(player);
    event.setCancelled(true);
    }
    }
    
    @EventHandlerpublic void onPlayerInteractEntity(PlayerInteractEntityEvent event) {
    if (event.getRightClicked() instanceof Player) {
    Player clickedPlayer = (Player) event.getRightClicked();
    openOtherPlayerMenu(event.getPlayer(), clickedPlayer);
    PlayerToIgnore = clickedPlayer;
    }
    }
    
    private void openOtherPlayerMenu(Player player, Player clickedPlayer) {
    Inventory menu = Bukkit.createInventory(player, 54, "Соц. сети игрока [" + clickedPlayer.getName() + "]");
    
    ItemStack Otherarrow = new ItemStack(Material.ARROW);
    ItemMeta arrowMeta = Otherarrow.getItemMeta();
    arrowMeta.setDisplayName(ChatColor.YELLOW + "Выйти");
    
    handlers.setItemClickHandler(menu, 19, player, "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYThlNDE1YjVjMWViNDU2NjNkYTZmZGFlNTc5OGRkMTk5YjIxNGQ0NzY3NmIzOTJjYTMwNmY3OTI5M2M5N2Y4NCJ9fX0", "ТикТок", linkManager.hasLink(player, "ТикТок"));
    handlers.setItemClickHandler(menu, 20, player, "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMzQ4ODU0NWQ1N2M5ZWVkNTJjM2U1NDdlOTZjNDVkYWJiYjdjZjVmOThkNGM4ZmU2MWRjNmY2OWFiYTBhZWY5NiJ9fX0", "Ютуб", linkManager.hasLink(player, "Ютуб"));
    handlers.setItemClickHandler(menu, 21, player, "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNGQ0MjMzN2JlMGJkY2EyMTI4MDk3ZjFjNWJiMTEwOWU1YzYzM2MxNzkyNmFmNWZiNmZjMjAwMDAwMTFhZWI1MyJ9fX0", "Дискорд", linkManager.hasLink(player, "Дискорд"));
    handlers.setItemClickHandler(menu, 22, player, "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNGQ0MjMzN2JlMGJkY2EyMTI4MDk3ZjFjNWJiMTEwOWU1YzYzM2MxNzkyNmFmNWZiNmZjMjAwMDAwMTFhZWI1MyJ9fX0", "Дискорд Канал", linkManager.hasLink(player, "Дискорд Канал"));
    handlers.setItemClickHandler(menu, 23, player, "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDNkMjVkNTVjYWVkZmQ3MGVlN2YzYTgwNmFmMDAyNWYxNTNkNGJmMzRmNDFlNmVmZDQ0ZWM4ZmU3NDE5OGYzNSJ9fX0", "Телеграм", linkManager.hasLink(player,"Телеграм"));
    handlers.setItemClickHandler(menu, 24, player, "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDNkMjVkNTVjYWVkZmQ3MGVlN2YzYTgwNmFmMDAyNWYxNTNkNGJmMzRmNDFlNmVmZDQ0ZWM4ZmU3NDE5OGYzNSJ9fX0", "Телеграм Канал", linkManager.hasLink(player, "Телеграм Канал"));
    handlers.setItemClickHandler(menu, 25, player, "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjI1ODA0ODliMmQ0NGU1ZDlhOWIzZjgzNmVmMjE5ZjAzMTI5OTJkNDBiMTRkOTlmNTZjNWFmMDVjNDBmNzE1In19fQ", "Твич", linkManager.hasLink(player, "Твич"));
    handlers.setItemClickHandler(menu, 40, player, "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYWZkMjQwMDAwMmFkOWZiYmJkMDA2Njk0MWViNWIxYTM4NGFiOWIwZTQ4YTE3OGVlOTZlNGQxMjlhNTIwODY1NCJ9fX0=", "Игнорировать игрока", linkManager.hasLink(player, "Твич"));
    
    player.openInventory(menu);
    }
    
    private void openMenu(Player player) {
    Inventory menu = Bukkit.createInventory(player, 54, "Ваши соц. сети");
    ItemStack TTHead = handlers.getCustomTextureHead("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYThlNDE1YjVjMWViNDU2NjNkYTZmZGFlNTc5OGRkMTk5YjIxNGQ0NzY3NmIzOTJjYTMwNmY3OTI5M2M5N2Y4NCJ9fX0=", "ТикТок", player);
    ItemStack YTHead = handlers.getCustomTextureHead("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMzQ4ODU0NWQ1N2M5ZWVkNTJjM2U1NDdlOTZjNDVkYWJiYjdjZjVmOThkNGM4ZmU2MWRjNmY2OWFiYTBhZWY5NiJ9fX0=", "Ютуб", player);
    ItemStack DSHead = handlers.getCustomTextureHead("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNGQ0MjMzN2JlMGJkY2EyMTI4MDk3ZjFjNWJiMTEwOWU1YzYzM2MxNzkyNmFmNWZiNmZjMjAwMDAwMTFhZWI1MyJ9fX0=", "Дискорд", player);
    ItemStack DSChannelHead = handlers.getCustomTextureHead("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNGQ0MjMzN2JlMGJkY2EyMTI4MDk3ZjFjNWJiMTEwOWU1YzYzM2MxNzkyNmFmNWZiNmZjMjAwMDAwMTFhZWI1MyJ9fX0=", "Дискорд канал", player);
    ItemStack TGHead = handlers.getCustomTextureHead("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDNkMjVkNTVjYWVkZmQ3MGVlN2YzYTgwNmFmMDAyNWYxNTNkNGJmMzRmNDFlNmVmZDQ0ZWM4ZmU3NDE5OGYzNSJ9fX0=", "Телеграм", player);
    ItemStack TGChannelHead = handlers.getCustomTextureHead("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDNkMjVkNTVjYWVkZmQ3MGVlN2YzYTgwNmFmMDAyNWYxNTNkNGJmMzRmNDFlNmVmZDQ0ZWM4ZmU3NDE5OGYzNSJ9fX0=", "Телеграм канал", player);
    ItemStack TWHead = handlers.getCustomTextureHead("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjI1ODA0ODliMmQ0NGU1ZDlhOWIzZjgzNmVmMjE5ZjAzMTI5OTJkNDBiMTRkOTlmNTZjNWFmMDVjNDBmNzE1In19fQ==", "Твич", player);
    ItemStack arrow = new ItemStack(Material.ARROW);
    ItemMeta arrowMeta = arrow.getItemMeta();
    arrowMeta.setDisplayName(ChatColor.YELLOW + "Выйти");
    menu.setItem(49, arrow);
    menu.setItem(19, TTHead);
    menu.setItem(20, YTHead);
    menu.setItem(21, DSHead);
    menu.setItem(22, DSChannelHead);
    menu.setItem(23, TGHead);
    menu.setItem(24, TGChannelHead);
    menu.setItem(25, TWHead);
    
    player.openInventory(menu);
    }
    private void setIgnoreHeadLore(SkullMeta meta) {
    meta.setLore(new ArrayList<>()); // Clear the lore}
    
    public ItemStack getIgnoreHead(String value, String itemName) {
    ItemStack head = new ItemStack(Material.SKULL_ITEM, 1, (short) 3);
    SkullMeta meta = (SkullMeta) head.getItemMeta();
    GameProfile profile = new GameProfile(PlayerToIgnore.getUniqueId(), "");
    
    profile.getProperties().put("textures", new Property("textures", value));
    
    Field profileField;
    try {
    profileField = meta.getClass().getDeclaredField("profile");
    profileField.setAccessible(true);
    profileField.set(meta, profile);
    } catch (IllegalArgumentException | IllegalAccessException | NoSuchFieldException | SecurityException e) {
    e.printStackTrace();
    }
    
    meta.setDisplayName(itemName);
    
    head.setItemMeta(meta);
    return head;
    }
    
    @EventHandlerpublic void onInventoryClick(InventoryClickEvent event) {
    Player player = (Player) event.getWhoClicked();
    Inventory clickedInventory = event.getClickedInventory();
    ItemStack clickedItem = event.getCurrentItem();
    
    if (clickedInventory != null && clickedInventory.equals(player.getOpenInventory().getTopInventory())) {
    event.setCancelled(true);
    
    if (clickedItem != null) {
    int slot = event.getSlot();
    if (slot == 19 || slot == 20 || slot == 21 || slot == 22 || slot == 23 || slot == 24 || slot == 25) {
    handleSocialMediaClick(player, clickedItem, event.isRightClick(), clickedItem.getItemMeta().getDisplayName());
    player.closeInventory();
    } else if (slot == 40) {
    handlers.handleIgnoreHeadClick(player, clickedItem);
    player.closeInventory();
    } else if (slot == 49) {
    player.closeInventory();
    }
    }
    }
    }
    
    public void updateStatus(Player player, String socialMedia, ItemStack headItem) {
    ItemMeta meta = headItem.getItemMeta();
    String linkStatus = linkManager.hasLink(player, socialMedia) ? ChatColor.GREEN + "Привязано" : ChatColor.RED + "Не привязано";
    
    List<String> lore = meta.getLore();
    lore.set(0, linkStatus);
    meta.setLore(lore);
    
    headItem.setItemMeta(meta);
    }
    
    private void handleSocialMediaClick(Player player, ItemStack clickedItem, boolean isRightClick, String SocialMedia) {
    String socialMedia = ChatColor.stripColor(clickedItem.getItemMeta().getDisplayName());
    
    // Используйте clickedPlayer вместо player для передачи данных о другом игрокеif (linkManager.hasLink(PlayerToIgnore, SocialMedia)) {
    String link = linkManager.getPlayerLink(PlayerToIgnore, SocialMedia);
    
    try {
    if (isRightClick) {
    player.sendMessage("Правый клик по голове " + socialMedia + ".");
    } else {
    // Логика левого клика (открыть ссылку в браузере)openLinkInBrowser(player, link);
    }
    } catch (Exception e) {
    e.printStackTrace();
    player.sendMessage("Ошибка обработки события щелчка.");
    }
    } else {
    // Запросить ссылкуplayer.sendMessage("Пожалуйста, предоставьте ссылку для " + socialMedia + ":");
    
    linkInputMap.put(player, socialMedia);
    }
    }
    
    
    
    // Новый метод для открытия ссылки в браузереprivate void openLinkInBrowser(Player player, String link) {
    try {
    if (Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) {
    Desktop.getDesktop().browse(new URI(link));
    player.sendMessage("Открывается ссылка: " + link);
    } else {
    player.sendMessage("Невозможно открыть ссылку. Действие обзора рабочего стола не поддерживается.");
    }
    } catch (Exception e) {
    e.printStackTrace();
    player.sendMessage("Ошибка открытия ссылки в браузере.");
    }
    }
    
    
    
    @EventHandlerpublic void onPlayerChat(AsyncPlayerChatEvent event) {
    Player player = event.getPlayer();
    String linkMedia = linkInputMap.remove(player);
    
    if (linkMedia != null) {
    String link = event.getMessage();
    linkManager.setPlayerLink(player, link, linkMedia);
    player.sendMessage( "Установлена ссылка для " + ChatColor.YELLOW + linkMedia);
    event.setCancelled(true);
    }
    }
    }
    please help
     
  2. Offline

    timtower Administrator Administrator Moderator

    @yukishiro Does any of your other classes extend JavaPlugin?
     
  3. Offline

    yukishiro

  4. Offline

    timtower Administrator Administrator Moderator

    @yukishiro Looks like LinkManager is calling "new AnixitPlayerMenu()"
    And why are you using Desktop.getDesktop().isSupported(Desktop.Action.BROWSE) on a server?

    And why did you remove the error? You know we need that to find out what is wrong right?
     
  5. Offline

    yukishiro

    need to open link in browser
     
  6. Offline

    timtower Administrator Administrator Moderator

    Why? Why on the server?
     
  7. Offline

    yukishiro

    private final Map<Player, Map<String, String>> playerLinks;
    private final AnixitPlayerMenu anixitPlayerMenu;
    private IgnoreManager ignoreManager;
    private final Handlers handlers;

    public LinkManager() {
    this.playerLinks = new HashMap<>();
    this.anixitPlayerMenu = new AnixitPlayerMenu();
    this.handlers = new Handlers( anixitPlayerMenu, this, ignoreManager);
    this.ignoreManager = new IgnoreManager();
    } yes, is it reason of problem?
     
  8. Offline

    timtower Administrator Administrator Moderator

    It is the problem, you can't do that with plugins. Pass it along with the constructor arguments.
     
  9. Offline

    yukishiro

    what can I replace it with?
     
  10. Offline

    timtower Administrator Administrator Moderator

    Pass the instance along with the constructor of the LinkManager class.
     
  11. Offline

    yukishiro

    Code:
    package me.yukishiro.anixitplayermenu;
    
    import org.bukkit.ChatColor;
    import org.bukkit.entity.Player;
    import org.bukkit.inventory.Inventory;
    import org.bukkit.inventory.ItemStack;
    import org.bukkit.inventory.meta.ItemMeta;
    
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.List;
    import java.util.Map;
    
    public class LinkManager {
    
    private final Map<Player, Map<String, String>> playerLinks;
    private final AnixitPlayerMenu anixitPlayerMenu;
    private IgnoreManager ignoreManager;
    private final Handlers handlers;
    
    public LinkManager() {
    this.playerLinks = new HashMap<>();
    this.anixitPlayerMenu = new AnixitPlayerMenu();
    this.handlers = new Handlers( anixitPlayerMenu, this, ignoreManager);
    this.ignoreManager = new IgnoreManager();
    }
    
    public boolean hasLink(Player player, String socialMedia) {
    Map<String, String> playerSocialMediaLinks = playerLinks.get(player);
    return playerSocialMediaLinks != null && playerSocialMediaLinks.containsKey(socialMedia);
    }
    
    public String getPlayerLink(Player player, String socialMedia) {
    Map<String, String> playerSocialMediaLinks = playerLinks.get(player);
    return playerSocialMediaLinks != null ? playerSocialMediaLinks.get(socialMedia) : null;
    }
    
    public void setPlayerLink(Player player, String socialMedia, String link) {
    Map<String, String> playerSocialMediaLinks = playerLinks.computeIfAbsent(player, k -> new HashMap<>());
    playerSocialMediaLinks.put(socialMedia, link);
    
    // After setting the link, update the status to "Linked"player.sendMessage("Link for " + socialMedia + " successfully linked!");
    
    // Update the status on the inventory itemInventory playerInventory = player.getInventory();
    updateItemStatus(playerInventory, socialMedia, true, player, link);
    }
    
    public void updateItemStatus(Inventory inventory, String socialMedia, boolean isLinked, Player player, String value) {
    int slot = getSocialMediaSlot(socialMedia);
    
    if (slot != -1) {
    ItemStack headItem = inventory.getItem(slot);
    
    // Update the item in the inventoryif (headItem != null) {
    handlers.setItemClickHandler(inventory, slot, player, value, socialMedia, isLinked);
    
    // Get the current metadataItemMeta itemMeta = headItem.getItemMeta();
    
    if (slot == 40) {
    if (ignoreManager.isIgnoring(player, anixitPlayerMenu.PlayerToIgnore)) {
    itemMeta.setDisplayName("Stop Ignoring");
    }
    }
    List<String> lore = new ArrayList<>();
    if (isLinked) {
    lore.add(ChatColor.GREEN + "Status: " + ChatColor.BOLD + "LINKED");
    } else {
    lore.add(ChatColor.RED + "Status: " + ChatColor.BOLD + "NOT LINKED");
    }
    
    // Set the updated loreitemMeta.setLore(lore);
    
    // Set the updated metadataheadItem.setItemMeta(itemMeta);
    
    // Update the item in the inventoryinventory.setItem(slot, headItem);
    }
    }
    }
    
    private int getSocialMediaSlot(String socialMedia) {
    switch (socialMedia) {
    case "ТикТок":
    return 19;
    case "Ютуб":
    return 20;
    case "Дискорд":
    return 21;
    case "Дискорд канал":
    return 22;
    case "Телеграм":
    return 23;
    case "Телеграм канал":
    return 24;
    case "Твич":
    return 25;
    case "Игнорировать игрока":
    return 40;
    case "Перестать игнорировать игрока":
    return 40;
    default:
    return -1;
    }
    }
    }
     
    Last edited by a moderator: Dec 11, 2023
  12. Offline

    timtower Administrator Administrator Moderator

    @yukishiro I did not ask for the full class...
     
Thread Status:
Not open for further replies.

Share This Page