mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-24 11:38:40 +01:00
Change comments on configs; default ports for all storage backends
This commit is contained in:
parent
0abe9598f6
commit
f8a77cf809
@ -148,8 +148,8 @@ group-name-rewrite:
|
||||
# +------------------------------------------------------------------------+ #
|
||||
|
||||
# Which storage method the plugin should use.
|
||||
# Currently supported: mysql, sqlite, h2, json, yaml, mongodb
|
||||
# Fill out connection info below if you're using MySQL or MongoDB
|
||||
# Currently supported: mysql, postgresql, sqlite, h2, json, yaml, mongodb
|
||||
# Fill out connection info below if you're using MySQL, PostgreSQL or MongoDB
|
||||
storage-method: h2
|
||||
|
||||
# This block enables support for split datastores.
|
||||
@ -163,7 +163,11 @@ split-storage:
|
||||
log: h2
|
||||
|
||||
data:
|
||||
address: localhost:3306
|
||||
# Uses standard DB engine port by default
|
||||
# MySQL: 3306, PostgreSQL: 5432, MongoDB: 27017
|
||||
# Specify as "host:port" if differs
|
||||
address: localhost
|
||||
|
||||
database: minecraft
|
||||
username: root
|
||||
password: ''
|
||||
@ -181,9 +185,11 @@ data:
|
||||
#
|
||||
# If you decide to enable this feature, you should set "sync-minutes" to -1, as there is no need for LuckPerms
|
||||
# to poll the database for changes.
|
||||
#
|
||||
# Port 6379 is used by default; set address to "host:port" if differs
|
||||
redis:
|
||||
enabled: false
|
||||
address: localhost:6379
|
||||
address: localhost
|
||||
password: ''
|
||||
|
||||
|
||||
|
@ -90,8 +90,8 @@ group-weight:
|
||||
# +------------------------------------------------------------------------+ #
|
||||
|
||||
# Which storage method the plugin should use.
|
||||
# Currently supported: mysql, sqlite, h2, json, yaml, mongodb
|
||||
# Fill out connection info below if you're using MySQL or MongoDB
|
||||
# Currently supported: mysql, postgresql, sqlite, h2, json, yaml, mongodb
|
||||
# Fill out connection info below if you're using MySQL, PostgreSQL or MongoDB
|
||||
storage-method: h2
|
||||
|
||||
# This block enables support for split datastores.
|
||||
@ -105,7 +105,11 @@ split-storage:
|
||||
log: h2
|
||||
|
||||
data:
|
||||
address: localhost:3306
|
||||
# Uses standard DB engine port by default
|
||||
# MySQL: 3306, PostgreSQL: 5432, MongoDB: 27017
|
||||
# Specify as "host:port" if differs
|
||||
address: localhost
|
||||
|
||||
database: minecraft
|
||||
username: root
|
||||
password: ''
|
||||
@ -123,9 +127,11 @@ data:
|
||||
#
|
||||
# If you decide to enable this feature, you should set "sync-minutes" to -1, as there is no need for LuckPerms
|
||||
# to poll the database for changes.
|
||||
#
|
||||
# Port 6379 is used by default; set address to "host:port" if differs
|
||||
redis:
|
||||
enabled: false
|
||||
address: localhost:6379
|
||||
address: localhost
|
||||
password: ''
|
||||
|
||||
|
||||
|
@ -49,8 +49,9 @@ public class RedisMessaging implements MessagingService {
|
||||
private LPSub sub;
|
||||
|
||||
public void init(String address, String password) {
|
||||
String host = address.substring(0, address.indexOf(':'));
|
||||
int port = Integer.parseInt(address.substring(address.indexOf(":") + 1));
|
||||
String[] addressSplit = address.split(":");
|
||||
String host = addressSplit[0];
|
||||
int port = addressSplit.length > 1 ? Integer.parseInt(addressSplit[1]) : 6379;
|
||||
|
||||
if (password.equals("")) {
|
||||
jedisPool = new JedisPool(new JedisPoolConfig(), host, port);
|
||||
@ -91,7 +92,7 @@ public class RedisMessaging implements MessagingService {
|
||||
private final LuckPermsPlugin plugin;
|
||||
private final Set<UUID> receivedMsgs = Collections.synchronizedSet(new HashSet<>());
|
||||
|
||||
public UUID generateId() {
|
||||
UUID generateId() {
|
||||
UUID uuid = UUID.randomUUID();
|
||||
receivedMsgs.add(uuid);
|
||||
return uuid;
|
||||
|
@ -139,10 +139,10 @@ public class MongoDBBacking extends AbstractBacking {
|
||||
}
|
||||
}
|
||||
|
||||
ServerAddress address = new ServerAddress(
|
||||
configuration.getAddress().split(":")[0],
|
||||
Integer.parseInt(configuration.getAddress().split(":")[1])
|
||||
);
|
||||
String[] addressSplit = configuration.getAddress().split(":");
|
||||
String host = addressSplit[0];
|
||||
int port = addressSplit.length > 1 ? Integer.parseInt(addressSplit[1]) : 27017;
|
||||
ServerAddress address = new ServerAddress(host, port);
|
||||
|
||||
if (credential == null) {
|
||||
mongoClient = new MongoClient(address, Collections.emptyList());
|
||||
|
@ -89,8 +89,8 @@ group-weight {
|
||||
# +------------------------------------------------------------------------+ #
|
||||
|
||||
# Which storage method the plugin should use.
|
||||
# Currently supported: mysql, sqlite, h2, json, yaml, mongodb
|
||||
# Fill out connection info below if you're using MySQL or MongoDB
|
||||
# Currently supported: mysql, postgresql, sqlite, h2, json, yaml, mongodb
|
||||
# Fill out connection info below if you're using MySQL, PostgreSQL or MongoDB
|
||||
storage-method="h2"
|
||||
|
||||
# This block enables support for split datastores.
|
||||
@ -106,7 +106,11 @@ split-storage {
|
||||
}
|
||||
|
||||
data {
|
||||
address="localhost:3306"
|
||||
# Uses standard DB engine port by default
|
||||
# MySQL: 3306, PostgreSQL: 5432, MongoDB: 27017
|
||||
# Specify as "host:port" if differs
|
||||
address="localhost"
|
||||
|
||||
database="minecraft"
|
||||
username="root"
|
||||
password=""
|
||||
@ -125,9 +129,11 @@ data {
|
||||
#
|
||||
# If you decide to enable this feature, you should set "sync-minutes" to -1, as there is no need for LuckPerms
|
||||
# to poll the database for changes.
|
||||
#
|
||||
# Port 6379 is used by default; set address to "host:port" if differs
|
||||
redis {
|
||||
enabled=false
|
||||
address="localhost:6379"
|
||||
address="localhost"
|
||||
password=""
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user