File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
src/content/docs/paper/dev/api Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -149,12 +149,13 @@ event in your plugin's bootstrapper. Some general information on that can be rea
149
149
The general registration looks fairly similar to dynamically created dialogs:
150
150
``` java title="YourPluginBootstrapper.java"
151
151
@Override
152
- public void bootstrap(BootstrapContext ctx) {
153
- ctx. getLifecycleManager(). registerEventHandler(RegistryEvents . DIALOG. compose()
154
- .newHandler(event - > event. registry(). registerWith(
155
- TypedKey . create(RegistryKey . DIALOG , Key . key(" papermc:custom_dialog" )),
156
- builder - > builder. empty()
157
- // ... build your dialog here
152
+ public void bootstrap(BootstrapContext context) {
153
+ context. getLifecycleManager(). registerEventHandler(RegistryEvents . DIALOG. compose()
154
+ .newHandler(event - > event. registry(). register(
155
+ DialogKeys . create(Key . key(" papermc:custom_dialog" )),
156
+ builder - > {
157
+ // ... build your dialog here
158
+ }
158
159
)));
159
160
}
160
161
```
You can’t perform that action at this time.
0 commit comments