Effect.Heart keeps crashing my program

Discussion in 'Plugin Development' started by alonmario1, Jan 10, 2022.

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


    I am trying to create a simple function that creates particles, and no matter what I do it keeps throwing at me the same exception when I use this method.

    Line that keeps crashing:

    //p = player object, and it isn't null.

    The error:
    Caused by: java.lang.NoSuchFieldError: HEART

    From what I can tell the enum "Effect" DOES contain "HEART", so I am at a loss for words personally... Is this method just outdated and cannot be used anymore?

    I've looked at other possible options to create particle effects including packets but honestly I want to understand why this error popped up more than anything right now (if anything out of spite T_T).
    Help is heavily appreciated!~
  2. Online

    timtower Administrator Administrator Moderator

    @alonmario1 Is the server you are developing for the same one as the one you are running on?
  3. Offline


    Yeah, its a local server that's running on my PC.
  4. Online

    timtower Administrator Administrator Moderator

    Is it the same version as the one you are developing on?
  5. Offline


    I have craftbukkit-1.8.8 and spigot-1.8.8 in my server, and in my referenced libraries on my java project I built the path based on these 2 jar files so it should be the exact same version.
    I hope this is what you meant, please forgive me if I misunderstood your question...

    Just to elaborate just a little further, I tried using Effect.getByName() instead of getting the static value from the enum directly and the resulting error stayed the same.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jan 11, 2022
  6. Online

    timtower Administrator Administrator Moderator

  7. Offline


    Currently at work, once I come back home I'll put them here :)

    Here's the log, I excluded some lines in the beginning that exposed my ip.
    [19:42:46] [Server thread/INFO]: Starting minecraft server version 1.8.8
    [19:42:46] [Server thread/INFO]: Loading properties
    [19:42:46] [Server thread/INFO]: Default game type: SURVIVAL
    [19:42:46] [Server thread/INFO]: Generating keypair
    19:42:46] [Server thread/INFO]: Using default channel type
    [19:42:46] [Server thread/INFO]: This server is running CraftBukkit version git-Bukkit-741a1bd (MC: 1.8.8) (Implementing API version 1.8.8-R0.1-SNAPSHOT)
    [19:42:49] [Server thread/INFO]: Server permissions file permissions.yml is empty, ignoring it
    [19:42:49] [Server thread/INFO]: Done (2.554s)! For help, type "help" or "?"
    [19:43:44] [Server thread/ERROR]: Could not pass event PlayerInteractEvent to GameManager v1.0
    org.bukkit.event.EventException: null
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ~[craftbukkit-1.8.8.jar:git-Bukkit-741a1bd]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[craftbukkit-1.8.8.jar:git-Bukkit-741a1bd]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:501) [craftbukkit-1.8.8.jar:git-Bukkit-741a1bd]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:486) [craftbukkit-1.8.8.jar:git-Bukkit-741a1bd]
        at org.bukkit.craftbukkit.v1_8_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:211) [craftbukkit-1.8.8.jar:git-Bukkit-741a1bd]
        at org.bukkit.craftbukkit.v1_8_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:178) [craftbukkit-1.8.8.jar:git-Bukkit-741a1bd]
        at org.bukkit.craftbukkit.v1_8_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:174) [craftbukkit-1.8.8.jar:git-Bukkit-741a1bd]
        at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:688) [craftbukkit-1.8.8.jar:git-Bukkit-741a1bd]
        at net.minecraft.server.v1_8_R3.PacketPlayInBlockPlace.a(PacketPlayInBlockPlace.java:52) [craftbukkit-1.8.8.jar:git-Bukkit-741a1bd]
        at net.minecraft.server.v1_8_R3.PacketPlayInBlockPlace.a(PacketPlayInBlockPlace.java:1) [craftbukkit-1.8.8.jar:git-Bukkit-741a1bd]
        at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13) [craftbukkit-1.8.8.jar:git-Bukkit-741a1bd]
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_261]
        at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_261]
        at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44) [craftbukkit-1.8.8.jar:git-Bukkit-741a1bd]
        at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:673) [craftbukkit-1.8.8.jar:git-Bukkit-741a1bd]
        at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:335) [craftbukkit-1.8.8.jar:git-Bukkit-741a1bd]
        at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:629) [craftbukkit-1.8.8.jar:git-Bukkit-741a1bd]
        at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:537) [craftbukkit-1.8.8.jar:git-Bukkit-741a1bd]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_261]
    Caused by: java.lang.NoSuchFieldError: HEART
        at me.alonmario1.Zombie.HeroAbility(Zombie.java:51) ~[?:?]
        at me.alonmario1.EventListerner.Ability(EventListerner.java:167) ~[?:?]
        at me.alonmario1.EventListerner.onRightClick(EventListerner.java:133) ~[?:?]
        at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) ~[?:?]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_261]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_261]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:300) ~[craftbukkit-1.8.8.jar:git-Bukkit-741a1bd]
        ... 18 more
    [19:43:48] [Server thread/INFO]: alonmario1 lost connection: Disconnected
    [19:43:48] [Server thread/INFO]: alonmario1 left the game.
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jan 11, 2022
Thread Status:
Not open for further replies.

Share This Page