mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Allow extensions to load other extension's classes, and store extensions by IDs instead of name (#3946)
- the extensionmanagers `extension` method now takes in a extension id instead of name - extension folders are now created using extension id's - Extensions can load classes from other extensions now - Added warning about external class loading - Wherever applicable: store extensions internally by id instead of name
This commit is contained in:
parent
1d75d084a7
commit
34ff8c1217
5 changed files with 56 additions and 29 deletions
|
@ -36,13 +36,13 @@ import java.util.Collection;
|
|||
public abstract class ExtensionManager {
|
||||
|
||||
/**
|
||||
* Gets an extension with the given name.
|
||||
* Gets an extension by the given ID.
|
||||
*
|
||||
* @param name the name of the extension
|
||||
* @return an extension with the given name
|
||||
* @param id the ID of the extension
|
||||
* @return an extension with the given ID
|
||||
*/
|
||||
@Nullable
|
||||
public abstract Extension extension(@NonNull String name);
|
||||
public abstract Extension extension(@NonNull String id);
|
||||
|
||||
/**
|
||||
* Enables the given {@link Extension}.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue