mirror of
https://github.com/TuxCoding/FastLogin.git
synced 2025-07-29 18:27:36 +02:00
Add 'linked' option to 'autoRegisterFloodgate'
This makes sense with Floodgate 2.0's Global Link API
This commit is contained in:
@ -105,7 +105,7 @@ public abstract class FloodgateManagement<P extends C, C, L extends LoginSession
|
||||
}
|
||||
}
|
||||
|
||||
if (!isRegistered && autoRegisterFloodgate.equals("false")) {
|
||||
if (!isRegistered && !isAutoRegisterAllowed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -120,6 +120,17 @@ public abstract class FloodgateManagement<P extends C, C, L extends LoginSession
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Decude if the player can be auto registered.
|
||||
* The config option 'non-conflicting' is ignored by this function.
|
||||
* @return true if the Player can be registered automatically
|
||||
*/
|
||||
private boolean isAutoRegisterAllowed() {
|
||||
return autoRegisterFloodgate.equals("true")
|
||||
|| autoRegisterFloodgate.equals("no-conflict") // this was checked before
|
||||
|| (autoRegisterFloodgate.equals("linked") && isLinked);
|
||||
}
|
||||
|
||||
/**
|
||||
* Decides wether checks for conflicting Java names should be made
|
||||
* @return ture if an API call to Mojang is needed
|
||||
|
@ -234,6 +234,7 @@ allowFloodgateNameConflict: false
|
||||
# Possible values:
|
||||
# false: Disables auto registering for every player connecting through Floodgate
|
||||
# true: Enables auto registering for every player connecting through Floodgate
|
||||
# linked: Only Bedrock accounts that are linked to a Java account will be registered automatically
|
||||
# no-conflict: Bedrock players will only be automatically registered if the Mojang API reports
|
||||
# that there is no existing Premium Java MC account with their name.
|
||||
# This option can be useful if you are not using 'username-prefix' in floodgate/config.yml
|
||||
|
Reference in New Issue
Block a user