public class HistoryProviders extends ServiceProvider<HistoryService>
The default service setting is ignored.
| Modifier and Type | Field and Description |
|---|---|
protected java.util.SortedSet<HistoryService> |
speedOrder
Services sorted by lookup speed.
|
defaultServiceName, disabledLookup, nameLookup| Constructor and Description |
|---|
HistoryProviders() |
| Modifier and Type | Method and Description |
|---|---|
MemoryService |
getMemoryService() |
java.lang.Boolean |
hasPlayerHistory(org.bukkit.Location block,
boolean acceptGuesses,
Debugger debugger)
Determines whether or not a block has been placed by a player, using the registered service providers
in order of lookup speed.
|
java.lang.Boolean |
hasPlayerHistory(org.bukkit.Location block,
boolean acceptGuesses,
ErrorHandler<java.lang.Exception> errorHandler)
Determines whether or not a block has been placed by a player, using the registered service providers
in order of lookup speed.
|
HistoryService |
register(HistoryService service)
Registers a service in the system.
|
HistoryService |
unregister(HistoryService service)
Unregisters a particular service.
|
containsService, enableAll, getByName, getDefaultName, getDefaultService, getEnabledServices, getRegisteredServices, isEnabled, isEnabled, setByName, setDefaultName, setEnabled, setEnabled, unregisterprotected transient java.util.SortedSet<HistoryService> speedOrder
public MemoryService getMemoryService()
public java.lang.Boolean hasPlayerHistory(org.bukkit.Location block,
boolean acceptGuesses,
Debugger debugger)
If no service provider could accurately answer the query, the function returns NULL.
block - - block to search for.acceptGuesses - - whether or not probabilistic answers are acceptable.debugger - - debugger that handles errors produced by any history service.public java.lang.Boolean hasPlayerHistory(org.bukkit.Location block,
boolean acceptGuesses,
ErrorHandler<java.lang.Exception> errorHandler)
If no service provider could accurately answer the query, the function returns NULL.
block - - block to search for.acceptGuesses - - whether or not probabilistic answers are acceptable.errorHandler - - reports errors from individual history services.public HistoryService register(HistoryService service)
ServiceProviderregister in class ServiceProvider<HistoryService>service - - the service to register.public HistoryService unregister(HistoryService service)
ServiceProviderunregister in class ServiceProvider<HistoryService>service - - the service to unregister.