public class LogBlockService extends java.lang.Object implements HistoryService
HistoryService.LookupSpeed
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
Constructor and Description |
---|
LogBlockService(de.diddiz.LogBlock.LogBlock logBlock) |
Modifier and Type | Method and Description |
---|---|
static LogBlockService |
create(org.bukkit.plugin.PluginManager manager)
Attempts to create a log block service.
|
static boolean |
exists(org.bukkit.plugin.PluginManager manager)
Determines if the log block service can be loaded.
|
HistoryService.LookupSpeed |
getLookupSpeed()
Retrieve the lookup (read) speed.
|
java.lang.String |
getServiceName()
Retrieves a unique string identifying this service.
|
boolean |
hasFalseNegatives()
Whether or not this service returns false negatives.
|
boolean |
hasFalsePositives()
Whether or not this service may return false positives.
|
java.lang.Boolean |
hasPlayerHistory(org.bukkit.Location blockLocation)
Determines whether or not a block has been placed by a player.
|
public static final java.lang.String NAME
public static LogBlockService create(org.bukkit.plugin.PluginManager manager)
manager
- - local plugin manager.public static boolean exists(org.bukkit.plugin.PluginManager manager)
manager
- - local plugin manager.public java.lang.String getServiceName()
Service
Note that this identifier must conform to an ENUM convention: upper case only, underscore for space.
A service MUST not alter its identifier once it has been registered.
getServiceName
in interface Service
public java.lang.Boolean hasPlayerHistory(org.bukkit.Location blockLocation) throws HistoryException
HistoryService
A service should return NULL if it cannot decide on a value, OR report that its return value is
always probabilistic (using HistoryService.hasFalsePositives()
or HistoryService.hasFalseNegatives()
).
hasPlayerHistory
in interface HistoryService
blockLocation
- - location of the block in question.HistoryException
public HistoryService.LookupSpeed getLookupSpeed()
HistoryService
getLookupSpeed
in interface HistoryService
public boolean hasFalsePositives()
HistoryService
If it does, HistoryProviders
may decide to inquire other services, if at all possible.
hasFalsePositives
in interface HistoryService
public boolean hasFalseNegatives()
HistoryService
hasFalseNegatives
in interface HistoryService