prepare for better obfer
This commit is contained in:
parent
a77d21b1ac
commit
25e707f7af
2 changed files with 6 additions and 4 deletions
|
@ -34,11 +34,11 @@ import java.util.function.Consumer;
|
|||
|
||||
public class BaseBand {
|
||||
public static int majorVersion = 1;
|
||||
public static int buildNumber = 407;
|
||||
public static String hash = "9e086ff8ab086183";
|
||||
public static int buildNumber = 408;
|
||||
public static String hash = "42bc10b4c848031b";
|
||||
|
||||
public static String name = "BaseBand";
|
||||
public long timeOfCompile = 1695986519815L;
|
||||
public long timeOfCompile = 1696010092485L;
|
||||
public CommandManager commandRegistry;
|
||||
public EventBus eventBus;
|
||||
public ArrayList<Module> modules = new ArrayList<>();
|
||||
|
@ -75,7 +75,7 @@ public class BaseBand {
|
|||
if(Arrays.equals(access.getParameterTypes(), new Class<?>[]{Consumer.class}) && access.getDeclaringClass() == keeper.getClass()) {
|
||||
access.invoke(keeper, (Consumer<Object>) accessor -> {
|
||||
try {
|
||||
Object registry = accessor.getClass().getMethods()[0].invoke(accessor);
|
||||
Object registry = Arrays.stream(accessor.getClass().getMethods()).filter(x -> x.getParameterCount() == 0 && x.getDeclaringClass() == accessor.getClass()).findAny().get().invoke(accessor);
|
||||
for (Method save : registry.getClass().getMethods()) {
|
||||
if (save.getParameterCount() == 0 && save.getReturnType() == Void.TYPE && save.getDeclaringClass() == registry.getClass()) {
|
||||
save.invoke(registry); // registry save
|
||||
|
|
|
@ -120,6 +120,8 @@ public class ReflectUtil {
|
|||
if((thing.getModifiers() & Modifier.FINAL) != 0)
|
||||
throw new IllegalAccessException();
|
||||
} catch (Throwable e2) {
|
||||
e1.printStackTrace();
|
||||
e2.printStackTrace();
|
||||
throw new AssertionError("This JVM does not support changing field modifiers");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue