mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2025-12-09 16:45:46 -07:00
track login state withint logintimer plugin
This commit is contained in:
parent
59100a036d
commit
0ab6ed3868
1 changed files with 8 additions and 1 deletions
|
|
@ -25,6 +25,7 @@ class plugin : Plugin() {
|
||||||
|
|
||||||
private var timeMode = TIME_MODE_INITIALIZATION
|
private var timeMode = TIME_MODE_INITIALIZATION
|
||||||
private var initTime: Long = 0
|
private var initTime: Long = 0
|
||||||
|
private var logoutFlag = true
|
||||||
private var displayMessageCounter = 0
|
private var displayMessageCounter = 0
|
||||||
|
|
||||||
private var component: Component? = null
|
private var component: Component? = null
|
||||||
|
|
@ -40,7 +41,13 @@ class plugin : Plugin() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun OnLogin() {
|
override fun OnLogin() {
|
||||||
|
if(logoutFlag)
|
||||||
initTime = System.currentTimeMillis()
|
initTime = System.currentTimeMillis()
|
||||||
|
logoutFlag = false
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun OnLogout() {
|
||||||
|
logoutFlag = true
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun Draw(timeDelta: Long) {
|
override fun Draw(timeDelta: Long) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue