// Path: src/main/java/tc/oc/tracker/base/AbstractTracker.java
// public abstract class AbstractTracker implements Tracker {
//     /**
//      * Method called when the tracker is enabled for a world.
//      *
//      * @param world World the tracker is now enabled in
//      */
//     protected void onEnable(World world) { }
// 
//     /**
//      * Method called when the tracker is disabled for a world.
//      *
//      * Will be called before the {@link #clear} method.
//      *
//      * @param world World the tracker is now disabled in
//      */
//     protected void onDisable(World world) { }
// 
//     // implementation
//     private boolean enabled = false;
//     private final Set<World> oppositeWorlds = Sets.newHashSet();
// 
//     public boolean isEnabled(@Nonnull World world) {
//         Preconditions.checkNotNull(world, "world");
// 
//         boolean opposite = this.oppositeWorlds.contains(world);
// 
//         return this.enabled ^ opposite;
//     }
// 
//     public boolean enable() {
//         return this.setEnabled(true);
//     }
// 
//     public boolean enable(@Nonnull World world) {
//         return this.setEnabled(true, world);
//     }
// 
//     public boolean disable() {
//         return this.setEnabled(false);
//     }
// 
//     public boolean disable(@Nonnull World world) {
//         return this.setEnabled(false, world);
//     }
// 
//     private boolean setEnabled(boolean now) {
//         Set<World> changed = this.getOppositeWorlds(now);
// 
//         this.enabled = now;
//         this.oppositeWorlds.clear();
// 
//         for(World world : changed) {
//             this.notifyChange(now, world);
//         }
// 
//         return !changed.isEmpty();
//     }
// 
//     private boolean setEnabled(boolean now, @Nonnull World world) {
//         Preconditions.checkNotNull(world, "world");
// 
//         boolean changed = false;
// 
//         if(this.enabled == now) {
//             changed = this.oppositeWorlds.remove(world);
//         } else {
//             changed = this.oppositeWorlds.add(world);
//         }
// 
//         if(changed) {
//             this.notifyChange(now, world);
//         }
// 
//         return changed;
//     }
// 
//     private Set<World> getOppositeWorlds(boolean now) {
//         if(this.enabled == now) {
//             return ImmutableSet.copyOf(this.oppositeWorlds);
//         } else {
//             Set<World> opp = Sets.newHashSet(Bukkit.getWorlds());
//             opp.removeAll(this.oppositeWorlds);
//             return ImmutableSet.copyOf(opp);
//         }
//     }
// 
//     private void notifyChange(boolean now, @Nonnull World world) {
//         if(now) {
//             this.onDisable(world);
//             this.clear(world);
//         } else {
//             this.onEnable(world);
//         }
//     }
// }
// 
// Path: src/main/java/tc/oc/tracker/trackers/ExplosiveTracker.java
// public interface ExplosiveTracker extends Tracker {
//     boolean hasOwner(@Nonnull TNTPrimed entity);
// 
//     @Nullable Player getOwner(@Nonnull TNTPrimed entity);
// 
//     @Nullable Player setOwner(@Nonnull TNTPrimed entity, @Nullable Player player);
// 
//     boolean hasPlacer(@Nonnull Block block);
// 
//     @Nullable Player getPlacer(@Nonnull Block block);
// 
//     @Nullable Player setPlacer(@Nonnull Block block, @Nullable Player player);
// }


import java.util.Iterator;
import java.util.Map;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.entity.TNTPrimed;
import tc.oc.tracker.base.AbstractTracker;
import tc.oc.tracker.trackers.ExplosiveTracker;
import com.google.common.base.Preconditions;
import com.google.common.collect.Maps;
package tc.oc.tracker.trackers.base;






public class SimpleExplosiveTracker extends AbstractTracker implements ExplosiveTracker {
    private final Map<Block, Player> placedBlocks = Maps.newHashMap();
    private final Map<TNTPrimed, Player> ownedTNTs = Maps.newHashMap();

    public boolean hasOwner(@Nonnull TNTPrimed entity) {
        Preconditions.checkNotNull(entity, "tnt entity");

        return this.ownedTNTs.containsKey(entity);
    }

    public @Nullable Player getOwner(@Nonnull TNTPrimed entity) {
        Preconditions.checkNotNull(entity, "tnt entity");

        return this.ownedTNTs.get(entity);
    }

