File tree Expand file tree Collapse file tree
src/main/java/org/CreadoresProgram/ViaProxyPterodactyl Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package org .CreadoresProgram .ViaProxyPterodactyl ;
2+ import java .io .File ;
3+ import java .net .URL ;
4+ import java .net .URLClassLoader ;
5+ import java .lang .reflect .Method ;
6+ public class Main {
7+ public static void main (String [] args ){
8+ try {
9+ File file = new File (System .getProperty ("user.dir" ) + "/ViaProxy.jar" );
10+ URL url = file .toURI ().toURL ();
11+ URLClassLoader child = new URLClassLoader (new URL [] { url }, JarLoader .class .getClassLoader ());
12+ Class <?> classToLoad = Class .forName ("net.raphimc.viaproxy.ViaProxy" , true , child );
13+ Method method = classToLoad .getDeclaredMethod ("main" , String [].class );
14+ method .invoke (null , (Object ) getArgsVP ());
15+ }catch (Exception ex ){
16+ ex .printStackTrace ();
17+ }
18+ }
19+ public static String [] getArgsVP (){
20+ //if config or not
21+ }
22+ }
You can’t perform that action at this time.
0 commit comments