Skip to content

Commit

Permalink
Merge pull request #30 from Baktus79/dev
Browse files Browse the repository at this point in the history
Fix a ConcurrentModificationException bug
  • Loading branch information
Baktus79 authored Oct 31, 2022
2 parents a3635b3 + 6c764e5 commit 74e371b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>no.vestlandetmc.bfc</groupId>
<artifactId>BanFromClaim</artifactId>
<version>1.6.4</version>
<version>1.6.5</version>
<packaging>jar</packaging>

<name>BanFromClaim</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ public class CombatScheduler extends BukkitRunnable {
@Override
public void run() {
if(CombatMode.isEmpty()) { return; }

for(final Entry<UUID, Long> combat : CombatMode.getAllTime().entrySet()) {
final UUID uuid = combat.getKey();
final UUID attackerUUID = CombatMode.getAttacker(uuid);
if(attackerUUID == null) { continue; }

if(CombatMode.getAttacker(combat.getKey()) == null) { continue; }

final OfflinePlayer victim = Bukkit.getOfflinePlayer(combat.getKey());
final OfflinePlayer attacker = Bukkit.getOfflinePlayer(CombatMode.getAttacker(combat.getKey()));
final OfflinePlayer victim = Bukkit.getOfflinePlayer(uuid);
final OfflinePlayer attacker = Bukkit.getOfflinePlayer(attackerUUID);
final long time = combat.getValue();
final long newTime = System.currentTimeMillis() / 1000;
final long combatTime = newTime - time;
Expand Down

0 comments on commit 74e371b

Please sign in to comment.