Skip to content

Commit

Permalink
feat: add caution admonition for plugin loading phases in Velocity (#467
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Timongcraft authored Aug 17, 2024
1 parent 7f4230d commit e33d3f4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/velocity/dev/getting-started/api-basics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ Dependencies on other plugins are also to be specified there, but we'll get to t

### A word of caution

:::caution

In Velocity, plugin loading is split into two steps: construction and initialization. The code in
your plugin's constructor is part of the construction phase. There is very little you can do safely
during construction, especially as the API does not specify which operations are safe to run during
Expand All @@ -114,6 +116,8 @@ public void onProxyInitialization(ProxyInitializeEvent event) {
}
```
:::
## Getting your plugin's directory

At some point you may need your plugin's directory. To do this, add
Expand Down

0 comments on commit e33d3f4

Please sign in to comment.