You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Added Dialogs
* Moved `xyz.theprogramsrc.uismodule.simple.SimpleUi` to `xyz.theprogramsrc.uismodule.ui.SimpleUi`
* Added TranslationsModule as dependency
* Was this dialog closed manually or programmatically?
48
+
*/
49
+
var manuallyClosed =false
50
+
private set
51
+
52
+
privatefunsend() {
53
+
if(this.player.isOnline) { // Check if the player is online
54
+
if(this.title !=null||this.subtitle !=null) {
55
+
Titles.sendTitle(
56
+
this.player,
57
+
0, // Fade in
58
+
20, // Stay
59
+
0, // Fade out
60
+
(this.title ?:"&7").bukkitColor(),
61
+
(this.subtitle ?:"&7").bukkitColor()
62
+
)
63
+
} else {
64
+
Titles.clearTitle(this.player)
65
+
}
66
+
67
+
val now =System.currentTimeMillis() // Get the current time
68
+
val calc = now - lastMovementAt // Calculate the difference between the last movement and now. (If the player hasn't moved the calc will be equals to now)
69
+
// Show the close actionbar translation if the player has moved in the last 5 seconds, otherwise show the actionbar
70
+
val actionbar =if(calc <5000L&& calc != now &&this.canBeClosed) {
0 commit comments