mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2025-01-10 17:58:05 +01:00
Change ConcurrentHashMaps to just Maps for Java 7 support
This commit is contained in:
parent
bf01c9ea0e
commit
9186361a29
@ -6,14 +6,12 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
import us.myles.ViaVersion.api.minecraft.item.Item;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
public class HandItemCache extends BukkitRunnable {
|
||||
public static boolean CACHE = false;
|
||||
private static ConcurrentHashMap<UUID, Item> handCache = new ConcurrentHashMap<>();
|
||||
private static Map<UUID, Item> handCache = new ConcurrentHashMap<>();
|
||||
|
||||
public static Item getHandItem(UUID player) {
|
||||
if (!handCache.containsKey(player))
|
||||
|
@ -12,12 +12,13 @@ import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
public class HandItemCache implements Runnable {
|
||||
public static boolean CACHE = false;
|
||||
private static ConcurrentHashMap<UUID, Item> handCache = new ConcurrentHashMap<>();
|
||||
private static Map<UUID, Item> handCache = new ConcurrentHashMap<>();
|
||||
private static Field GET_DAMAGE;
|
||||
private static Method GET_ID;
|
||||
private static ItemGrabber grabber;
|
||||
|
Loading…
Reference in New Issue
Block a user