Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

kills from player

Comments in 'Plugin Development' started by Xenturio, Nov 29, 2014.

  1. Xenturio
    Offline

    Xenturio Active Member

    Joined:
    Sep 19, 2014
    Posts:
    333
    Minecraft User:
    Xenturio
    does anyone have an idear to get the kills that the players have made?
    Praxthisnovcht likes this.
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    1. Count it yourself in a database.
    2. Use the StatsCore API, which requires StatsCore to be installed on that server.
    Xenturio and iJoshuaHD like this.
  3. Xenturio
    Offline

    Xenturio Active Member

    Joined:
    Sep 19, 2014
    Posts:
    333
    Minecraft User:
    Xenturio
  4. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    @Xenturio why did you delete that code? I just reloaded the page and...
  5. Xenturio
    Offline

    Xenturio Active Member

    Joined:
    Sep 19, 2014
    Posts:
    333
    Minecraft User:
    Xenturio
    i think everybody can search like me ^^ was 2min but i can do it easier if u want
  6. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    If there is StatsCore, you can use:
    PHP:
    $server $plugin->getServer();
    $statsCore $server->getPluginManager()->getPlugin("StatsCore");
    $log $statsCore->getLog();
    $kills $log->getKills($name);
    Praxthisnovcht and PixelGuy75 like this.
  7. Xenturio
    Offline

    Xenturio Active Member

    Joined:
    Sep 19, 2014
    Posts:
    333
    Minecraft User:
    Xenturio
    make it on my own

    on death event get last cause - if instanceof EntityDamageByEntityEvent
    if damager instanceof Player and u are in.
  8. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Ok. But maybe you can check if StatsCore exists and use maybe, because StatsCore was designed to save servers' database size by providing statistics to other plugins.
  9. PixelGuy75
    Offline

    PixelGuy75 Notable Member Plugin Developer

    Joined:
    Feb 9, 2014
    Posts:
    316
    Plugins:
    2
    Minecraft User:
    PixelGuy75
    Can I use the StatsCore plugin?
  10. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Still haven't finished the database. I asked @iJoshuaHD to finish it for me but he seems to have forgotten.
    PixelGuy75 likes this.

Share This Page

Advertisement