mirror of
https://github.com/GeyserMC/Floodgate.git
synced 2025-12-27 18:59:05 +00:00
Use javax imports instead of Guice for SQLite database
This commit is contained in:
@@ -31,11 +31,11 @@ player-link:
|
|||||||
# Whether to require a linked account in order to be able to join the server.
|
# Whether to require a linked account in order to be able to join the server.
|
||||||
require-link: false
|
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.
|
# -> This can work in addition to global linking.
|
||||||
# Note that you have to install a linking database implementation before enabling this, because
|
# Note that you have to install a linking database implementation before enabling this, because
|
||||||
# it'll cause errors otherwise.
|
# 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'
|
# The following three options only apply when 'enable-own-linking' is set to 'true'
|
||||||
|
|
||||||
|
|||||||
@@ -25,8 +25,6 @@
|
|||||||
|
|
||||||
package org.geysermc.floodgate.database;
|
package org.geysermc.floodgate.database;
|
||||||
|
|
||||||
import com.google.inject.Inject;
|
|
||||||
import com.google.inject.name.Named;
|
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.sql.DriverManager;
|
import java.sql.DriverManager;
|
||||||
@@ -39,6 +37,8 @@ import java.util.Map;
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
import java.util.concurrent.CompletionException;
|
import java.util.concurrent.CompletionException;
|
||||||
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Named;
|
||||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||||
import org.geysermc.floodgate.api.link.LinkRequest;
|
import org.geysermc.floodgate.api.link.LinkRequest;
|
||||||
import org.geysermc.floodgate.api.link.LinkRequestResult;
|
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 final Map<String, LinkRequest> activeLinkRequests = new HashMap<>();
|
||||||
private Connection connection;
|
private Connection connection;
|
||||||
|
|
||||||
|
/* These are DELIBERATELY javax imports so Guice relocations can't break it */
|
||||||
@Inject
|
@Inject
|
||||||
@Named("dataDirectory")
|
@Named("dataDirectory")
|
||||||
private Path dataDirectory;
|
private Path dataDirectory;
|
||||||
|
|||||||
Reference in New Issue
Block a user