mirror of
https://github.com/Zrips/Jobs.git
synced 2024-12-01 15:03:36 +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 {
|
public class ItemManager {
|
||||||
|
|
||||||
static HashMap<Integer, CMIItemStack> byId = new HashMap<Integer, CMIItemStack>();
|
static HashMap<Integer, CMIItemStack> byId = new HashMap<>();
|
||||||
static HashMap<String, CMIItemStack> byBukkitName = new HashMap<String, CMIItemStack>();
|
static HashMap<String, CMIItemStack> byBukkitName = new HashMap<>();
|
||||||
static HashMap<String, CMIItemStack> byMojangName = new HashMap<String, CMIItemStack>();
|
static HashMap<String, CMIItemStack> byMojangName = new HashMap<>();
|
||||||
static HashMap<CMIMaterial, CMIItemStack> byMaterial = new HashMap<CMIMaterial, CMIItemStack>();
|
static HashMap<CMIMaterial, CMIItemStack> byMaterial = new HashMap<>();
|
||||||
static Version version;
|
static Version version;
|
||||||
|
|
||||||
public static void load() {
|
public static void load() {
|
||||||
@ -119,7 +119,7 @@ public class ItemManager {
|
|||||||
return cm;
|
return cm;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HashMap<String, ItemStack> headCache = new HashMap<String, ItemStack>();
|
static HashMap<String, ItemStack> headCache = new HashMap<>();
|
||||||
|
|
||||||
public static CMIItemStack getItem(String name) {
|
public static CMIItemStack getItem(String name) {
|
||||||
if (byBukkitName.isEmpty())
|
if (byBukkitName.isEmpty())
|
||||||
@ -276,7 +276,7 @@ public class ItemManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static public List<Recipe> getAllRecipes() {
|
static public List<Recipe> getAllRecipes() {
|
||||||
List<Recipe> results = new ArrayList<Recipe>();
|
List<Recipe> results = new ArrayList<>();
|
||||||
Iterator<Recipe> iter = Bukkit.recipeIterator();
|
Iterator<Recipe> iter = Bukkit.recipeIterator();
|
||||||
while (iter.hasNext()) {
|
while (iter.hasNext()) {
|
||||||
Recipe recipe = iter.next();
|
Recipe recipe = iter.next();
|
||||||
@ -287,7 +287,7 @@ public class ItemManager {
|
|||||||
|
|
||||||
static public List<Recipe> getRecipesFor(ItemStack result) {
|
static public List<Recipe> getRecipesFor(ItemStack result) {
|
||||||
|
|
||||||
List<Recipe> results = new ArrayList<Recipe>();
|
List<Recipe> results = new ArrayList<>();
|
||||||
Iterator<Recipe> iter = Bukkit.recipeIterator();
|
Iterator<Recipe> iter = Bukkit.recipeIterator();
|
||||||
while (iter.hasNext()) {
|
while (iter.hasNext()) {
|
||||||
Recipe recipe = iter.next();
|
Recipe recipe = iter.next();
|
||||||
@ -1579,7 +1579,7 @@ public class ItemManager {
|
|||||||
|
|
||||||
public static CMIMaterial getRandom(CMIMaterial mat) {
|
public static CMIMaterial getRandom(CMIMaterial mat) {
|
||||||
|
|
||||||
List<CMIMaterial> ls = new ArrayList<CMIMaterial>();
|
List<CMIMaterial> ls = new ArrayList<>();
|
||||||
|
|
||||||
for (CMIMaterial one : CMIMaterial.values()) {
|
for (CMIMaterial one : CMIMaterial.values()) {
|
||||||
if (one.getLegacyId() == -1)
|
if (one.getLegacyId() == -1)
|
||||||
|
Loading…
Reference in New Issue
Block a user