1.15.2 randompackage error on hit

Discussion in 'Spigot Plugin Development' started by GodKillzDaily, Mar 30, 2020.

  1. I run a spigot 1.15.2 while playing on 1.8.9 because of protocol support.

    I enabled all the disabled enchants in randompackage config, and whenever i hit someone with an item that has the enabled enchant it gives me this error, and thhe enchant doesn't even work:

    Code (Text):

    [RandomPackage] ERROR Custom Enchant with identifier LEADERSHIP generated an attribute error! (16.5.9)
    [17:56:48] [Server thread/WARN]: java.lang.RuntimeException: Unexpected: D
    [17:56:48] [Server thread/WARN]: at me.randomhashtags.randompackage.addon.util.Mathable$1.parseFactor(Mathable.java:74)
    [17:56:48] [Server thread/WARN]: at me.randomhashtags.randompackage.addon.util.Mathable$1.parseTerm(Mathable.java:44)
    [17:56:48] [Server thread/WARN]: at me.randomhashtags.randompackage.addon.util.Mathable$1.parseExpression(Mathable.java:35)
    [17:56:48] [Server thread/WARN]: at me.randomhashtags.randompackage.addon.util.Mathable$1.parse(Mathable.java:24)
    [17:56:48] [Server thread/WARN]: at me.randomhashtags.randompackage.addon.util.Mathable.evaluate(Mathable.java:81)
    [17:56:48] [Server thread/WARN]: at me.randomhashtags.randompackage.attribute.SetDamage.execute(SetDamage.java:20)
    [17:56:48] [Server thread/WARN]: at me.randomhashtags.randompackage.attributesys.EventExecutor.executeAll(EventExecutor.java:212)
    [17:56:48] [Server thread/WARN]: at me.randomhashtags.randompackage.attributesys.EventExecutor.executeAll(EventExecutor.java:155)
    [17:56:48] [Server thread/WARN]: at me.randomhashtags.randompackage.attributesys.EventExecutor.tryGeneric(EventExecutor.java:337)
    [17:56:48] [Server thread/WARN]: at me.randomhashtags.randompackage.attributesys.EventExecutor.trigger(EventExecutor.java:355)
    [17:56:48] [Server thread/WARN]: at me.randomhashtags.randompackage.attributesys.EventExecutor.triggerCustomEnchants(EventExecutor.java:426)
    [17:56:48] [Server thread/WARN]: at me.randomhashtags.randompackage.api.CustomEnchants.triggerEnchants(CustomEnchants.java:937)
    [17:56:48] [Server thread/WARN]: at me.randomhashtags.randompackage.api.CustomEnchants.triggerEnchants(CustomEnchants.java:920)
    [17:56:48] [Server thread/WARN]: at me.randomhashtags.randompackage.api.CustomEnchants.triggerEnchants(CustomEnchants.java:917)
    [17:56:48] [Server thread/WARN]: at me.randomhashtags.randompackage.api.CustomEnchants.triggerEnchants(CustomEnchants.java:914)
    [17:56:48] [Server thread/WARN]: at me.randomhashtags.randompackage.api.CustomEnchants.triggerEnchants(CustomEnchants.java:911)
    [17:56:48] [Server thread/WARN]: at me.randomhashtags.randompackage.api.CustomEnchants.entityDamageByEntityEvent(CustomEnchants.java:419)
    [17:56:48] [Server thread/WARN]: at sun.reflect.GeneratedMethodAccessor216.invoke(Unknown Source)
    [17:56:48] [Server thread/WARN]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    [17:56:48] [Server thread/WARN]: at java.lang.reflect.Method.invoke(Unknown Source)
    [17:56:48] [Server thread/WARN]: at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:316)
    [17:56:48] [Server thread/WARN]: at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
    [17:56:48] [Server thread/WARN]: at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:529)
    [17:56:48] [Server thread/WARN]: at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:514)
    [17:56:48] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_15_R1.event.CraftEventFactory.callEvent(CraftEventFactory.java:230)
    [17:56:48] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_15_R1.event.CraftEventFactory.callEntityDamageEvent(CraftEventFactory.java:923)
    [17:56:48] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_15_R1.event.CraftEventFactory.handleEntityDamageEvent(CraftEventFactory.java:810)
    [17:56:48] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_15_R1.event.CraftEventFactory.handleEntityDamageEvent(CraftEventFactory.java:766)
    [17:56:48] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_15_R1.event.CraftEventFactory.handleLivingEntityDamageEvent(CraftEventFactory.java:955)
    [17:56:48] [Server thread/WARN]: at net.minecraft.server.v1_15_R1.EntityLiving.damageEntity0(EntityLiving.java:1624)
    [17:56:48] [Server thread/WARN]: at net.minecraft.server.v1_15_R1.EntityHuman.damageEntity0(EntityHuman.java:862)
    [17:56:48] [Server thread/WARN]: at net.minecraft.server.v1_15_R1.EntityLiving.damageEntity(EntityLiving.java:1028)
    [17:56:48] [Server thread/WARN]: at net.minecraft.server.v1_15_R1.EntityHuman.damageEntity(EntityHuman.java:785)
    [17:56:48] [Server thread/WARN]: at net.minecraft.server.v1_15_R1.EntityPlayer.damageEntity(EntityPlayer.java:659)
    [17:56:48] [Server thread/WARN]: at net.minecraft.server.v1_15_R1.EntityHuman.attack(EntityHuman.java:1085)
    [17:56:48] [Server thread/WARN]: at net.minecraft.server.v1_15_R1.EntityPlayer.attack(EntityPlayer.java:1545)
    [17:56:48] [Server thread/WARN]: at net.minecraft.server.v1_15_R1.PlayerConnection.a(PlayerConnection.java:1878)
    [17:56:48] [Server thread/WARN]: at net.minecraft.server.v1_15_R1.PacketPlayInUseEntity.a(SourceFile:68)
    [17:56:48] [Server thread/WARN]: at net.minecraft.server.v1_15_R1.PacketPlayInUseEntity.a(SourceFile:13)
    [17:56:48] [Server thread/WARN]: at net.minecraft.server.v1_15_R1.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:19)
    [17:56:48] [Server thread/WARN]: at net.minecraft.server.v1_15_R1.TickTask.run(SourceFile:18)
    [17:56:48] [Server thread/WARN]: at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeTask(SourceFile:144)
    [17:56:48] [Server thread/WARN]: at net.minecraft.server.v1_15_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23)
    [17:56:48] [Server thread/WARN]: at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeNext(SourceFile:118)
    [17:56:48] [Server thread/WARN]: at net.minecraft.server.v1_15_R1.MinecraftServer.ba(MinecraftServer.java:918)
    [17:56:48] [Server thread/WARN]: at net.minecraft.server.v1_15_R1.MinecraftServer.executeNext(MinecraftServer.java:911)
    [17:56:48] [Server thread/WARN]: at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeAll(SourceFile:103)
    [17:56:48] [Server thread/WARN]: at net.minecraft.server.v1_15_R1.MinecraftServer.sleepForTick(MinecraftServer.java:894)
    [17:56:48] [Server thread/WARN]: at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:828)
    [17:56:48] [Server thread/WARN]: at java.lang.Thread.run(Unknown Source)
     
    please i need help ASAP
     
  2. It did not come to your mind, that different versions may not be compatible with each other?
    I mean it's just a very small time frame of nearly 5 years between the two versions ... will probably be fine :)

    Except for that fact, it looks like there is an unexpected symbol "D" somewhere in the attempt to parse the numerical factor of something.
    You may accidentally entered it inside the config while changing things around?
    The alternative answer would be, that the formats how numbers are handled between versions is different.

    In any case, you haven't provided us with any code or further information, so I can only make assumptions.


    java.lang.RuntimeException: Unexpected: D ... hue hue hue
     
  3. Noxy im kinda stupid so what do i have to do
     
  4. what i gotta do
     
  5. Code (Text):

    # Made by RandomHashTags
    enabled: true
    #
    name: "Leadership"
    lore:
      - "&eThe more allies near you, the more"
      - "&edamage you deal."
    #
    max level: 5
    applies to: "helmet;chestplate;leggings;boots"
    #
    alchemist: "4000:5000:6000:7000"
    tinkerer: "63:75:87:99:111"
    #
    attributes:
      - "PvAny;SetDamage=dmg*(1+(.05*(NearbyDamagerAlliesSize(level+6)*(.25*level))))"
     
    thats leadership code
     
  6. First, you shouldn't run a Plugin that was designed for 1.15 on 1.8 / was designed for 1.8 on 1.15.
    This will cause all kinds of trouble (doesn't have to, but very very likely).

    Second, you didn't provide code, you provided a config file.

    I'm assuming you are not a developer, but a server owner / administrator who only uses the plugin and doesn't program against it / its API.
    In that case: keep in mind you are in the Spigot Plugin Development sub-forum here. It is for exchanging help / tips between programmers of self made plugins, not for giving support on (premium) resources and how to use them properly, except for if you were using it as a dependency in your own plugin and need help with some kind of coding error.

    I would recommend you to try and contact the developer of the plugin and ask for help there.
    People here generally can't (and don't want to) give help with 3rd-party plugins (especially when they are a premium resources), they did not develop themselves, as this would require deeper knowledge in how that specific plugin works.