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(org.spongepowered.api.plugin.PluginContainer plugin,
NucleusSeenService.SeenInformationProvider seenInformationProvider)
Registers a
NucleusSeenService.SeenInformationProvider with Nucleus. |
void |
register(org.spongepowered.api.plugin.PluginContainer plugin,
java.util.function.Predicate<org.spongepowered.api.command.CommandSource> permissionCheck,
java.util.function.BiFunction<org.spongepowered.api.command.CommandSource,org.spongepowered.api.entity.living.player.User,java.util.Collection<org.spongepowered.api.text.Text>> informationGetter)
Registers a
NucleusSeenService.SeenInformationProvider with Nucleus that can be constructed using a functional programming style. |
void register(org.spongepowered.api.plugin.PluginContainer plugin, NucleusSeenService.SeenInformationProvider seenInformationProvider) throws java.lang.IllegalArgumentException
NucleusSeenService.SeenInformationProvider
with Nucleus.plugin
- The PluginContainer
registering the service.seenInformationProvider
- The NucleusSeenService.SeenInformationProvider
java.lang.IllegalArgumentException
- Thrown if the plugin has either
NucleusSeenService.SeenInformationProvider
alreadyPlugin
annotated classvoid register(org.spongepowered.api.plugin.PluginContainer plugin, java.util.function.Predicate<org.spongepowered.api.command.CommandSource> permissionCheck, java.util.function.BiFunction<org.spongepowered.api.command.CommandSource,org.spongepowered.api.entity.living.player.User,java.util.Collection<org.spongepowered.api.text.Text>> informationGetter) throws java.lang.IllegalArgumentException
NucleusSeenService.SeenInformationProvider
with Nucleus that can be constructed using a functional programming style.plugin
- The PluginContainer
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.java.lang.IllegalArgumentException
- Thrown if the plugin has either
NucleusSeenService.SeenInformationProvider
alreadyPlugin
annotated class