Format Code, Fixed 2 NPE's

This commit is contained in:
Driftay
2019-12-19 14:23:41 -05:00
parent fec07b6fac
commit 368a605d31
23 changed files with 54 additions and 57 deletions

View File

@@ -449,7 +449,7 @@ public final class ReflectionUtils {
DOUBLE(double.class, Double.class),
BOOLEAN(boolean.class, Boolean.class);
private static final Map<Class<?>, DataType> CLASS_MAP = new HashMap<Class<?>, DataType>();
private static final Map<Class<?>, DataType> CLASS_MAP = new HashMap<>();
// Initialize map for quick class lookup
static {

View File

@@ -17,7 +17,7 @@ public class InventoryItem {
private Runnable runnable;
public InventoryItem(ItemStack original) {
this.clickMap = new HashMap();
this.clickMap = new HashMap<>();
this.item = original;
}

View File

@@ -18,8 +18,8 @@ import java.util.function.Consumer;
public abstract class SaberGUI {
public static Set<String> allGUINames = new HashSet();
public static Map<UUID, SaberGUI> activeGUIs = new ConcurrentHashMap();
public static Set<String> allGUINames = new HashSet<>();
public static Map<UUID, SaberGUI> activeGUIs = new ConcurrentHashMap<>();
public SaberGUI parentGUI;
protected String title;
protected int size;
@@ -34,7 +34,7 @@ public abstract class SaberGUI {
}
public SaberGUI(Player player, String title, int size, InventoryType type) {
this.inventoryItems = new HashMap();
this.inventoryItems = new HashMap<>();
this.inventory = type == InventoryType.CHEST ? Bukkit.createInventory(null, size, title) : Bukkit.createInventory(null, type, title);
this.player = player;
this.size = size;