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
description = """Auto fills signs with customizable text. Leave lines empty to skip them. Supports data formatting with:
39
+
|<d> - Day of month (1-31)
40
+
|<dd> - Day of month (01-31)
41
+
|<M> - Month (1-12)
42
+
|<MM> - Month (01-12)
43
+
|<MMM> - Month (short name, e.g., Jan)
44
+
|<MMMM> - Month (full name, e.g., January)
45
+
|<yy> - Year (last two digits, e.g., 26)
46
+
|<yyyy> - Year (e.g., 2026)
47
+
|<HH> - Hour (00-23)
48
+
|<mm> - Minute (00-59)
49
+
|<ss> - Second (00-59)
50
+
""".trimMargin(),
51
+
tag = ModuleTag.PLAYER
52
+
) {
53
+
var autoWrite by setting("Auto Write", true)
54
+
var line1 by setting("Line 1", "Welcome to Lambda!") { autoWrite }
55
+
var line2 by setting("Line 2", "Enjoy your stay.") { autoWrite }
56
+
var line3 by setting("Line 3", "Have fun!") { autoWrite }
57
+
var line4 by setting("Line 4", "Lambda <dd>/<M>/<yy>") { autoWrite }
58
+
var writeOnFront by setting("Write Front", true, description ="Write on front side of the sign") { autoWrite }
59
+
60
+
var autoClose by setting("Auto Close", true)
61
+
var signWriteDelay by setting("Sign Write Delay", 400L, 100L..1000L, 50L, description ="Delay in milliseconds before sending the sign text to the server") { autoClose }
62
+
63
+
init {
64
+
listen<GuiEvent.SignEditorOpen> { event ->
65
+
val lines =Array(4) { i -> event.component1().frontText.getMessages(false)[i].string }
66
+
if (autoWrite) {
67
+
var formatLines = arrayOf(line1, line2, line3, line4)
68
+
val calendar =Calendar.getInstance()
69
+
val month = calendar.get(Calendar.MONTH) +1// Months are 0-based in Calendar
0 commit comments