code refactoring
This commit is contained in:
parent
2d3ddef181
commit
281a125584
4 changed files with 8 additions and 9 deletions
|
@ -213,7 +213,7 @@ public class SRPlayer {
|
|||
@SuppressWarnings("unused")
|
||||
public @NotNull Map<Attribute, Double> getItemAttributes(Item item) {
|
||||
if (itemAttributes == null) itemAttributes = new EnumMap<>(Attribute.class);
|
||||
HashMap<Attribute, Double> map = new HashMap<>();
|
||||
Map<Attribute, Double> map = new HashMap<>();
|
||||
itemAttributes.forEach((k, v) -> map.put(k, v.getOrDefault(item.toItemStack(), 0d)));
|
||||
return map;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue