mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-25 10:14:43 +02:00
Fix NPE with Scoreboards when updating
This commit is contained in:
@ -428,14 +428,16 @@ public class ScoreboardWrapper {
|
||||
* Load new values into the sidebar.
|
||||
*/
|
||||
private void updateSidebar() {
|
||||
try {
|
||||
updateTask.cancel();
|
||||
}
|
||||
catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
if(updateTask != null) {
|
||||
try {
|
||||
updateTask.cancel();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
updateTask = null;
|
||||
}
|
||||
|
||||
updateTask = null;
|
||||
|
||||
if (sidebarType == SidebarType.NONE) {
|
||||
return;
|
||||
|
Reference in New Issue
Block a user