SteamWar/FightSystem
Archiviert
13
1

RedstoneWincondition #274

Geschlossen
YoyoNow möchte 18 Commits von RedstoneWincondition nach master mergen
Nur Änderungen aus Commit 2e7228835b werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -31,7 +31,8 @@ public class WinconditionRelativeRedstonePercent extends PercentWincondition imp
public void enable() {
super.enable();
teamMap.forEach((team, percent) -> {
percent.currentBlocks = 0;
percent.totalBlocks = 0;
percent.currentBlocks = 1;
});
}
};
@ -56,14 +57,23 @@ public class WinconditionRelativeRedstonePercent extends PercentWincondition imp
return Config.Blocks.contains(block.getType());
}
public class TeamPercent extends PercentWincondition.TeamPercent {
public class TeamPercent extends StateDependentTeamPercent {
public TeamPercent(FightTeam team) {
super(team);
super(team, Winconditions.RELATIVE_REDSTONE_PERCENT);
}
@Override
public void enable() {
totalBlocks = currentBlocks();
currentBlocks = totalBlocks;
}
@Override
public void disable() {
}
private void check(EntityExplodeEvent event) {
if (!team.getExtendRegion().inRegion(event.getEntity().getLocation())) {
return;