mc-player-counter | Displays the number of online players with 2 lines of HTML 2017-05-13

Displays the number of online players with 2 lines of HTML

  1. DevLeeo
    You just need to add the script link (you can add in head or body)

    Code (Text):

    <script src="https://cdn.jsdelivr.net/gh/leonardosnt/[email protected]/dist/mc-player-counter.min.js"></script>
     
    Then create an element with data-playercounter-ip="IP" (See attributes)

    E.g
    Code (Text):

    <span data-playercounter-ip="my.server.ip">0</span>
     
    Full Example:
    Code (Text):

    <!DOCTYPE html>
    <html>
      <head>
        <!-- ... -->
        <script src="https://cdn.jsdelivr.net/gh/leonardosnt/[email protected]/dist/mc-player-counter.min.js"></script>
      </head>
      <body>
        There are <span data-playercounter-ip="my.server.ip">0</span> players online on my server.
      </body>
    </html>
     
    Alternative CDN: https://cdn.rawgit.com/leonardosnt/mc-player-counter/1.1.0/dist/mc-player-counter.min.js (Is is not that reliable)

    JsFiddle example: https://jsfiddle.net/ctu4kbzq/
    Live example: https://cdn.rawgit.com/leonardosnt/mc-player-counter/master/examples/index.html
    chrischi, cctvps, exsodus and 3 others like this.

Recent Reviews

  1. ItsMCB
    ItsMCB
    5/5,
    Version: 2017-05-13
    I use Google Sites (yes, I know) with a custom domain for my server. Using the embed feature, I was able to put the code in. Thank you for making this!
  2. STN-Studios
    STN-Studios
    5/5,
    Version: 2017-05-13
    Exelent is still working .
  3. CKitty
    CKitty
    1/5,
    Version: 2017-05-13
    Doesn't work anymore... Simple keeps showing 0 regardless of the actual player count.
  4. Hyptex
    Hyptex
    5/5,
    Version: 2017-05-13
    It still works, he updated it recently on his github. Make sure you follow that (the download button) and not the code on this page.
  5. Dracke39
    Dracke39
    1/5,
    Version: 2017-05-13
    Some time ago I had used it, but now it does not work anymore. Sin could be useful
  6. HoLiSchit
    HoLiSchit
    5/5,
    Version: 2017-05-13
    Awesome. Works like a charm and i replaced a buggy WordPress Plugin by this.
    Thank you so much!
  7. Axelcraft201_YT
    Axelcraft201_YT
    5/5,
    Version: 2017-05-13
    This script is awesome and very easy to set up in a simple html page. This helped me so much :D
  8. 8Marc8
    8Marc8
    5/5,
    Version: 2017-05-13
    It's the best status script I have ever seen.
    Forget those Online APIs. With this script you haven't got an higher page loading duration because it's internal. Would give 10/10
  9. SakuraNep
    SakuraNep
    5/5,
    Version: 2017-05-13
    Works great and auto-updates just perfect !
  10. brushette
    brushette
    5/5,
    Version: 2017-05-13
    Really nice! just wanted that. It's really easy and will be amazing on my site! thank you very much :D