SnapshotRepository no longer extends MinecraftRepository

It doesn't need to.
This commit is contained in:
Keir Nellyer 2016-07-08 23:26:33 -04:00
parent d9288277d5
commit 5c83f09456
4 changed files with 5 additions and 21 deletions

View File

@ -9,15 +9,12 @@ import java.time.ZoneId;
import java.util.Collection;
import java.util.concurrent.CompletableFuture;
import org.bukkit.plugin.java.JavaPlugin;
import mineplex.core.database.MinecraftRepository;
import mineplex.serverdata.database.DBPool;
/**
* Class responsible for publishing snapshots on the website via Redis and a separate Report server.
*/
public class SnapshotRepository extends MinecraftRepository
public class SnapshotRepository
{
private static final ZoneId ZONE_ID = ZoneId.of("America/Chicago"); // This means "CST"
@ -34,24 +31,11 @@ public class SnapshotRepository extends MinecraftRepository
private final String _serverName;
public SnapshotRepository(JavaPlugin plugin, String serverName)
public SnapshotRepository(String serverName)
{
super(plugin, DBPool.getAccount());
_serverName = serverName;
}
@Override
protected void initialize()
{
}
@Override
protected void update()
{
}
public CompletableFuture<Void> insertSnapshots(long reportId, Collection<Snapshot> snapshots)
{
return CompletableFuture.supplyAsync(() ->

View File

@ -145,7 +145,7 @@ public class Clans extends JavaPlugin
Pair.create(MinecraftVersion.Version1_9, "http://file.mineplex.com/ResClans19.zip")
}, true);
SnapshotManager snapshotManager = new SnapshotManager(new SnapshotRepository(this, serverStatusManager.getCurrentServerName()));
SnapshotManager snapshotManager = new SnapshotManager(new SnapshotRepository(serverStatusManager.getCurrentServerName()));
new SnapshotPlugin(this, snapshotManager, _clientManager);
new ReportPlugin(this, new ReportManager(this, snapshotManager, _clientManager, serverStatusManager.getCurrentServerName(), 1));

View File

@ -172,7 +172,7 @@ public class Hub extends JavaPlugin implements IRelation
new GlobalPacketManager(this, clientManager, serverStatusManager, inventoryManager, donationManager, petManager, statsManager, hubManager.getBonusManager().getRewardManager());
//new Replay(this, packetHandler);
SnapshotManager snapshotManager = new SnapshotManager(new SnapshotRepository(this, serverStatusManager.getCurrentServerName()));
SnapshotManager snapshotManager = new SnapshotManager(new SnapshotRepository(serverStatusManager.getCurrentServerName()));
ReportManager reportManager = new ReportManager(this, snapshotManager, clientManager, serverStatusManager.getCurrentServerName(), 3);
new SnapshotPlugin(this, snapshotManager, clientManager);
new ReportPlugin(this, reportManager);

View File

@ -150,7 +150,7 @@ public class Arcade extends JavaPlugin
Chat chat = new Chat(this, incognito, _clientManager, preferenceManager, achievementManager, serverStatusManager.getCurrentServerName());
new MessageManager(this, incognito, _clientManager, preferenceManager, ignoreManager, punish, friendManager, chat);
SnapshotManager snapshotManager = new SnapshotManager(new SnapshotRepository(this, serverStatusManager.getCurrentServerName()));
SnapshotManager snapshotManager = new SnapshotManager(new SnapshotRepository(serverStatusManager.getCurrentServerName()));
ReportManager reportManager = new ReportManager(this, snapshotManager, _clientManager, serverStatusManager.getCurrentServerName(), 1);
new SnapshotPlugin(this, snapshotManager, _clientManager);
new ReportPlugin(this, reportManager);