Stats Plugin

Discussion in 'Plugin Requests' started by Redsquirel12, Jan 20, 2017.

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

    Redsquirel12

    Minecraft version: 1.11

    Suggested name: Stats

    What I want:
    A plugin that records the following things:

    • Playtime
      • Ideally the playtime would record the time in hours, for example "49 hours, 20 minutes, 50 seconds" instead of "2 days, 1 hours, 20 minutes, 50 seconds".
    • Joins
      • This would be how many times the player joined the server from the Server List Menu in their Minecraft Client.
    • Player Kills
      • This would be how many kills the player has got on other players. For example if I killed 5 players on the server then my player kills would be 5. Doesn't record mob kills of any sort.
    • Player Deaths
      • This would be how many deaths the player got as a result of other players killing them. For example if someone killed me 10 times then my player deaths would be 10. Doesn't record any other types of deaths for example fall damage or monsters.
    • Blocks Placed
      • The amount of blocks placed by the player in total.
    • Blocks Destroyed
      • The amount of blocks destroyed by the player in total.

    I'd rather the player information was stored in a file in the plugin's folder, however if using MySQL is easier then this could also be used.

    Another feature I'd like to be able to have is fully customisable text, meaning I would be able to change the text and colours displayed with "/stats" and each different variable (Playtime, joins etc..).

    Finally I'd like the stats plugin to record stats globally, so not per world. For example if I placed 10 blocks in the Hub world and 20 in the Survival world then the blocks placed would be 30.

    Ideas for commands:

    • /stats - Allows the player to view their own stats.
    • /stats (playername) - Allows the player to view other people's stats.

    Ideas for permissions:

    • stats.self (Allows players to read their own stats)
    • stats.others (Allows players to read other people's stats)

    When I'd like it by: Ideally as soon as you can have it done, if it's a big ask then I'd like to have it within a week.

    Anyway thanks for reading and feel free to ask anything below :)
     
    Last edited: Jan 20, 2017
    iTzTobi likes this.
  2. Offline

    DoggyCode™

    Is JSON fine? :)
     
    Redsquirel12 likes this.
  3. Online

    timtower Administrator Administrator Moderator

    Redsquirel12 and DoggyCode™ like this.
  4. Offline

    Redsquirel12

    I did try using this plugin earlier however in chat the values appeared as decimals (e.g. blocks placed = 5.0) and there wasn't any way to change it in the config.

    JSON would be fine. :) Not sure if that would have a way to change stats manually but it doesn't really matter.
     
  5. Online

    timtower Administrator Administrator Moderator

    That is probably a design choice.
    Can be modified by hand, can look a bit weird though when it is the first time that you do it.
    Also depends on the formatting.
     
    Redsquirel12 likes this.
  6. Offline

    DoggyCode™

    This is because he's using a double rather than a long or int. I have no idea why he went with that choice unless he wants to save that you broke 2 and a half (+0.5) blocks.
     
  7. Offline

    Redsquirel12

    Ah, so would it be possible to change it from a double to a long / int or is it easier for a new plugin to be created?
     
  8. Offline

    DoggyCode™

    Depends how big plugin the is, and needing permission from author will be needed.
     
  9. Online

    timtower Administrator Administrator Moderator

  10. Offline

    pyropyro78

    If no one does this before my next day off I'll make it. Unsure how long it will take me but I can't imagine it would take longer than a day or two to get fully functional.
     
    Redsquirel12 likes this.
  11. Offline

    pyropyro78

    Last edited: Jan 23, 2017
    Redsquirel12 likes this.
  12. Offline

    Lolmewn

    Stats is open-source, can modify it any way you want. I can't exactly remember anymore why I am using doubles and not ints/longs, but each Stat does have a format() method in which the displaying format can be changed (e.g. cast to long/int before writing value).
     
Thread Status:
Not open for further replies.

Share This Page