1. Этот сайт использует файлы cookie. Продолжая пользоваться данным сайтом, Вы соглашаетесь на использование нами Ваших файлов cookie. Узнать больше.
  2. Вы находитесь в сообществе Rubukkit. Мы - администраторы серверов Minecraft, разрабатываем собственные плагины и переводим на различные языки плагины наших коллег из других стран.
    Скрыть объявление
Скрыть объявление
В преддверии глобального обновления, мы проводим исследования, которые помогут нам сделать опыт пользования форумом ещё удобнее. Помогите нам, примите участие!

Помогите Ошибка отправки пакета

Тема в разделе "Разработка плагинов для новичков", создана пользователем Karonus, 28 дек 2019.

  1. Автор темы
    Karonus

    Karonus Новичок Пользователь

    Баллы:
    16
    Имя в Minecraft:
    Karonus_
    При выполнении кода возникает ошибка
    PHP:
    con.sendPacket(new PacketPlayOutPosition(ep.locXep.locYep.locZep.yawep.pitch, new HashSet<EnumPlayerTeleportFlags>(), 0));
    Код:
    [16:18:36 ERROR]: Could not load 'plugins\KMain.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.Error: Unresolved compilation problems:
            EnumItemSlot cannot be resolved
            EnumItemSlot cannot be resolved to a type
            EnumItemSlot cannot be resolved
            The method isEmpty() is undefined for the type ItemStack
            The constructor PacketPlayOutPosition(double, double, double, float, float, HashSet<EnumPlayerTeleportFlags>, int) is undefined
            EnumPlayerTeleportFlags cannot be resolved to a type
    
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:135) ~[spigot.jar:git-Spigot-c3c767f-33d5de3]
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:329) ~[spigot.jar:git-Spigot-c3c767f-33d5de3]
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) [spigot.jar:git-Spigot-c3c767f-33d5de3]
            at org.bukkit.craftbukkit.v1_8_R1.CraftServer.loadPlugins(CraftServer.java:291) [spigot.jar:git-Spigot-c3c767f-33d5de3]
            at net.minecraft.server.v1_8_R1.DedicatedServer.init(DedicatedServer.java:152) [spigot.jar:git-Spigot-c3c767f-33d5de3]
            at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:505) [spigot.jar:git-Spigot-c3c767f-33d5de3]
            at java.lang.Thread.run(Unknown Source) [?:1.8.0_231]
    Caused by: java.lang.Error: Unresolved compilation problems:
            EnumItemSlot cannot be resolved
            EnumItemSlot cannot be resolved to a type
            EnumItemSlot cannot be resolved
            The method isEmpty() is undefined for the type ItemStack
            The constructor PacketPlayOutPosition(double, double, double, float, float, HashSet<EnumPlayerTeleportFlags>, int) is undefined
            EnumPlayerTeleportFlags cannot be resolved to a type
    
            at karonus.main.main.<init>(main.java:262) ~[?:?]
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_231]
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_231]
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_231]
            at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_231]
            at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_231]
            at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:76) ~[spigot.jar:git-Spigot-c3c767f-33d5de3]
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:131) ~[spigot.jar:git-Spigot-c3c767f-33d5de3]
            ... 6 more
     
    Последнее редактирование: 28 дек 2019
  2. Exception_Prototype

    Exception_Prototype Активный участник Пользователь

    Баллы:
    96
    Когда же вы уже научитесь кидать ошибки...
     
  3. Dymeth

    Dymeth Активный участник Пользователь

    Баллы:
    98
    Имя в Minecraft:
    Dymeth
  4. Автор темы
    Karonus

    Karonus Новичок Пользователь

    Баллы:
    16
    Имя в Minecraft:
    Karonus_
    Код:
    [16:18:36 ERROR]: Could not load 'plugins\KMain.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.Error: Unresolved compilation problems:
            EnumItemSlot cannot be resolved
            EnumItemSlot cannot be resolved to a type
            EnumItemSlot cannot be resolved
            The method isEmpty() is undefined for the type ItemStack
            The constructor PacketPlayOutPosition(double, double, double, float, float, HashSet<EnumPlayerTeleportFlags>, int) is undefined
            EnumPlayerTeleportFlags cannot be resolved to a type
    
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:135) ~[spigot.jar:git-Spigot-c3c767f-33d5de3]
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:329) ~[spigot.jar:git-Spigot-c3c767f-33d5de3]
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) [spigot.jar:git-Spigot-c3c767f-33d5de3]
            at org.bukkit.craftbukkit.v1_8_R1.CraftServer.loadPlugins(CraftServer.java:291) [spigot.jar:git-Spigot-c3c767f-33d5de3]
            at net.minecraft.server.v1_8_R1.DedicatedServer.init(DedicatedServer.java:152) [spigot.jar:git-Spigot-c3c767f-33d5de3]
            at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:505) [spigot.jar:git-Spigot-c3c767f-33d5de3]
            at java.lang.Thread.run(Unknown Source) [?:1.8.0_231]
    Caused by: java.lang.Error: Unresolved compilation problems:
            EnumItemSlot cannot be resolved
            EnumItemSlot cannot be resolved to a type
            EnumItemSlot cannot be resolved
            The method isEmpty() is undefined for the type ItemStack
            The constructor PacketPlayOutPosition(double, double, double, float, float, HashSet<EnumPlayerTeleportFlags>, int) is undefined
            EnumPlayerTeleportFlags cannot be resolved to a type
    
            at karonus.main.main.<init>(main.java:262) ~[?:?]
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_231]
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_231]
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_231]
            at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_231]
            at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_231]
            at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:76) ~[spigot.jar:git-Spigot-c3c767f-33d5de3]
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:131) ~[spigot.jar:git-Spigot-c3c767f-33d5de3]
            ... 6 more
     
  5. Dymeth

    Dymeth Активный участник Пользователь

    Баллы:
    98
    Имя в Minecraft:
    Dymeth
    Подключи к своему проекту ядро нужной версии и перекомпилируй плагин. А лучше обновись с 1.8 на что-то посвежее, а вместо NMS используй ProtocolLib вместе с PacketWrapper
     
  6. alexandrage

    alexandrage Старожил Пользователь

    Баллы:
    173
    В тетрадке код писал что ли? Про ide хоть раз слышал?
     

Поделиться этой страницей