mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-22 08:31:07 +03:00
[FEATURE] Support createHackLookupNative
This commit is contained in:
parent
380179faa3
commit
43626bf1f4
1 changed files with 6 additions and 1 deletions
|
@ -7,8 +7,13 @@
|
|||
import java.util.function.Consumer;
|
||||
|
||||
public class HackHelper {
|
||||
|
||||
private static native MethodHandles.Lookup createHackLookupNative(Class<?> lookupClass);
|
||||
private static MethodHandles.Lookup createHackLookupImpl(Class<?> lookupClass) {
|
||||
try {
|
||||
return createHackLookupNative(lookupClass);
|
||||
} catch (Throwable ignored) {
|
||||
|
||||
}
|
||||
try {
|
||||
Field trusted = MethodHandles.Lookup.class.getDeclaredField("TRUSTED");
|
||||
trusted.setAccessible(true);
|
||||
|
|
Loading…
Reference in a new issue