Merge pull request #6586 from deathbeam/properly-null-check-chat-perf
Properly null-check chat performance widgets
This commit is contained in:
@@ -61,9 +61,16 @@ public class ChatboxPerformancePlugin extends Plugin
|
|||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget[] widgets = widget.getChildren();
|
Widget[] widgets = widget.getChildren();
|
||||||
return widgets.length > 0 && widgets[widgets.length - 1].getOpacity() < 254;
|
|
||||||
|
if (widgets != null && widgets.length > 0)
|
||||||
|
{
|
||||||
|
Widget last = widgets[widgets.length - 1];
|
||||||
|
return last != null && last.getOpacity() < 254;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void fixChatbox()
|
private void fixChatbox()
|
||||||
|
|||||||
Reference in New Issue
Block a user