    public @Nullable Player setOwner(@Nonnull TNTPrimed entity, @Nullable Player player) {
// Path: src/main/java/tc/oc/tracker/base/AbstractTracker.java
// public abstract class AbstractTracker implements Tracker {
//     /**
//      * Method called when the tracker is enabled for a world.
//      *
//      * @param world World the tracker is now enabled in
//      */
//     protected void onEnable(World world) { }
// 
//     /**
//      * Method called when the tracker is disabled for a world.
//      *
//      * Will be called before the {@link #clear} method.
//      *
//      * @param world World the tracker is now disabled in
//      */
//     protected void onDisable(World world) { }
// 
//     // implementation
//     private boolean enabled = false;
//     private final Set<World> oppositeWorlds = Sets.newHashSet();
// 
//     public boolean isEnabled(@Nonnull World world) {
//         Preconditions.checkNotNull(world, "world");
// 
//         boolean opposite = this.oppositeWorlds.contains(world);
// 
//         return this.enabled ^ opposite;
//     }
// 
//     public boolean enable() {
//         return this.setEnabled(true);
//     }
// 
//     public boolean enable(@Nonnull World world) {
//         return this.setEnabled(true, world);
//     }
// 
//     public boolean disable() {
//         return this.setEnabled(false);
//     }
// 
//     public boolean disable(@Nonnull World world) {
//         return this.setEnabled(false, world);
//     }
// 
//     private boolean setEnabled(boolean now) {
//         Set<World> changed = this.getOppositeWorlds(now);
// 
//         this.enabled = now;
//         this.oppositeWorlds.clear();
// 
//         for(World world : changed) {
//             this.notifyChange(now, world);
//         }
// 
//         return !changed.isEmpty();
//     }
// 
//     private boolean setEnabled(boolean now, @Nonnull World world) {
//         Preconditions.checkNotNull(world, "world");
// 
//         boolean changed = false;
// 
//         if(this.enabled == now) {
//             changed = this.oppositeWorlds.remove(world);
//         } else {
//             changed = this.oppositeWorlds.add(world);
//         }
// 
//         if(changed) {
//             this.notifyChange(now, world);
//         }
// 
//         return changed;
//     }
// 
//     private Set<World> getOppositeWorlds(boolean now) {
//         if(this.enabled == now) {
//             return ImmutableSet.copyOf(this.oppositeWorlds);
//         } else {
//             Set<World> opp = Sets.newHashSet(Bukkit.getWorlds());
//             opp.removeAll(this.oppositeWorlds);
//             return ImmutableSet.copyOf(opp);
//         }
//     }
// 
//     private void notifyChange(boolean now, @Nonnull World world) {
//         if(now) {
//             this.onDisable(world);
//             this.clear(world);
//         } else {
//             this.onEnable(world);
//         }
//     }
// }
// 
// Path: src/main/java/tc/oc/tracker/trackers/ExplosiveTracker.java
// public interface ExplosiveTracker extends Tracker {
//     boolean hasOwner(@Nonnull TNTPrimed entity);
// 
//     @Nullable Player getOwner(@Nonnull TNTPrimed entity);
// 
//     @Nullable Player setOwner(@Nonnull TNTPrimed entity, @Nullable Player player);
// 
//     boolean hasPlacer(@Nonnull Block block);
// 
//     @Nullable Player getPlacer(@Nonnull Block block);
// 
//     @Nullable Player setPlacer(@Nonnull Block block, @Nullable Player player);
// }


// Path: src/main/java/tc/oc/tracker/trackers/base/SimpleExplosiveTracker.java
import java.util.Iterator;
import java.util.Map;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.entity.TNTPrimed;
import tc.oc.tracker.base.AbstractTracker;
import tc.oc.tracker.trackers.ExplosiveTracker;
import com.google.common.base.Preconditions;
import com.google.common.collect.Maps;

package tc.oc.tracker.trackers.base;






public class SimpleExplosiveTracker extends AbstractTracker implements ExplosiveTracker {
    private final Map<Block, Player> placedBlocks = Maps.newHashMap();
    private final Map<TNTPrimed, Player> ownedTNTs = Maps.newHashMap();

    public boolean hasOwner(@Nonnull TNTPrimed entity) {
        Preconditions.checkNotNull(entity, "tnt entity");

        return this.ownedTNTs.containsKey(entity);
    }

    public @Nullable Player getOwner(@Nonnull TNTPrimed entity) {
        Preconditions.checkNotNull(entity, "tnt entity");

        return this.ownedTNTs.get(entity);
    }

    public @Nullable Player setOwner(@Nonnull TNTPrimed entity, @Nullable Player player) {
        Preconditions.checkNotNull(entity, "tnt entity");