How to use Plugin Metrics

Discussion in 'Spigot Plugin Development' started by PolyRocketMatt, Dec 8, 2016.

  1. Hay there!

    I've been creating plugins for a while, but I never got into Metrics, is there a good tutorial, cause I can't seem to find one!

    Thanks in advance!
  2. Include the metrics class and on your onEnable create a new instance of the metrics.

    Metrics metrics = new Metrics(this);
  3. Choco


    Honestly, I'm going to start recommending alternatives to McStats. Ever since the developer went kind of AWOL, McStat's servers are absolutely crap and have constant downtimes which can last anywhere from hours to days. There is an alternative quite similar to McStats, and it's actually been picking up a bit more steam recently.

    I highly recommend the use of bStats for new projects. If you have been using McStats for previous projects, don't bother changing them because you already have data on their servers instead. Though for new ones, it's exactly the same as McStats, but a much higher quality that I absolutely recommend
    • Like Like x 1
    • Agree Agree x 1
    • Useful Useful x 1
    • Creative Creative x 1
  4. I totally agree. Hidendra doesn't really seem to care about MCStats anymore and the downtimes where very annoing.

    There where only two big reasons, why i still prefer MCStats rather than anything else:
    • -> 141205 servers where using it
      This is an unimaginable huge cummunity providing informations.
    • It's included into spigot by default
      Every spigot server joins MCStats automatically, as soon as anyone launches it.
      Of course it can be disabled... but it's enabled by default.
      Even more, spigot already assigns an unique metrics ID for each server, this ID might be helpful at some time.
    These 2 reasons where pretty unbeatable.
  5. Choco


    Oh absolutely. I can see why you stand for McStats. I could imagine 141k+ servers would ruin plenty of servers. Especially when the only other sample size is just under 700 servers. However, with someone maintaining it, I would assume that downtime would be less common as it's constantly maintained and monitored.

    Yes, Spigot does have it by default. Though there are always those stubborn people whom use CraftBukkit servers and haven't decided to make the switch to Spigot yet (for whatever reason). If you want to give support to those servers, then it's nice to either add in your own Metrics class (Like I often did), or use bStats. Not sure why they should really get any support anyways, but oh well ~\_(''/)_/~.

    TL;DR: Valid arguments, I understand why people want to stick with it. But eventually, it's time for a change :)
  6. Owkay, So I added the bStats metrics class now, but how can I make sure the server will send data to bStats? cause I added the plugin I was making to my spigot server, but I still didn't get any data...