[MISC] PlayerCount v1.3 - Writes online players in a file! [740]

Discussion in 'Inactive/Unsupported Plugins' started by robin0van0der0v, Mar 13, 2011.

  1. Offline

    robin0van0der0v

    PlayerCount - Writes online players in a file!
    Version: v1.3

    Features:
    • Writes the player count to: Plugins/PlayerCount/PlayerCount.dat.
    • Writes online players to: Plugins/PlayerCount/OnlinePlayers.dat.
    Download PlayerCount!
    Source is inside the jar file.

    Known bugs:
    None. :D

    Changelog:
    Version 1.0
    • Release.
    Version 1.1
    • Changed namespace.
    Version 1.2
    • Works in Beta 1.4.
    Version 1.3
    • Fixed disconnect-event.
     
    ViZiT and fneyret like this.
  2. Offline

    fneyret

    Same issue on build 733
     
  3. Offline

    MathijsNL

    Maybe you should use the player quit\disconnect event as well to update the files. Dont know what events you currently use to make your plugin update the files. Maybe this works :)
     
  4. Offline

    robin0van0der0v

  5. Offline

    MathijsNL

    Was my post useful? :)
     
  6. Offline

    Niklas

    I can nothing about php. Can you make the code for me so i can just copy and paste it into an html file?
     
  7. Offline

    MathijsNL

    Ive got the php for you if you want, will post asap

    <?php
    // get data from files //
    $playersonline = file_get_contents("//bukkit/plugins/PlayerCount/PlayerCount.dat");
    $whoisonline = file_get_contents("//bukkit/plugins/PlayerCount/OnlinePlayers.dat");

    // who is online? //
    switch ($playersonline) {
    case "0":
    echo " (Nobody is online)";
    break;
    case "1":
    echo $whoisonline;
    break;
    default:
    echo $whoisonline;
    break;
    }
    ?>

    I did not include the number of player online, but you could easily put that in by doing:
    echo $playersonline and the text you want to use, but dont know the exact line right now.

    Good luck with it :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 12, 2016
  8. Offline

    robin0van0der0v

    I was already using the join/disconnect events, but now I set it in the files one second after the event. ;)
     
  9. Offline

    DjDCH

    @robin0van0der0v: The server who host the jar file seems to be offline. Cannot download the plugin. :(
     
    Tadas159 likes this.
  10. Offline

    Tadas159

    The server where the file is hosted doesn't work!!!!!!! Please update it.
     
  11. Offline

    wasder

    Same here
     
  12. Offline

    ViZiT

    Need Link!!! I can't download this plugin!!! but i love it since 1.3 beta)))
     
  13. Offline

    gamingvortex

    Last edited by a moderator: May 12, 2016
  14. Offline

    q-sens

    Just dropped by to say thanks for fixing it!
     
  15. Offline

    KiloWhiskey

    Any chance you could have this get the display name and write that to the file? Not sure if could even be done.
     
  16. Offline

    MathijsNL

    Still works on 860+ for me :)
     
  17. Offline

    KiloWhiskey

    @robin0van0der0v seems unlikely that this will need an update anymore and works fine in 867 for me, but I'd still like to see an option to have it just list names by displayname.
     
  18. Offline

    Pr4w

    Just in case, working fine on CB 1000 :)
     
  19. Offline

    DanielSivertsen

    Can you add kill death ration and things like that? :D
     
  20. Offline

    brzavr

    download link is damage!
     
  21. Offline

    DanielSivertsen

    The link don't works.
     
  22. Offline

    stradijeri

    I updated it to 1.2.3+, I hope robin0van0der0v doesn't mind :)
    You're welcome.
    PlayerCount.jar.zip

    EDIT:
    I updated some deprecated methods. This version works with 1.4.6+
    PlayerCount.jar
     

Share This Page