Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Stacker Support #812

Closed
wants to merge 12 commits into from
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ public synchronized TeamBank getTeamBank(Island island, String bankItem) {
}

@Override
public synchronized TeamSpawners getTeamSpawners(Island island, EntityType entityType) {
public synchronized Teams getTeamSpawners(Island island, EntityType entityType) {
Optional<TeamSpawners> teamSpawner = IridiumSkyblock.getInstance().getDatabaseManager().getTeamSpawnerTableManager().getEntry(new TeamSpawners(island, entityType, 0));
if (teamSpawner.isPresent()) {
return teamSpawner.get();
Expand Down Expand Up @@ -495,7 +495,7 @@ public CompletableFuture<Void> recalculateTeam(Island island) {
List<TeamSpawners> spawners = IridiumSkyblock.getInstance().getDatabaseManager().getTeamSpawnerTableManager().getEntries(island);
for (TeamBlock teamBlock : blocks) {
int stackedBlocks = IridiumSkyblock.getInstance().getSupportManager().getStackerSupport().stream().mapToInt(
spawnerSupport -> spawnerSupport.getExtraBlocks(island, teamBlock.getXMaterial())
stackerSupport -> stackerSupport.getExtraBlocks(island, teamBlock.getXMaterial())
).sum();
teamBlock.setAmount(teamBlocks.getOrDefault(teamBlock.getXMaterial(), 0) + stackedBlocks);
}
Expand Down
Loading