public interface NucleusSeenService
Plugins are expected to only register one NucleusSeenService.SeenInformationProvider
.
Consumers of this API should also note that this might run asynchronously. No methods that would require the use of a synchronous API should be used here.
Modifier and Type | Interface and Description |
---|---|
static interface |
NucleusSeenService.SeenInformationProvider
A
NucleusSeenService.SeenInformationProvider object can hook into the seen command and provide extra information on a player. |
Modifier and Type | Method and Description |
---|---|
void |
register(Object plugin,
NucleusSeenService.SeenInformationProvider seenInformationProvider)
Registers a
NucleusSeenService.SeenInformationProvider with Nucleus. |
void |
register(Object plugin,
Predicate<org.spongepowered.api.command.CommandSource> permissionCheck,
BiFunction<org.spongepowered.api.command.CommandSource,org.spongepowered.api.entity.living.player.User,Collection<org.spongepowered.api.text.Text>> informationGetter)
Registers a
NucleusSeenService.SeenInformationProvider with Nucleus that can be constructed using a functional programming style. |
void register(Object plugin, NucleusSeenService.SeenInformationProvider seenInformationProvider) throws IllegalArgumentException
NucleusSeenService.SeenInformationProvider
with Nucleus.plugin
- The plugin registering the service.seenInformationProvider
- The NucleusSeenService.SeenInformationProvider
IllegalArgumentException
- Thrown if the plugin has either
NucleusSeenService.SeenInformationProvider
alreadyPlugin
annotated classvoid register(Object plugin, Predicate<org.spongepowered.api.command.CommandSource> permissionCheck, BiFunction<org.spongepowered.api.command.CommandSource,org.spongepowered.api.entity.living.player.User,Collection<org.spongepowered.api.text.Text>> informationGetter) throws IllegalArgumentException
NucleusSeenService.SeenInformationProvider
with Nucleus that can be constructed using a functional programming style.plugin
- The plugin registering the service.permissionCheck
- A Predicate
that checks that the CommandSource
has permission to view the information provided.informationGetter
- A BiFunction
that accepts a CommandSource
that wants to view information about a User
and returns a Collection
of Text
to view.IllegalArgumentException
- Thrown if the plugin has either
NucleusSeenService.SeenInformationProvider
alreadyPlugin
annotated class