Skip to content

Commit ace99d0

Browse files
authored
last one for today (#1012)
Co-authored-by: mosemister <[email protected]>
1 parent 91f6e01 commit ace99d0

File tree

1 file changed

+41
-6
lines changed

1 file changed

+41
-6
lines changed

source/plugin/injection.rst

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22
Dependency Injection
33
====================
44

5-
.. warning::
6-
7-
These docs were written for SpongeAPI 7 and are likely out of date.
8-
`If you feel like you can help update them, please submit a PR! <https://github.com/SpongePowered/SpongeDocs>`__
9-
10-
115
.. javadoc-import::
126
java.nio.file.Path
137
org.spongepowered.api.Game
@@ -172,3 +166,44 @@ The ``ConfigDir`` annotation can only be applied on the ``Path`` type to retrive
172166
useful for plugins that require multiple configuration files, providing the directory to place them rather than a
173167
single file.
174168

169+
170+
Full List of injectables
171+
~~~~~~~~~~~~~~~~~~~~~~~~
172+
173+
+----------------------------+------------------------------------------------------------------------------------------------------+
174+
| Type | Description |
175+
+============================+======================================================================================================+
176+
| PluginContainer | Your plugin's container |
177+
+----------------------------+------------------------------------------------------------------------------------------------------+
178+
| Logger | Your plugin's log4j logger |
179+
+----------------------------+------------------------------------------------------------------------------------------------------+
180+
| System.Logger | Your plugin's Java Logger |
181+
+----------------------------+------------------------------------------------------------------------------------------------------+
182+
| Path | Your plugin's config location, use the ``@DefaultConfig`` or the ``@ConfigDir`` to give more detials |
183+
+----------------------------+------------------------------------------------------------------------------------------------------+
184+
| TypeSerializerCollection | Your plugin's specific TypeSerializer's |
185+
+----------------------------+------------------------------------------------------------------------------------------------------+
186+
| ConfigurationLoader | Your plugin's config loader, use the ``@DefaultConfig`` to give more detail |
187+
+----------------------------+------------------------------------------------------------------------------------------------------+
188+
| ConfigurationReference | Your plugin's config reference, use the ``@DefaultConfig`` to give more detial |
189+
+----------------------------+------------------------------------------------------------------------------------------------------+
190+
| Game | The Sponge global game instance |
191+
+----------------------------+------------------------------------------------------------------------------------------------------+
192+
| MinecraftVersion | The minecraft version the server is running |
193+
+----------------------------+------------------------------------------------------------------------------------------------------+
194+
| ChannelManager | The server's channel manager |
195+
+----------------------------+------------------------------------------------------------------------------------------------------+
196+
| PluginManager | the server's plugin manager |
197+
+----------------------------+------------------------------------------------------------------------------------------------------+
198+
| ConfigManager | the server's configuration file manager |
199+
+----------------------------+------------------------------------------------------------------------------------------------------+
200+
| MetricsConfigManager | the server's metric configurations manager |
201+
+----------------------------+------------------------------------------------------------------------------------------------------+
202+
| ServiceProvider.GameScoped | The initial service provider for the server |
203+
+----------------------------+------------------------------------------------------------------------------------------------------+
204+
| FactoryProvider | Not something plugins typically use |
205+
+----------------------------+------------------------------------------------------------------------------------------------------+
206+
| BuilderProvider | Not something plugins typically use |
207+
+----------------------------+------------------------------------------------------------------------------------------------------+
208+
| Path | Shared configuration path, used when ``@DefaultConfig`` and ``@ConfigDir`` are not used |
209+
+----------------------------+------------------------------------------------------------------------------------------------------+

0 commit comments

Comments
 (0)