Search in sources :

Example 1 with TypedAbstractConfigAdapter

use of uk.co.drnaylor.quickstart.config.TypedAbstractConfigAdapter in project Nucleus by NucleusPowered.

the class RandomTeleportCommand method onReload.

@Override
public void onReload() {
    this.rc = this.plugin.getConfigAdapter(RTPModule.ID, RTPConfigAdapter.class).map(TypedAbstractConfigAdapter::getNodeOrDefault).orElseGet(RTPConfig::new);
    CoreConfig cc = this.plugin.getInternalServiceManager().getService(CoreConfigAdapter.class).map(TypedAbstractConfigAdapter::getNodeOrDefault).orElseGet(CoreConfig::new);
    this.height = cc.getSafeTeleportConfig().getHeight();
}
Also used : CoreConfig(io.github.nucleuspowered.nucleus.modules.core.config.CoreConfig) TypedAbstractConfigAdapter(uk.co.drnaylor.quickstart.config.TypedAbstractConfigAdapter) RTPConfigAdapter(io.github.nucleuspowered.nucleus.modules.rtp.config.RTPConfigAdapter)

Aggregations

CoreConfig (io.github.nucleuspowered.nucleus.modules.core.config.CoreConfig)1 RTPConfigAdapter (io.github.nucleuspowered.nucleus.modules.rtp.config.RTPConfigAdapter)1 TypedAbstractConfigAdapter (uk.co.drnaylor.quickstart.config.TypedAbstractConfigAdapter)1