#How to tell if a player has been online within 30 days of being offline today?

1 messages · Page 1 of 1 (latest)

proven girder
#
  set {%player%.lastonline} to now
command /lastonline <offline player>:
  trigger:
    send "&a%arg-1% was online %difference between {%arg-1%.lastonline} and now % ago."```
wide bone
#

I mainly want him to automatically identify all players who are offline every minute, and automatically cancel the test.222 permission if the player is not online within a month

proven girder
#
  set {%player%.lastonline} to now
  add player to {players::*}
every minute:
  loop {players::*}:
    if difference between {%loop-value%.lastonline} and now > 30 days:
      #do sometihng```
wide bone
#

Let me try

wide bone
#

ask bro

shell bramble
#

I think it much better to check player's last-online-date when player joined

wide bone
#

I want to implement if player is not online for 30 days

#

Automatically revoke a permission

#

Is there a good way?

#

Brothers

proven girder
#

i think you cant remove permissions with skript

shell bramble
#
on quit:
  set {lastJoined::%player%} to now

every minute:
  loop {lastJoined::*}:
    if difference between {lastJoined::%loop-value%} and now > 30 days:
      set {_player} to loop value parsed as player
      remove <your-permission-node> from {_player}'s permissions```
I think it might be work, but I never tested it
And I don't know is it possible to revoke offline player's permission