[SIMPLE] Emerald Inventory Counter

Discussion in 'Archived: Plugin Requests' started by bewareofthecow, Aug 28, 2012.

  1. Offline

    bewareofthecow

    I was hoping to add a competitive element to a ultra hardcore server by completing a weekly tally of emerald in inventory for all players. This way total emerald becomes something to fight over and becomes a scoreboard at the end of the week.

    Essentially all I am looking for is a bukkit command to count the total emerald in each player's inventory and export it to a .txt file.
     
  2. Offline

    Hoolean

    bewareofthecow <-- Epic username :D
    I might try this :D

    Does it matter if it is a .txt file? I mean, can it be a .yml file?

    Does it count offline players?

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

    bewareofthecow

    Thanks for having a look at this!

    It would be nice to count all the players on the server including offline players. I plan on resetting the world every week so it would wipe the old players off the server.

    The type of file doesn't matter too much. I just wanted something easy to copy and paste onto a website so it can be used as a scoreboard.

    For Example:

    ::player Name::.............................................::Score::
    ---------------------------------------------------------
    PlayerName1...........................................................16
    PlayerName2............................................................8
    PlayerName3............................................................6
    PlayerName4............................................................1

    Again the format doesn't matter too much, that is just a suggestion. I'll be happy with anything you could come up with.

    Thanks again!
     
  4. Offline

    bewareofthecow

    Does anyone know the bukkit function that searches player inventory?
     
  5. Offline

    Hoolean

    I will make it so when you do /countemerald it outputs it into the config.yml!

    I will also do it so it outputs all of the players names and scores in no particular order, then finds the top 5!
    e.g.:
    Code:
    Winners:
      First:
        Player:
        Score:
      Second:
        Player:
        Score:
      Third:
        Player:
        Score:
      Fourth:
        Player:
        Score:
      Fifth:
        Player:
        Score:
    All-players:
      Player: score
      Player: score
      Player: score
      Player: score
      Player: score
      etc
    Also does it need to count offline players inventories as well?

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

    makskay

     
  7. Offline

    Hoolean

    Oop.
    EDIT: Oops.
     
  8. Offline

    bewareofthecow

    Sounds good! I look forward to seeing what you come up with!

    I don't know if it is a lot of extra work, but having the players sorted by amount of emerald would definitely be nice.
     

Share This Page