Calculate strikes

Signed-off-by: Etzelia <etzelia@hotmail.com>
grief
Etzelia 2020-07-27 21:07:38 -05:00
parent 9131e2f345
commit 5d2e147a89
No known key found for this signature in database
GPG Key ID: 708511AE7ABC5314
1 changed files with 8 additions and 1 deletions

View File

@ -74,7 +74,14 @@ public class BlockBreakListener implements Listener {
int ping = config.getInt(String.format("blocks.%s.ping", blockKey), config.getInt("ping", 5));
purge(map.getOrDefault(event.getPlayer(), new ArrayList<>()).iterator());
int strikes = map.getOrDefault(event.getPlayer(), new ArrayList<>()).size();
int strikes = 0;
for (BlockEvent e : map.getOrDefault(event.getPlayer(), new ArrayList<>())) {
if (e.isParent()) {
strikes++;
}
}
// TODO Notify
}
private void cleanup() {