Jailing offline players doesn't work with jail-online-time set to true
Krakenied opened this issue ยท 1 comments
Type of bug
Other unexpected behaviour
/ess dump all
output
n/a
Error log (if applicable)
n/a
Bug description
Example player data file with jail-online-time
option set to true
after jailing:
the command is /jail {player} {jail} 3m
when player is online:
jail: 180000
onlinejail: 55718738
when player is offline:
jail: 180000
onlinejail: 3600
My guess is that player.getBase().getStatistic(PLAY_ONE_TICK)
returns some weird value (maybe 0) for offline players and that's the thing that needs to be fixed, however I'm not sure about the correct approach to that.
Steps to reproduce
Above ^
Expected behaviour
Time should be set correctly lol
Actual behaviour
Time isn't set correctly and player gets unjailed instantly on login
@Krakenied We figured it out, it was a weird rabbit hole to go down. Should work fine now.