RedstoneWincondition #274
@ -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;
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren