|
23 | 23 |
|
24 | 24 | public class ItemDb implements IConf, net.ess3.api.IItemDb {
|
25 | 25 | private final transient IEssentials ess;
|
26 |
| - private final transient Map<String, Integer> items = new HashMap<String, Integer>(); |
27 |
| - private final transient Map<ItemData, List<String>> names = new HashMap<ItemData, List<String>>(); |
28 |
| - private final transient Map<ItemData, String> primaryName = new HashMap<ItemData, String>(); |
29 |
| - private final transient Map<String, Short> durabilities = new HashMap<String, Short>(); |
| 26 | + private final transient Map<String, Integer> items = new HashMap<>(); |
| 27 | + private final transient Map<ItemData, List<String>> names = new HashMap<>(); |
| 28 | + private final transient Map<ItemData, String> primaryName = new HashMap<>(); |
| 29 | + private final transient Map<String, Short> durabilities = new HashMap<>(); |
30 | 30 | private final transient ManagedFile file;
|
31 | 31 | private final transient Pattern splitPattern = Pattern.compile("((.*)[:+',;.](\\d+))");
|
32 | 32 |
|
@@ -90,7 +90,7 @@ public ItemStack get(final String id, final int quantity) throws Exception {
|
90 | 90 | @Override
|
91 | 91 | public ItemStack get(final String id) throws Exception {
|
92 | 92 | int itemid = 0;
|
93 |
| - String itemname = null; |
| 93 | + String itemname; |
94 | 94 | short metaData = 0;
|
95 | 95 | Matcher parts = splitPattern.matcher(id);
|
96 | 96 | if (parts.matches()) {
|
@@ -160,7 +160,7 @@ public ItemStack get(final String id) throws Exception {
|
160 | 160 |
|
161 | 161 | @Override
|
162 | 162 | public List<ItemStack> getMatching(User user, String[] args) throws Exception {
|
163 |
| - List<ItemStack> is = new ArrayList<ItemStack>(); |
| 163 | + List<ItemStack> is = new ArrayList<>(); |
164 | 164 |
|
165 | 165 | if (args.length < 1) {
|
166 | 166 | is.add(user.getBase().getItemInHand());
|
|
0 commit comments