Try loading native cipher from java.library.path first
This commit is contained in:
parent
972b4c1fe5
commit
22084b2c75
@ -29,6 +29,16 @@ public class NativeCipher implements BungeeCipher
|
||||
public static boolean load()
|
||||
{
|
||||
if ( !loaded && isSupported() )
|
||||
{
|
||||
try
|
||||
{
|
||||
System.loadLibrary( "bungeecord-native-cipher" );
|
||||
loaded = true;
|
||||
} catch ( Throwable t )
|
||||
{
|
||||
}
|
||||
|
||||
if ( !loaded )
|
||||
{
|
||||
try ( InputStream lib = BungeeCipher.class.getClassLoader().getResourceAsStream( "native-cipher.so" ) )
|
||||
{
|
||||
@ -46,6 +56,7 @@ public class NativeCipher implements BungeeCipher
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return loaded;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user