EventDispatcher should throw NPE before try block.

This commit is contained in:
MobiusDevelopment
2022-01-31 04:47:26 +00:00
parent 212b19797f
commit 3bf00c88bf
21 changed files with 105 additions and 105 deletions

View File

@ -142,13 +142,13 @@ public class EventDispatcher
*/
private <T extends AbstractEventReturn> T notifyEventToMultipleContainers(IBaseEvent event, ListenersContainer[] containers, Class<T> callbackClass)
{
if (event == null)
{
throw new NullPointerException("Event cannot be null!");
}
try
{
if (event == null)
{
throw new NullPointerException("Event cannot be null!");
}
T callback = null;
if (containers != null)
{