Fix messaging [WIP] (#1614)
* Fix messaging [WIP] * Make codeclimate happy * Codeclimate, pls * got it, i hope * Improvements * Remove duplicated checks, other improvements, make login/logout broadcasts * Optimize project imports * Make codeclimate happy again
This commit is contained in:
@@ -71,6 +71,11 @@ public class CacheDataSource implements DataSource {
|
||||
source.reload();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCached() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAuthAvailable(String user) {
|
||||
return getAuth(user) != null;
|
||||
|
||||
@@ -14,6 +14,15 @@ import java.util.Set;
|
||||
*/
|
||||
public interface DataSource extends Reloadable {
|
||||
|
||||
/**
|
||||
* Return whether the data source is cached and needs to send plugin messaging updates.
|
||||
*
|
||||
* @return true if the data source is cached.
|
||||
*/
|
||||
default boolean isCached() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return whether there is a record for the given username.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user