We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ServerMessagingAPI.kt
1 parent cafd996 commit ce572f5Copy full SHA for ce572f5
src/main/kotlin/com/mairwunnx/projectessentials/core/api/v1/messaging/ServerMessagingAPI.kt
@@ -32,4 +32,23 @@ object ServerMessagingAPI {
32
* @since 2.0.0-SNAPSHOT.2.
33
*/
34
fun response(message: () -> String) = logger.info("> ${message()}")
35
+
36
+ /**
37
+ * Send list like response to server.
38
+ *
39
+ * For example, list all player homes or
40
+ * warps or permissions, etc.
41
42
+ * @param list list to display in server console.
43
+ * @param title list title, list name or something like that.
44
+ * @since 2.0.0-RC.3.
45
+ */
46
+ fun listAsResponse(list: List<String>, title: () -> String) = response {
47
+ """
48
49
+ ${title()}
50
51
+${list.joinToString(separator = ",\n") { " > $it" }}
52
53
+ }
54
}
0 commit comments