1
0
mirror of https://github.com/GeyserMC/Floodgate.git synced 2025-12-19 14:59:20 +00:00

Use javax imports instead of Guice for SQLite database

This commit is contained in:
Camotoy
2021-12-01 20:49:46 -05:00
parent a8829c6d57
commit ef04531372
2 changed files with 5 additions and 4 deletions

View File

@@ -31,11 +31,11 @@ player-link:
# Whether to require a linked account in order to be able to join the server.
require-link: false
# Uncomment the following line when you want to host your own linking database.
# Set the following option to true when you want to host your own linking database.
# -> This can work in addition to global linking.
# Note that you have to install a linking database implementation before enabling this, because
# it'll cause errors otherwise.
#enable-own-linking: true
enable-own-linking: false
# The following three options only apply when 'enable-own-linking' is set to 'true'

View File

@@ -25,8 +25,6 @@
package org.geysermc.floodgate.database;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import java.nio.file.Path;
import java.sql.Connection;
import java.sql.DriverManager;
@@ -39,6 +37,8 @@ import java.util.Map;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CompletionException;
import javax.inject.Inject;
import javax.inject.Named;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.geysermc.floodgate.api.link.LinkRequest;
import org.geysermc.floodgate.api.link.LinkRequestResult;
@@ -50,6 +50,7 @@ public class SqliteDatabase extends CommonPlayerLink {
private final Map<String, LinkRequest> activeLinkRequests = new HashMap<>();
private Connection connection;
/* These are DELIBERATELY javax imports so Guice relocations can't break it */
@Inject
@Named("dataDirectory")
private Path dataDirectory;