Package io.github.cfraser.graphguard
Object Server.Plugin.DSL
-
- All Implemented Interfaces:
public class Server.Plugin.DSLServer.Plugin.DSL to build a Server.Plugin with the Server.Plugin.Builder.
-
-
Field Summary
Fields Modifier and Type Field Description public final static Server.Plugin.DSLINSTANCE
-
Method Summary
Modifier and Type Method Description final Server.Pluginplugin(Function1<Server.Plugin.Builder, Unit> builder)Build a Server.Plugin with the builder function. -
-
Method Detail
-
plugin
final Server.Plugin plugin(Function1<Server.Plugin.Builder, Unit> builder)
Build a Server.Plugin with the builder function.
val printer = plugin { intercept { message -> message.also(::println) } observe { event -> println(event) } }- Parameters:
builder- the function that builds the Server.Plugin- Returns:
the built Server.Plugin
-
-
-
-