@@ -0,0 +1,1579 @@
+package vg.civcraft.mc.civmodcore.util;%0A%0Aimport java.util.HashMap;%0Aimport java.util.LinkedList;%0Aimport java.util.List;%0Aimport java.util.Map;%0Aimport java.util.TreeMap;%0Aimport java.util.UUID;%0A%0Aimport org.bukkit.Bukkit;%0Aimport org.bukkit.Location;%0Aimport org.bukkit.block.Block;%0Aimport org.bukkit.entity.Player;%0Aimport org.bukkit.plugin.Plugin;%0A%0Apublic class DoubleInteractFixer %7B%0A%0A%09private Map%3CUUID, List%3CLocation%3E%3E locations;%0A%0A%09public DoubleInteractFixer(Plugin plugin) %7B%0A%09%09locations = new TreeMap%3C%3E();%0A%09%09Bukkit.getScheduler().runTaskTimer(plugin, () -%3E locations.clear(), 1L, 1L);%0A%09%7D%0A%0A%09/**%0A%09 * Checks if the given player has already interacted with the given block this%0A%09 * tick and counts such an interact for this tick if one doesnt already exist.%0A%09 * This method will only return true once for the same player and block during%0A%09 * the same tick and then never again. All tracking is reset every finished tick%0A%09 * %0A%09 * @param player Player who interacted with the block%0A%09 * @param block  Block the player interacted with%0A%09 * @return True if the player already interacted, false if not%0A%09 */%0A%09public boolean checkInteracted(Player player, Block block) %7B%0A%09%09if (player == null) %7B%0A%09%09%09throw new IllegalArgumentException(%22Player can not be null%22);%0A%09%09%7D%0A%09%09if (block == null) %7B%0A%09%09%09throw new IllegalArgumentException(%22Block can not be null%22);%0A%09%09%7D%0A%09%09List%3CLocation%3E existingOnes = locations.computeIfAbsent(player.getUniqueId(), u -%3E new LinkedList%3C%3E());%0A%09%09if (existingOnes.contains(block.getLocation())) %7B%0A%09%09%09return true;%0A%09%09%7D%0A%09%09existingOnes.add(block.getLocation());%0A%09%09return false;%0A%09%7D%0A%0A%7D%0A

Add DoubleInteractFixer