Renamed some Service related classes

This commit is contained in:
Rsl1122 2020-02-12 18:16:30 +02:00 committed by Risto Lahtela
parent 96837dbcd0
commit 9c74c40f72
24 changed files with 104 additions and 88 deletions

View File

@ -39,7 +39,7 @@ public interface CapabilityService {
* @throws IllegalStateException If Plan is installed, but not enabled.
*/
static CapabilityService getInstance() {
return Optional.ofNullable(CapabilityServiceHolder.service)
return Optional.ofNullable(Holder.service)
.orElseThrow(() -> new IllegalStateException("CapabilityService has not been initialised yet."));
}
@ -61,15 +61,15 @@ public interface CapabilityService {
return Capability.getByName(capabilityName).isPresent();
}
class CapabilityServiceHolder {
class Holder {
static CapabilityService service;
private CapabilityServiceHolder() {
private Holder() {
/* Static variable holder */
}
static void set(CapabilityService service) {
CapabilityServiceHolder.service = service;
Holder.service = service;
}
}

View File

@ -32,6 +32,11 @@ import java.util.regex.Pattern;
*/
public interface ResolverService {
static ResolverService getInstance() {
return Optional.ofNullable(ResolverService.Holder.service)
.orElseThrow(() -> new IllegalStateException("ResolverService has not been initialised yet."));
}
/**
* Register a new resolver.
*
@ -68,4 +73,16 @@ public interface ResolverService {
* @return Resolver if registered or empty.
*/
Optional<Resolver> getResolver(String target);
class Holder {
static ResolverService service;
private Holder() {
/* Static variable holder */
}
static void set(ResolverService service) {
ResolverService.Holder.service = service;
}
}
}

View File

@ -44,7 +44,7 @@ public interface ExtensionService {
* @throws IllegalStateException If Plan is installed, but not enabled.
*/
static ExtensionService getInstance() {
return Optional.ofNullable(ExtensionServiceHolder.service)
return Optional.ofNullable(Holder.service)
.orElseThrow(() -> new IllegalStateException("ExtensionService has not been initialised yet."));
}
@ -69,15 +69,15 @@ public interface ExtensionService {
*/
void unregister(DataExtension extension);
class ExtensionServiceHolder {
class Holder {
static ExtensionService service;
private ExtensionServiceHolder() {
private Holder() {
/* Static variable holder */
}
static void set(ExtensionService service) {
ExtensionServiceHolder.service = service;
Holder.service = service;
}
}

View File

@ -40,7 +40,7 @@ public interface QueryService {
* @throws IllegalStateException If Plan is installed, but not enabled.
*/
static QueryService getInstance() {
return Optional.ofNullable(QueryService.QueryServiceHolder.service)
return Optional.ofNullable(Holder.service)
.orElseThrow(() -> new IllegalStateException("QueryService has not been initialised yet."));
}
@ -148,15 +148,15 @@ public interface QueryService {
void apply();
}
class QueryServiceHolder {
class Holder {
static QueryService service;
private QueryServiceHolder() {
private Holder() {
/* Static variable holder */
}
static void set(QueryService service) {
QueryService.QueryServiceHolder.service = service;
Holder.service = service;
}
}

View File

@ -19,7 +19,7 @@ package com.djrapitops.plan.gathering.listeners;
import com.djrapitops.plan.Plan;
import com.djrapitops.plan.PlanPlugin;
import com.djrapitops.plan.api.events.PlanBukkitEnableEvent;
import com.djrapitops.plan.capability.CapabilityServiceImplementation;
import com.djrapitops.plan.capability.CapabilitySvc;
import com.djrapitops.plan.gathering.listeners.bukkit.*;
import org.bukkit.Bukkit;
import org.bukkit.event.HandlerList;
@ -82,6 +82,6 @@ public class BukkitListenerSystem extends ListenerSystem {
boolean isEnabled = plugin.isSystemEnabled();
PlanBukkitEnableEvent event = new PlanBukkitEnableEvent(isEnabled);
Bukkit.getServer().getPluginManager().callEvent(event);
CapabilityServiceImplementation.notifyAboutEnable(isEnabled);
CapabilitySvc.notifyAboutEnable(isEnabled);
}
}

View File

@ -22,7 +22,7 @@ import com.djrapitops.plan.delivery.export.Exporter;
import com.djrapitops.plan.delivery.webserver.cache.DataID;
import com.djrapitops.plan.delivery.webserver.cache.JSONCache;
import com.djrapitops.plan.extension.CallEvents;
import com.djrapitops.plan.extension.ExtensionServiceImplementation;
import com.djrapitops.plan.extension.ExtensionSvc;
import com.djrapitops.plan.gathering.cache.NicknameCache;
import com.djrapitops.plan.gathering.cache.SessionCache;
import com.djrapitops.plan.gathering.domain.Session;
@ -62,7 +62,7 @@ public class PlayerOnlineListener implements Listener {
private final Processing processing;
private final ServerInfo serverInfo;
private final DBSystem dbSystem;
private final ExtensionServiceImplementation extensionService;
private final ExtensionSvc extensionService;
private final Exporter exporter;
private final GeolocationCache geolocationCache;
private final NicknameCache nicknameCache;
@ -76,7 +76,7 @@ public class PlayerOnlineListener implements Listener {
Processing processing,
ServerInfo serverInfo,
DBSystem dbSystem,
ExtensionServiceImplementation extensionService,
ExtensionSvc extensionService,
Exporter exporter,
GeolocationCache geolocationCache,
NicknameCache nicknameCache,

View File

@ -19,7 +19,7 @@ package com.djrapitops.plan.gathering.listeners;
import com.djrapitops.plan.PlanBungee;
import com.djrapitops.plan.PlanPlugin;
import com.djrapitops.plan.api.events.PlanBungeeEnableEvent;
import com.djrapitops.plan.capability.CapabilityServiceImplementation;
import com.djrapitops.plan.capability.CapabilitySvc;
import com.djrapitops.plan.gathering.listeners.bungee.PlayerOnlineListener;
import javax.inject.Inject;
@ -50,6 +50,6 @@ public class BungeeListenerSystem extends ListenerSystem {
boolean isEnabled = plugin.isSystemEnabled();
PlanBungeeEnableEvent event = new PlanBungeeEnableEvent(isEnabled);
((PlanBungee) plugin).getProxy().getPluginManager().callEvent(event);
CapabilityServiceImplementation.notifyAboutEnable(isEnabled);
CapabilitySvc.notifyAboutEnable(isEnabled);
}
}

View File

@ -21,7 +21,7 @@ import com.djrapitops.plan.delivery.export.Exporter;
import com.djrapitops.plan.delivery.webserver.cache.DataID;
import com.djrapitops.plan.delivery.webserver.cache.JSONCache;
import com.djrapitops.plan.extension.CallEvents;
import com.djrapitops.plan.extension.ExtensionServiceImplementation;
import com.djrapitops.plan.extension.ExtensionSvc;
import com.djrapitops.plan.gathering.cache.SessionCache;
import com.djrapitops.plan.gathering.domain.Session;
import com.djrapitops.plan.gathering.geolocation.GeolocationCache;
@ -58,7 +58,7 @@ public class PlayerOnlineListener implements Listener {
private final PlanConfig config;
private final Processing processing;
private final DBSystem dbSystem;
private final ExtensionServiceImplementation extensionService;
private final ExtensionSvc extensionService;
private final Exporter exporter;
private final GeolocationCache geolocationCache;
private final SessionCache sessionCache;
@ -70,7 +70,7 @@ public class PlayerOnlineListener implements Listener {
PlanConfig config,
Processing processing,
DBSystem dbSystem,
ExtensionServiceImplementation extensionService,
ExtensionSvc extensionService,
Exporter exporter, GeolocationCache geolocationCache,
SessionCache sessionCache,
ServerInfo serverInfo,

View File

@ -17,7 +17,7 @@
package com.djrapitops.plan;
import com.djrapitops.plan.api.PlanAPI;
import com.djrapitops.plan.capability.CapabilityServiceImplementation;
import com.djrapitops.plan.capability.CapabilitySvc;
import com.djrapitops.plan.delivery.DeliveryUtilities;
import com.djrapitops.plan.delivery.export.ExportSystem;
import com.djrapitops.plan.delivery.webserver.NonProxyWebserverDisableChecker;
@ -25,16 +25,16 @@ import com.djrapitops.plan.delivery.webserver.WebServer;
import com.djrapitops.plan.delivery.webserver.WebServerSystem;
import com.djrapitops.plan.exceptions.EnableException;
import com.djrapitops.plan.extension.ExtensionService;
import com.djrapitops.plan.extension.ExtensionServiceImplementation;
import com.djrapitops.plan.extension.ExtensionSvc;
import com.djrapitops.plan.gathering.cache.CacheSystem;
import com.djrapitops.plan.gathering.importing.ImportSystem;
import com.djrapitops.plan.gathering.listeners.ListenerSystem;
import com.djrapitops.plan.identification.Server;
import com.djrapitops.plan.identification.ServerInfo;
import com.djrapitops.plan.processing.Processing;
import com.djrapitops.plan.query.QueryServiceImplementation;
import com.djrapitops.plan.query.QuerySvc;
import com.djrapitops.plan.settings.ConfigSystem;
import com.djrapitops.plan.settings.SettingsServiceImplementation;
import com.djrapitops.plan.settings.SettingsSvc;
import com.djrapitops.plan.settings.locale.LocaleSystem;
import com.djrapitops.plan.storage.database.DBSystem;
import com.djrapitops.plan.storage.database.queries.objects.ServerQueries;
@ -77,9 +77,9 @@ public class PlanSystem implements SubSystem {
private final ImportSystem importSystem;
private final ExportSystem exportSystem;
private final DeliveryUtilities deliveryUtilities;
private final ExtensionServiceImplementation extensionService;
private final QueryServiceImplementation queryService;
private final SettingsServiceImplementation settingsService;
private final ExtensionSvc extensionService;
private final QuerySvc queryService;
private final SettingsSvc settingsService;
private final PluginLogger logger;
private final Timings timings;
private final ErrorHandler errorHandler;
@ -100,9 +100,9 @@ public class PlanSystem implements SubSystem {
ImportSystem importSystem,
ExportSystem exportSystem,
DeliveryUtilities deliveryUtilities,
ExtensionServiceImplementation extensionService,
QueryServiceImplementation queryService,
SettingsServiceImplementation settingsService,
ExtensionSvc extensionService,
QuerySvc queryService,
SettingsSvc settingsService,
PluginLogger logger,
Timings timings,
ErrorHandler errorHandler,
@ -151,7 +151,7 @@ public class PlanSystem implements SubSystem {
@Override
public void enable() throws EnableException {
CapabilityServiceImplementation.initialize();
CapabilitySvc.initialize();
enableSystems(
files,

View File

@ -27,21 +27,20 @@ import java.util.function.Consumer;
*
* @author Rsl1122
*/
public class CapabilityServiceImplementation implements CapabilityService {
public class CapabilitySvc implements CapabilityService {
private final List<Consumer<Boolean>> enableListeners;
private CapabilityServiceImplementation() {
/* Inject required for dagger */
CapabilityServiceHolder.set(this);
private CapabilitySvc() {
Holder.set(this);
enableListeners = new ArrayList<>();
}
private static CapabilityServiceImplementation get() {
if (CapabilityServiceHolder.service == null) {
return new CapabilityServiceImplementation();
private static CapabilitySvc get() {
if (Holder.service == null) {
return new CapabilitySvc();
}
return (CapabilityServiceImplementation) CapabilityServiceHolder.service;
return (CapabilitySvc) Holder.service;
}
public static void initialize() {

View File

@ -20,7 +20,7 @@ import com.djrapitops.plan.PlanPlugin;
import com.djrapitops.plan.exceptions.database.DBInitException;
import com.djrapitops.plan.exceptions.database.DBOpException;
import com.djrapitops.plan.processing.Processing;
import com.djrapitops.plan.query.QueryServiceImplementation;
import com.djrapitops.plan.query.QuerySvc;
import com.djrapitops.plan.settings.Permissions;
import com.djrapitops.plan.settings.locale.Locale;
import com.djrapitops.plan.settings.locale.lang.CmdHelpLang;
@ -55,7 +55,7 @@ public class ManageClearCommand extends CommandNode {
private final Locale locale;
private final Processing processing;
private final DBSystem dbSystem;
private final QueryServiceImplementation queryService;
private final QuerySvc queryService;
private final ErrorHandler errorHandler;
@Inject
@ -64,7 +64,7 @@ public class ManageClearCommand extends CommandNode {
Locale locale,
Processing processing,
DBSystem dbSystem,
QueryServiceImplementation queryService,
QuerySvc queryService,
ErrorHandler errorHandler
) {
super("clear", Permissions.MANAGE.getPermission(), CommandType.PLAYER_OR_ARGS);

View File

@ -19,7 +19,7 @@ package com.djrapitops.plan.commands.subcommands.manage;
import com.djrapitops.plan.exceptions.database.DBOpException;
import com.djrapitops.plan.identification.UUIDUtility;
import com.djrapitops.plan.processing.Processing;
import com.djrapitops.plan.query.QueryServiceImplementation;
import com.djrapitops.plan.query.QuerySvc;
import com.djrapitops.plan.settings.Permissions;
import com.djrapitops.plan.settings.locale.Locale;
import com.djrapitops.plan.settings.locale.lang.CmdHelpLang;
@ -56,7 +56,7 @@ public class ManageRemoveCommand extends CommandNode {
private final Locale locale;
private final Processing processing;
private final DBSystem dbSystem;
private final QueryServiceImplementation queryService;
private final QuerySvc queryService;
private final UUIDUtility uuidUtility;
private final ErrorHandler errorHandler;
@ -65,7 +65,7 @@ public class ManageRemoveCommand extends CommandNode {
Locale locale,
Processing processing,
DBSystem dbSystem,
QueryServiceImplementation queryService,
QuerySvc queryService,
UUIDUtility uuidUtility,
ErrorHandler errorHandler
) {

View File

@ -29,15 +29,15 @@ import javax.inject.Singleton;
@Singleton
public class ExtensionServerMethodCallerTask extends AbsRunnable {
private final ExtensionServiceImplementation extensionServiceImplementation;
private final ExtensionSvc service;
@Inject
public ExtensionServerMethodCallerTask(ExtensionServiceImplementation extensionServiceImplementation) {
this.extensionServiceImplementation = extensionServiceImplementation;
public ExtensionServerMethodCallerTask(ExtensionSvc service) {
this.service = service;
}
@Override
public void run() {
extensionServiceImplementation.updateServerValues(CallEvents.SERVER_PERIODICAL);
service.updateServerValues(CallEvents.SERVER_PERIODICAL);
}
}

View File

@ -47,7 +47,7 @@ import java.util.UUID;
* @author Rsl1122
*/
@Singleton
public class ExtensionServiceImplementation implements ExtensionService {
public class ExtensionSvc implements ExtensionService {
private final PlanConfig config;
private final DBSystem dbSystem;
@ -60,7 +60,7 @@ public class ExtensionServiceImplementation implements ExtensionService {
private final Map<String, ProviderValueGatherer> extensionGatherers;
@Inject
public ExtensionServiceImplementation(
public ExtensionSvc(
PlanConfig config,
DBSystem dbSystem,
ServerInfo serverInfo,
@ -79,7 +79,7 @@ public class ExtensionServiceImplementation implements ExtensionService {
extensionGatherers = new HashMap<>();
ExtensionService.ExtensionServiceHolder.set(this);
Holder.set(this);
}
public void register() {

View File

@ -18,7 +18,7 @@ package com.djrapitops.plan.extension.implementation;
import com.djrapitops.plan.extension.CallEvents;
import com.djrapitops.plan.extension.Caller;
import com.djrapitops.plan.extension.ExtensionServiceImplementation;
import com.djrapitops.plan.extension.ExtensionSvc;
import com.djrapitops.plan.extension.implementation.providers.gathering.ProviderValueGatherer;
import com.djrapitops.plan.processing.Processing;
@ -32,12 +32,12 @@ import java.util.UUID;
public class CallerImplementation implements Caller {
private final ProviderValueGatherer gatherer;
private final ExtensionServiceImplementation extensionService;
private final ExtensionSvc extensionService;
private final Processing processing;
public CallerImplementation(
ProviderValueGatherer gatherer,
ExtensionServiceImplementation extensionService,
ExtensionSvc extensionService,
Processing processing
) {
this.gatherer = gatherer;

View File

@ -38,7 +38,7 @@ import java.util.concurrent.Future;
import java.util.function.Consumer;
@Singleton
public class QueryServiceImplementation implements QueryService {
public class QuerySvc implements QueryService {
private final DBSystem dbSystem;
private final ServerInfo serverInfo;
@ -49,7 +49,7 @@ public class QueryServiceImplementation implements QueryService {
private final Set<VoidFunction> clearSubscribers;
@Inject
public QueryServiceImplementation(
public QuerySvc(
DBSystem dbSystem,
ServerInfo serverInfo,
PluginLogger logger,
@ -65,7 +65,7 @@ public class QueryServiceImplementation implements QueryService {
}
public void register() {
QueryService.QueryServiceHolder.set(this);
Holder.set(this);
}
@Override

View File

@ -34,13 +34,13 @@ import java.util.function.Supplier;
* @author Rsl1122
*/
@Singleton
public class SettingsServiceImplementation implements SettingsService {
public class SettingsSvc implements SettingsService {
private final PlanConfig config;
private final ErrorHandler errorHandler;
@Inject
public SettingsServiceImplementation(
public SettingsSvc(
PlanConfig config,
ErrorHandler errorHandler
) {

View File

@ -20,7 +20,7 @@ import com.djrapitops.plan.exceptions.database.DBOpException;
import com.djrapitops.plan.extension.implementation.storage.transactions.results.RemoveUnsatisfiedConditionalPlayerResultsTransaction;
import com.djrapitops.plan.extension.implementation.storage.transactions.results.RemoveUnsatisfiedConditionalServerResultsTransaction;
import com.djrapitops.plan.identification.ServerInfo;
import com.djrapitops.plan.query.QueryServiceImplementation;
import com.djrapitops.plan.query.QuerySvc;
import com.djrapitops.plan.settings.config.PlanConfig;
import com.djrapitops.plan.settings.config.paths.TimeSettings;
import com.djrapitops.plan.settings.locale.Locale;
@ -61,7 +61,7 @@ public class DBCleanTask extends AbsRunnable {
private final Locale locale;
private final DBSystem dbSystem;
private final PlanConfig config;
private final QueryServiceImplementation queryService;
private final QuerySvc queryService;
private final ServerInfo serverInfo;
private final PluginLogger logger;
private final ErrorHandler errorHandler;
@ -75,7 +75,7 @@ public class DBCleanTask extends AbsRunnable {
PlanConfig config,
Locale locale,
DBSystem dbSystem,
QueryServiceImplementation queryService,
QuerySvc queryService,
ServerInfo serverInfo,
PluginLogger logger,
ErrorHandler errorHandler

View File

@ -33,7 +33,7 @@ import com.djrapitops.plan.delivery.domain.mutators.SessionsMutator;
import com.djrapitops.plan.extension.CallEvents;
import com.djrapitops.plan.extension.DataExtension;
import com.djrapitops.plan.extension.ExtensionService;
import com.djrapitops.plan.extension.ExtensionServiceImplementation;
import com.djrapitops.plan.extension.ExtensionSvc;
import com.djrapitops.plan.extension.annotation.*;
import com.djrapitops.plan.extension.icon.Color;
import com.djrapitops.plan.extension.icon.Icon;
@ -46,7 +46,7 @@ import com.djrapitops.plan.extension.implementation.storage.transactions.results
import com.djrapitops.plan.extension.table.Table;
import com.djrapitops.plan.gathering.domain.*;
import com.djrapitops.plan.identification.Server;
import com.djrapitops.plan.query.QueryServiceImplementation;
import com.djrapitops.plan.query.QuerySvc;
import com.djrapitops.plan.settings.config.Config;
import com.djrapitops.plan.settings.config.PlanConfig;
import com.djrapitops.plan.settings.locale.Locale;
@ -546,7 +546,7 @@ public interface DatabaseTest {
system().getConfigSystem().getConfig(),
new Locale(),
system().getDatabaseSystem(),
new QueryServiceImplementation(system().getDatabaseSystem(), system().getServerInfo(), logger, errorHandler),
new QuerySvc(system().getDatabaseSystem(), system().getServerInfo(), logger, errorHandler),
system().getServerInfo(),
logger,
errorHandler
@ -1225,7 +1225,7 @@ public interface DatabaseTest {
@Test
default void extensionPlayerValuesAreStored() {
ExtensionServiceImplementation extensionService = (ExtensionServiceImplementation) system().getExtensionService();
ExtensionSvc extensionService = (ExtensionSvc) system().getExtensionService();
extensionService.register(new PlayerExtension());
extensionService.updatePlayerValues(playerUUID, TestConstants.PLAYER_ONE_NAME, CallEvents.MANUAL);
@ -1275,7 +1275,7 @@ public interface DatabaseTest {
@Test
default void extensionServerValuesAreStored() {
ExtensionServiceImplementation extensionService = (ExtensionServiceImplementation) system().getExtensionService();
ExtensionSvc extensionService = (ExtensionSvc) system().getExtensionService();
extensionService.register(new ServerExtension());
extensionService.updateServerValues(CallEvents.SERVER_EXTENSION_REGISTER);
@ -1297,7 +1297,7 @@ public interface DatabaseTest {
@Test
default void extensionServerAggregateQueriesWork() {
ExtensionServiceImplementation extensionService = (ExtensionServiceImplementation) system().getExtensionService();
ExtensionSvc extensionService = (ExtensionSvc) system().getExtensionService();
extensionService.register(new PlayerExtension());
extensionService.updatePlayerValues(playerUUID, TestConstants.PLAYER_ONE_NAME, CallEvents.MANUAL);
@ -1327,7 +1327,7 @@ public interface DatabaseTest {
@Test
default void unsatisfiedPlayerConditionalResultsAreCleaned() {
ExtensionServiceImplementation extensionService = (ExtensionServiceImplementation) system().getExtensionService();
ExtensionSvc extensionService = (ExtensionSvc) system().getExtensionService();
extensionService.register(new ConditionalExtension());
@ -1381,7 +1381,7 @@ public interface DatabaseTest {
@Test
default void unsatisfiedServerConditionalResultsAreCleaned() {
ExtensionServiceImplementation extensionService = (ExtensionServiceImplementation) system().getExtensionService();
ExtensionSvc extensionService = (ExtensionSvc) system().getExtensionService();
ConditionalExtension.condition = true;
extensionService.register(new ConditionalExtension());
@ -1432,7 +1432,7 @@ public interface DatabaseTest {
@Test
default void extensionServerTableValuesAreInserted() {
ExtensionServiceImplementation extensionService = (ExtensionServiceImplementation) system().getExtensionService();
ExtensionSvc extensionService = (ExtensionSvc) system().getExtensionService();
extensionService.register(new TableExtension());
extensionService.updateServerValues(CallEvents.MANUAL);
@ -1463,7 +1463,7 @@ public interface DatabaseTest {
@Test
default void extensionPlayerTableValuesAreInserted() {
ExtensionServiceImplementation extensionService = (ExtensionServiceImplementation) system().getExtensionService();
ExtensionSvc extensionService = (ExtensionSvc) system().getExtensionService();
extensionService.register(new TableExtension());
extensionService.updatePlayerValues(playerUUID, TestConstants.PLAYER_ONE_NAME, CallEvents.MANUAL);

View File

@ -30,7 +30,7 @@ import com.djrapitops.plan.delivery.export.Exporter;
import com.djrapitops.plan.delivery.webserver.cache.DataID;
import com.djrapitops.plan.delivery.webserver.cache.JSONCache;
import com.djrapitops.plan.extension.CallEvents;
import com.djrapitops.plan.extension.ExtensionServiceImplementation;
import com.djrapitops.plan.extension.ExtensionSvc;
import com.djrapitops.plan.gathering.cache.NicknameCache;
import com.djrapitops.plan.gathering.cache.SessionCache;
import com.djrapitops.plan.gathering.domain.GMTimes;
@ -63,7 +63,7 @@ public class PlayerOnlineListener implements Listener {
private final Processing processing;
private final ServerInfo serverInfo;
private final DBSystem dbSystem;
private final ExtensionServiceImplementation extensionService;
private final ExtensionSvc extensionService;
private final Exporter exporter;
private final GeolocationCache geolocationCache;
private final NicknameCache nicknameCache;
@ -77,7 +77,7 @@ public class PlayerOnlineListener implements Listener {
Processing processing,
ServerInfo serverInfo,
DBSystem dbSystem,
ExtensionServiceImplementation extensionService,
ExtensionSvc extensionService,
Exporter exporter,
GeolocationCache geolocationCache,
NicknameCache nicknameCache,

View File

@ -20,7 +20,7 @@ import com.djrapitops.plan.PlanPlugin;
import com.djrapitops.plan.PlanSponge;
import com.djrapitops.plan.SpongeServerShutdownSave;
import com.djrapitops.plan.api.events.PlanSpongeEnableEvent;
import com.djrapitops.plan.capability.CapabilityServiceImplementation;
import com.djrapitops.plan.capability.CapabilitySvc;
import com.djrapitops.plan.gathering.listeners.sponge.*;
import org.spongepowered.api.Sponge;
import org.spongepowered.api.event.Event;
@ -91,6 +91,6 @@ public class SpongeListenerSystem extends ListenerSystem {
} catch (IllegalStateException ignore) {
/* Ignore, Sponge is not initialized */
}
CapabilityServiceImplementation.notifyAboutEnable(plugin.isSystemEnabled());
CapabilitySvc.notifyAboutEnable(plugin.isSystemEnabled());
}
}

View File

@ -22,7 +22,7 @@ import com.djrapitops.plan.delivery.export.Exporter;
import com.djrapitops.plan.delivery.webserver.cache.DataID;
import com.djrapitops.plan.delivery.webserver.cache.JSONCache;
import com.djrapitops.plan.extension.CallEvents;
import com.djrapitops.plan.extension.ExtensionServiceImplementation;
import com.djrapitops.plan.extension.ExtensionSvc;
import com.djrapitops.plan.gathering.cache.NicknameCache;
import com.djrapitops.plan.gathering.cache.SessionCache;
import com.djrapitops.plan.gathering.domain.Session;
@ -66,7 +66,7 @@ public class PlayerOnlineListener {
private final Processing processing;
private final ServerInfo serverInfo;
private final DBSystem dbSystem;
private final ExtensionServiceImplementation extensionService;
private final ExtensionSvc extensionService;
private final Exporter exporter;
private final GeolocationCache geolocationCache;
private final NicknameCache nicknameCache;
@ -80,7 +80,7 @@ public class PlayerOnlineListener {
Processing processing,
ServerInfo serverInfo,
DBSystem dbSystem,
ExtensionServiceImplementation extensionService,
ExtensionSvc extensionService,
Exporter exporter, GeolocationCache geolocationCache,
NicknameCache nicknameCache,
SessionCache sessionCache,

View File

@ -19,7 +19,7 @@ package com.djrapitops.plan.gathering.listeners;
import com.djrapitops.plan.PlanPlugin;
import com.djrapitops.plan.PlanVelocity;
import com.djrapitops.plan.api.events.PlanVelocityEnableEvent;
import com.djrapitops.plan.capability.CapabilityServiceImplementation;
import com.djrapitops.plan.capability.CapabilitySvc;
import com.djrapitops.plan.gathering.listeners.velocity.PlayerOnlineListener;
import javax.inject.Inject;
@ -56,6 +56,6 @@ public class VelocityListenerSystem extends ListenerSystem {
boolean isEnabled = plugin.isSystemEnabled();
PlanVelocityEnableEvent event = new PlanVelocityEnableEvent(isEnabled);
((PlanVelocity) plugin).getProxy().getEventManager().fireAndForget(event);
CapabilityServiceImplementation.notifyAboutEnable(isEnabled);
CapabilitySvc.notifyAboutEnable(isEnabled);
}
}

View File

@ -21,7 +21,7 @@ import com.djrapitops.plan.delivery.export.Exporter;
import com.djrapitops.plan.delivery.webserver.cache.DataID;
import com.djrapitops.plan.delivery.webserver.cache.JSONCache;
import com.djrapitops.plan.extension.CallEvents;
import com.djrapitops.plan.extension.ExtensionServiceImplementation;
import com.djrapitops.plan.extension.ExtensionSvc;
import com.djrapitops.plan.gathering.cache.SessionCache;
import com.djrapitops.plan.gathering.domain.Session;
import com.djrapitops.plan.gathering.geolocation.GeolocationCache;
@ -61,7 +61,7 @@ public class PlayerOnlineListener {
private final PlanConfig config;
private final Processing processing;
private final DBSystem dbSystem;
private final ExtensionServiceImplementation extensionService;
private final ExtensionSvc extensionService;
private final Exporter exporter;
private final GeolocationCache geolocationCache;
private final SessionCache sessionCache;
@ -73,7 +73,7 @@ public class PlayerOnlineListener {
PlanConfig config,
Processing processing,
DBSystem dbSystem,
ExtensionServiceImplementation extensionService,
ExtensionSvc extensionService,
Exporter exporter, GeolocationCache geolocationCache,
SessionCache sessionCache,
ServerInfo serverInfo,