diff --git a/fabric/src/main/kotlin/fr/username404/snowygui/fabric/FabricInit.kt b/fabric/src/main/kotlin/fr/username404/snowygui/fabric/FabricInit.kt index a61d956..4cc99f2 100644 --- a/fabric/src/main/kotlin/fr/username404/snowygui/fabric/FabricInit.kt +++ b/fabric/src/main/kotlin/fr/username404/snowygui/fabric/FabricInit.kt @@ -32,8 +32,10 @@ class FabricInit: Snowy(), ClientModInitializer { val classSet = mutableSetOf>() buttonsDirectory.run { listDirectoryEntries("*.class").forEach { file -> - val foundClass = FabricLauncherBase.getClass(file.pathString.drop(1).replace('/', '.').removeSuffix(".class")) - if (foundClass.isValidForButtonCollection()) classSet.add(foundClass.asSubclass(ButtonImpl::class.java)) + @Suppress("DEPRECATION") + FabricLauncherBase.getClass(file.pathString.drop(1).replace('/', '.').removeSuffix(".class")).let { foundClass -> + if (foundClass.isValidForButtonCollection()) classSet.add(foundClass.asSubclass(ButtonImpl::class.java)) + } } } classSet