Fixed usernames NPE
This commit is contained in:
parent
a2ad97faec
commit
a058990075
1 changed files with 5 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
||||||
package buttondevteam.chat;
|
package buttondevteam.chat;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
@ -21,7 +22,10 @@ public class ChatPlayer extends TBMCPlayer {
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<String> getUserNames() {
|
public List<String> getUserNames() {
|
||||||
return getData();
|
final List<String> data = getData();
|
||||||
|
if (data == null)
|
||||||
|
setUserNames(new ArrayList<String>());
|
||||||
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUserNames(List<String> names) {
|
public void setUserNames(List<String> names) {
|
||||||
|
|
Loading…
Reference in a new issue