Discussion in 'Plugin Development' started by sipsi133, Dec 29, 2013.

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


    yea but the original guy said that he wants it to be displayed and just the kill coumts that the plyer kills.
  2. Offline


    No, he said he wants it on the lore.
  3. Offline


    uhhhhh i was saying the guy who posted this thread.

    ok i accept defeat but can you explain exactly what you mean by kill count to the weapon?

    @BillyGalbreathhow you get a bukkit dev account.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Aug 3, 2018
  4. Offline


    BillyGalbreath I used your code after you updated it and still not working.
    et477 I want the KillCount to be shown on weapon, not scoreboard or commandblock.
    But if its much easier to show on scoreboard, tell me how i do it. I have never did anything with scoreboards

    EDIT: et477 I posted this thread
  5. Offline


    So was I. Go back and re-read the first post.
    Are there any errors? If not I'll get on my PC and get it working.

    And about scoreboards/command blocks. You can most definitely use them, however they are even more cumbersome than this to get working. Especially if you are putting a kill count on a weapon instead of on a player.

    The method I wrote for you is exactly what your OP asked to do. If you rack up 100 kills with a sword, you can hand it to a friend and it will still say "Kills: 100" instead of 1 or 0. I thought this was the intended behavior?

    If you want it tied to the player instead, I will have to override some more stuff so the count ties to the player and it updates the count when a player picks it up, etc.
  6. Offline


    im not sure how to tie the kill counts to a weapon but i am looking at the youtube for answers

    you sure that you can do that kind of thing?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jun 6, 2016
  7. Offline


    BillyGalbreath I want it to stay on the item. Not player specific. Is it hard to make two lores, one for Entity kills and one for Player kills?
    Error with your code when i kill entity:

    11:12:12 [SEVERE] Could not pass event EntityDeathEvent to KillCount v0.0.3
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
            at org.bukkit.plugin.TimedRegisteredListener.callEvent(TimedRegisteredLi
            at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.j
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
            at org.bukkit.craftbukkit.v1_6_R3.event.CraftEventFactory.callEntityDeat
            at net.minecraft.server.v1_6_R3.EntityInsentient.dropDeathLoot(EntityIns
            at net.minecraft.server.v1_6_R3.EntityLiving.die(
            at net.minecraft.server.v1_6_R3.EntityLiving.damageEntity(EntityLiving.j
            at net.minecraft.server.v1_6_R3.EntityMonster.damageEntity(EntityMonster
            at net.minecraft.server.v1_6_R3.EntityZombie.damageEntity(EntityZombie.j
            at net.minecraft.server.v1_6_R3.EntityHuman.attack(
            at net.minecraft.server.v1_6_R3.PlayerConnection.a(
            at net.minecraft.server.v1_6_R3.Packet7UseEntity.handle(Packet7UseEntity
            at org.spigotmc.netty.NettyNetworkManager.b(
            at net.minecraft.server.v1_6_R3.PlayerConnection.e(
            at net.minecraft.server.v1_6_R3.ServerConnection.b(SourceFile:37)
            at org.spigotmc.netty.NettyServerConnection.b(
            at net.minecraft.server.v1_6_R3.MinecraftServer.t(
            at net.minecraft.server.v1_6_R3.DedicatedServer.t(
            at net.minecraft.server.v1_6_R3.MinecraftServer.s(
    Caused by: java.lang.NullPointerException
            at io.github.sipsi133.KillCount.updateWeaponKillCount(
            at io.github.sipsi133.KillCount.onEntityKill(
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            ... 22 more
    Line 119 is: if (lore.get(0).contains("Kills: ")) {
    Line 97 is: updateWeaponKillCount(weapon);
  8. Offline


    Ok, I fixed my code. I tested it on my server and it works fine. I've updated my post with the correct code in it on page 1. ;)
  9. Offline


    BillyGalbreath Thank you! Is this working for players too?

    Is it hard for you to make two lores, one for Entity kills and one for ONLY player kills?
Thread Status:
Not open for further replies.

Share This Page