#Playtime Ranks!

11 messages · Page 1 of 1 (latest)

unborn obsidian
#

Im looking for a mod that executes a customizable command once a player have played for X amount of time. Would like to have it be configurable for multiple commands and different "playtime requirement" I'd need something like this to set players to a higher LP group once they've been a part of the server for said time.

MC 1.21.7 please

ripe saddle
#

I'm currently working on it. I'm pretty sure I'm almost done. Please let me know if this config scheme is clear to you.

{
  "<playtime1>": [
    "<command1>",
    "<command2>"
  ],
  "<playtime2>": [
    "<command3>"
  ]
}```

Note: if you use `${player}` it will be replaced with the player's name.
`<playtime>` must be a natural (counting) number > 0.
Example:
```json
{
  "1": [
    "say hello"
  ],
  "20": [
    "give ${player} minecraft:diamond"
  ]
}```

I've also added a command for reloading the config: `/pte reload` and one for resetting the playtime (mostly for debugging but if you want I can keep it): `/pte reset`.
Instead of `/pte` you can also use `/playtimeevents`
#

For now the <playtime> is in ticks but I could other units too like hours, days or minutes and seconds

ripe saddle
#

I'm pretty sure I'm done. I've added unit support. Now in <playtime> you can use XdYhZmWsU. Then X will be the days, Y hours,Z minutes, W seconds and U ticks. Like this:

{
  "5s": [
    "say You've played 5 seconds"
  ],
  "4d": [
    "say You've played 4 days"
  ],
  "1m1s1": [
    "say You've played 1 minute, 1 second and 1 tick"
  ],
  "2h5m": [
    "say You've played 1 hours and 5 minutes"
  ],
  "123":[
    "say You've played for 123 ticks"
  ]
}

And also some utility commands: to show playtime triggers and events (the commands that will be executed), and other useful things.

unborn obsidian
#

Fantastic, are the commands being executed by the player or console?

#

I like the config, looks clean

#

I’ll give it a try later today

#

And also is there a placeholder I can use for the player?

ripe saddle
#

The commands are being executed by the console. And if you use ${player} in a command it will be replaced with that player’s name.

#

I was thinking of adding other placeholders but didn’t come up with anything useful