From 2b3ae10c2b63553557ff3a80b5b8fbb6473e55aa Mon Sep 17 00:00:00 2001 From: Christopher Martin Date: Sun, 9 Oct 2016 12:01:38 -0700 Subject: [PATCH] Generi-size PhaseChangeFreeze (#594) * Generi-size PhaseChangeFreeze Make the ConcurrentHashMap in PhaseChangeFreeze Generic to allow for Java 7 / Java 8 compatibility. * Add missing import to PhaseChangeFreeze * Update PhaseChangeFreeze accessor --- .../projectkorra/waterbending/PhaseChangeFreeze.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/com/projectkorra/projectkorra/waterbending/PhaseChangeFreeze.java b/src/com/projectkorra/projectkorra/waterbending/PhaseChangeFreeze.java index 24e03026..b23606ab 100644 --- a/src/com/projectkorra/projectkorra/waterbending/PhaseChangeFreeze.java +++ b/src/com/projectkorra/projectkorra/waterbending/PhaseChangeFreeze.java @@ -13,11 +13,12 @@ import org.bukkit.block.Block; import org.bukkit.entity.Player; import org.bukkit.scheduler.BukkitRunnable; +import java.util.Map; import java.util.concurrent.ConcurrentHashMap; public class PhaseChangeFreeze extends IceAbility { - private static final ConcurrentHashMap FROZEN_BLOCKS = new ConcurrentHashMap<>(); + private static final Map FROZEN_BLOCKS = new ConcurrentHashMap<>(); private static final double REMOVE_RANGE = 50; // TODO: Make the remove range non static private static boolean overloading = false; @@ -241,7 +242,7 @@ public class PhaseChangeFreeze extends IceAbility { this.radius = radius; } - public static ConcurrentHashMap getFrozenBlocks() { + public static Map getFrozenBlocks() { return FROZEN_BLOCKS; }