Skip to content

Commit 128b4ac

Browse files
committed
refactor: Remove an extra parameter
1 parent 72035d4 commit 128b4ac

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

inspector-bukkit/src/main/kotlin/util/EventsUtils.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ internal object EventsUtils {
1616
try {
1717
val method = getRegistrationClass(type).getHandlerListMethod()
1818
method.isAccessible = true
19-
return method.invoke(null, *arrayOfNulls(0)) as HandlerList
19+
return method.invoke(null) as HandlerList
2020
} catch (e: Exception) {
2121
throw IllegalPluginAccessException(e.toString())
2222
}
@@ -32,8 +32,8 @@ internal object EventsUtils {
3232
}
3333
}
3434

35-
throw IllegalPluginAccessException("Unable to find handler list for event ${type.name}")
35+
throw IllegalPluginAccessException("Unable to find handler list for event ${type.name}. Static getHandlerList method required!")
3636
}
3737

38-
private fun Class<out Event>.getHandlerListMethod() = getDeclaredMethod("getHandlerList", *arrayOfNulls(0))
38+
private fun Class<out Event>.getHandlerListMethod() = getDeclaredMethod("getHandlerList")
3939
}

0 commit comments

Comments
 (0)