Use Path instead of File for floodgate key file in config

...and fix related issues with the file not being found.
This commit is contained in:
RednedEpic 2020-01-26 11:22:21 -06:00
parent c4857c6a54
commit 240f41ff03
6 changed files with 21 additions and 13 deletions

View file

@ -66,7 +66,6 @@ import org.geysermc.floodgate.util.EncryptionUtil;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.file.Paths;
import java.security.NoSuchAlgorithmException;
import java.security.PublicKey;
import java.security.spec.InvalidKeySpecException;
@ -190,7 +189,7 @@ public class GeyserSession implements CommandSender {
PublicKey key = null;
try {
key = EncryptionUtil.getKeyFromFile(
Paths.get(connector.getConfig().getFloodgateKeyFile().getPath()),
connector.getConfig().getFloodgateKeyFile(),
PublicKey.class
);
} catch (IOException | InvalidKeySpecException | NoSuchAlgorithmException e) {