mirror of
https://github.com/TuxCoding/FastLogin.git
synced 2025-07-30 10:47:33 +02:00
Merge pull request #559 from Smart123s/fg2-ln-autoreg
Add 'linked' option to 'autoRegisterFloodgate'
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;
|
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
|
* Decides wether checks for conflicting Java names should be made
|
||||||
* @return ture if an API call to Mojang is needed
|
* @return ture if an API call to Mojang is needed
|
||||||
|
@ -233,6 +233,7 @@ allowFloodgateNameConflict: false
|
|||||||
# Possible values:
|
# Possible values:
|
||||||
# false: Disables auto registering for every player connecting through Floodgate
|
# false: Disables auto registering for every player connecting through Floodgate
|
||||||
# true: Enables 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
|
# 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.
|
# 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
|
# This option can be useful if you are not using 'username-prefix' in floodgate/config.yml
|
||||||
|
Reference in New Issue
Block a user