|
Collections.synchronizedMap(new HashMap<UUID, ArrayList<SongPlayer>>()); |
Might be replaced with
ConcurrentHashMap
|
if (plugin.playingSongs.get(player.getUniqueId()) == null) { |
Might be replaced with
Map#contains or result of
Map#get may be cached not to be called twice
NoteBlockAPI/src/main/java/com/xxmicloxx/NoteBlockAPI/NoteBlockAPI.java
Line 32 in 92b6a73
ConcurrentHashMapNoteBlockAPI/src/main/java/com/xxmicloxx/NoteBlockAPI/NoteBlockAPI.java
Line 54 in 92b6a73
Map#containsor result ofMap#getmay be cached not to be called twice