mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-06 15:56:14 +00:00
cleanup
This commit is contained in:
@@ -77,7 +77,7 @@ public abstract class AbstractPlatform implements Platform {
|
||||
private static final Logger logger = LoggerFactory.getLogger(AbstractPlatform.class);
|
||||
|
||||
private static final MutableBoolean LOADED = new MutableBoolean(false);
|
||||
private final EventManager eventManager = new EventManagerImpl(this);
|
||||
private final EventManager eventManager = new EventManagerImpl();
|
||||
private final ConfigRegistry configRegistry = new ConfigRegistry();
|
||||
|
||||
private final CheckedRegistry<ConfigPack> checkedConfigRegistry = new CheckedRegistryImpl<>(configRegistry);
|
||||
@@ -174,12 +174,7 @@ public abstract class AbstractPlatform implements Platform {
|
||||
|
||||
addonList.add(internalAddon);
|
||||
|
||||
getPlatformAddon().ifPresent(addonList::add);
|
||||
|
||||
platformAddon().ifPresent(baseAddon -> {
|
||||
baseAddon.initialize();
|
||||
addonList.add(baseAddon);
|
||||
});
|
||||
platformAddon().ifPresent(addonList::add);
|
||||
|
||||
BootstrapAddonLoader bootstrapAddonLoader = new BootstrapAddonLoader(this);
|
||||
|
||||
@@ -226,10 +221,6 @@ public abstract class AbstractPlatform implements Platform {
|
||||
logger.info("Finished initialization.");
|
||||
}
|
||||
|
||||
protected Optional<BaseAddon> getPlatformAddon() {
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void register(TypeRegistry registry) {
|
||||
loaders.register(registry);
|
||||
|
||||
@@ -29,10 +29,8 @@ import com.dfsek.terra.api.event.functional.FunctionalEventHandler;
|
||||
|
||||
public class EventManagerImpl implements EventManager {
|
||||
private final Map<Class<?>, EventHandler> handlers = new HashMap<>();
|
||||
private final Platform platform;
|
||||
|
||||
public EventManagerImpl(Platform platform) {
|
||||
this.platform = platform;
|
||||
public EventManagerImpl() {
|
||||
registerHandler(FunctionalEventHandler.class, new FunctionalEventHandlerImpl()); // default handler
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.dfsek.terra.api.Platform;
|
||||
import com.dfsek.terra.api.addon.BaseAddon;
|
||||
import com.dfsek.terra.api.event.events.Event;
|
||||
import com.dfsek.terra.api.event.events.FailThroughEvent;
|
||||
|
||||
Reference in New Issue
Block a user