Interface ArenaSelector
public interface ArenaSelector
A selector effectively decides for the arena that shall be choosen given by a Collection.
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
The name of this selector.The plugin that created this instance.default ArenaSelectorType
getType()
The type of this selector.@Nullable RemoteArena
run
(List<? extends RemoteArena> arenas, @Nullable RemoteArena cachedArena) Make this selector do its thing using this method.
-
Method Details
-
getType
The type of this selector.- Returns:
- The type
-
getPlugin
Plugin getPlugin()The plugin that created this instance.- Returns:
- The plugin behind this
-
getName
String getName()The name of this selector.Must be in the following format: a-z, _, @, :
All characters also must be lower-cased- Returns:
- The name
-
run
@Nullable @Nullable RemoteArena run(List<? extends RemoteArena> arenas, @Nullable @Nullable RemoteArena cachedArena) Make this selector do its thing using this method.It is legal for him to apply changes to the
arenas
list (for performance reasons).- Parameters:
arenas
- The arenas from which it shall decide fromcachedArena
- The previously choosen arena. Maybe benull
- Returns:
- The arena that has been choosen. May be
null
-