diff --git a/Essentials/src/com/earth2me/essentials/ItemDb.java b/Essentials/src/com/earth2me/essentials/ItemDb.java index c3c61842d59..4d061ae16a2 100644 --- a/Essentials/src/com/earth2me/essentials/ItemDb.java +++ b/Essentials/src/com/earth2me/essentials/ItemDb.java @@ -23,10 +23,10 @@ public class ItemDb implements IConf, net.ess3.api.IItemDb { private final transient IEssentials ess; - private final transient Map items = new HashMap(); - private final transient Map> names = new HashMap>(); - private final transient Map primaryName = new HashMap(); - private final transient Map durabilities = new HashMap(); + private final transient Map items = new HashMap<>(); + private final transient Map> names = new HashMap<>(); + private final transient Map primaryName = new HashMap<>(); + private final transient Map durabilities = new HashMap<>(); private final transient ManagedFile file; private final transient Pattern splitPattern = Pattern.compile("((.*)[:+',;.](\\d+))"); @@ -90,7 +90,7 @@ public ItemStack get(final String id, final int quantity) throws Exception { @Override public ItemStack get(final String id) throws Exception { int itemid = 0; - String itemname = null; + String itemname; short metaData = 0; Matcher parts = splitPattern.matcher(id); if (parts.matches()) { @@ -160,7 +160,7 @@ public ItemStack get(final String id) throws Exception { @Override public List getMatching(User user, String[] args) throws Exception { - List is = new ArrayList(); + List is = new ArrayList<>(); if (args.length < 1) { is.add(user.getBase().getItemInHand());