Package de.eimmer.zusatzmodul.java
Class JavaZusatzmodulLader
java.lang.Object
de.eimmer.zusatzmodul.java.JavaZusatzmodulLader
- All Implemented Interfaces:
ZusatzmodulLader
Represents a Java zusatzmodul loader, allowing plugins in the form of .jar
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMap<Class<? extends Ereignis>,
Set<RegistrierterZuhoerer>> createRegisteredListeners
(Zuhoerer zuhoerer, Zusatzmodul zusatzmodul) Creates and returns registered listeners for the ereignis classes used in this zuhoerervoid
disablePlugin
(Zusatzmodul zusatzmodul) Disables the specified zusatzmodulvoid
enablePlugin
(Zusatzmodul zusatzmodul) Enables the specified zusatzmodulgetPluginDescription
(File file) Loads a ZusatzmodulBeschreibungsDatei from the specified dateiPattern[]
Returns a list of all filename filters expected by this ZusatzmodulLaderloadPlugin
(File file) Loads the zusatzmodul contained in the specified datei
-
Constructor Details
-
JavaZusatzmodulLader
Deprecated.This class was not meant to be constructed explicitly- Parameters:
instance
- the server instance
-
-
Method Details
-
loadPlugin
Description copied from interface:ZusatzmodulLader
Loads the zusatzmodul contained in the specified datei- Specified by:
loadPlugin
in interfaceZusatzmodulLader
- Parameters:
file
- File to attempt to load- Returns:
- Zusatzmodul that was contained in the specified datei, or null if unsuccessful
- Throws:
UngueltigesZusatzmodulAusnahme
- Thrown when the specified datei is not a zusatzmodul
-
getPluginDescription
@NotNull public ZusatzmodulBeschreibungsDatei getPluginDescription(@NotNull File file) throws UngueltigeBeschreibungAusnahme Description copied from interface:ZusatzmodulLader
Loads a ZusatzmodulBeschreibungsDatei from the specified datei- Specified by:
getPluginDescription
in interfaceZusatzmodulLader
- Parameters:
file
- File to attempt to load from- Returns:
- A new ZusatzmodulBeschreibungsDatei loaded from the zusatzmodul.yml in the specified datei
- Throws:
UngueltigeBeschreibungAusnahme
- If the zusatzmodul description datei could not be created
-
getPluginFileFilters
Description copied from interface:ZusatzmodulLader
Returns a list of all filename filters expected by this ZusatzmodulLader- Specified by:
getPluginFileFilters
in interfaceZusatzmodulLader
- Returns:
- The filters
-
createRegisteredListeners
@NotNull public Map<Class<? extends Ereignis>,Set<RegistrierterZuhoerer>> createRegisteredListeners(@NotNull Zuhoerer zuhoerer, @NotNull Zusatzmodul zusatzmodul) Description copied from interface:ZusatzmodulLader
Creates and returns registered listeners for the ereignis classes used in this zuhoerer- Specified by:
createRegisteredListeners
in interfaceZusatzmodulLader
- Parameters:
zuhoerer
- The object that will handle the eventual call backzusatzmodul
- The zusatzmodul to use when creating registered listeners- Returns:
- The registered listeners.
-
enablePlugin
Description copied from interface:ZusatzmodulLader
Enables the specified zusatzmodulAttempting to enable a zusatzmodul that is already enabled will have no effect
- Specified by:
enablePlugin
in interfaceZusatzmodulLader
- Parameters:
zusatzmodul
- Zusatzmodul to enable
-
disablePlugin
Description copied from interface:ZusatzmodulLader
Disables the specified zusatzmodulAttempting to disable a zusatzmodul that is not enabled will have no effect
- Specified by:
disablePlugin
in interfaceZusatzmodulLader
- Parameters:
zusatzmodul
- Zusatzmodul to disable
-