mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-29 04:04:43 +02:00
Manually resolve a bunch of merge issues
This commit is contained in:
@ -27,26 +27,27 @@ package com.plotsquared.bukkit.inject;
|
||||
|
||||
import com.google.inject.AbstractModule;
|
||||
import com.google.inject.assistedinject.FactoryModuleBuilder;
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.core.backup.BackupManager;
|
||||
import com.plotsquared.core.backup.BackupProfile;
|
||||
import com.plotsquared.core.backup.NullBackupManager;
|
||||
import com.plotsquared.core.backup.PlayerBackupProfile;
|
||||
import com.plotsquared.core.backup.SimpleBackupManager;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.inject.factory.PlayerBackupProfileFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class BackupModule extends AbstractModule {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger("P2/" + BackupModule.class.getSimpleName());
|
||||
|
||||
@Override protected void configure() {
|
||||
try {
|
||||
install(new FactoryModuleBuilder()
|
||||
.implement(BackupProfile.class, PlayerBackupProfile.class).build(PlayerBackupProfileFactory.class));
|
||||
bind(BackupManager.class).to(SimpleBackupManager.class);
|
||||
} catch (final Exception e) {
|
||||
PlotSquared.log(Captions.PREFIX + "&6Failed to initialize backup manager");
|
||||
e.printStackTrace();
|
||||
PlotSquared.log(Captions.PREFIX + "&6Backup features will be disabled");
|
||||
logger.error("[P2] Failed to initialize backup manager", e);
|
||||
logger.error("[P2] Backup features will be disabled");
|
||||
bind(BackupManager.class).to(NullBackupManager.class);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user