mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-29 14:05:25 +01:00
Update ItemManager.java
This commit is contained in:
parent
6dda14f41f
commit
bf69c65db9
@ -22,10 +22,10 @@ import com.gamingmesh.jobs.stuff.VersionChecker.Version;
|
||||
|
||||
public class ItemManager {
|
||||
|
||||
static HashMap<Integer, CMIItemStack> byId = new HashMap<Integer, CMIItemStack>();
|
||||
static HashMap<String, CMIItemStack> byBukkitName = new HashMap<String, CMIItemStack>();
|
||||
static HashMap<String, CMIItemStack> byMojangName = new HashMap<String, CMIItemStack>();
|
||||
static HashMap<CMIMaterial, CMIItemStack> byMaterial = new HashMap<CMIMaterial, CMIItemStack>();
|
||||
static HashMap<Integer, CMIItemStack> byId = new HashMap<>();
|
||||
static HashMap<String, CMIItemStack> byBukkitName = new HashMap<>();
|
||||
static HashMap<String, CMIItemStack> byMojangName = new HashMap<>();
|
||||
static HashMap<CMIMaterial, CMIItemStack> byMaterial = new HashMap<>();
|
||||
static Version version;
|
||||
|
||||
public static void load() {
|
||||
@ -119,7 +119,7 @@ public class ItemManager {
|
||||
return cm;
|
||||
}
|
||||
|
||||
static HashMap<String, ItemStack> headCache = new HashMap<String, ItemStack>();
|
||||
static HashMap<String, ItemStack> headCache = new HashMap<>();
|
||||
|
||||
public static CMIItemStack getItem(String name) {
|
||||
if (byBukkitName.isEmpty())
|
||||
@ -276,7 +276,7 @@ public class ItemManager {
|
||||
}
|
||||
|
||||
static public List<Recipe> getAllRecipes() {
|
||||
List<Recipe> results = new ArrayList<Recipe>();
|
||||
List<Recipe> results = new ArrayList<>();
|
||||
Iterator<Recipe> iter = Bukkit.recipeIterator();
|
||||
while (iter.hasNext()) {
|
||||
Recipe recipe = iter.next();
|
||||
@ -287,7 +287,7 @@ public class ItemManager {
|
||||
|
||||
static public List<Recipe> getRecipesFor(ItemStack result) {
|
||||
|
||||
List<Recipe> results = new ArrayList<Recipe>();
|
||||
List<Recipe> results = new ArrayList<>();
|
||||
Iterator<Recipe> iter = Bukkit.recipeIterator();
|
||||
while (iter.hasNext()) {
|
||||
Recipe recipe = iter.next();
|
||||
@ -1579,7 +1579,7 @@ public class ItemManager {
|
||||
|
||||
public static CMIMaterial getRandom(CMIMaterial mat) {
|
||||
|
||||
List<CMIMaterial> ls = new ArrayList<CMIMaterial>();
|
||||
List<CMIMaterial> ls = new ArrayList<>();
|
||||
|
||||
for (CMIMaterial one : CMIMaterial.values()) {
|
||||
if (one.getLegacyId() == -1)
|
||||
|
Loading…
Reference in New Issue
Block a user