Change floodgate hook
This commit is contained in:
parent
f2876d79fb
commit
7d09faf528
@ -119,7 +119,7 @@ public class PlayerListener implements Listener{
|
|||||||
if (validationService.isUnrestricted(name)) {
|
if (validationService.isUnrestricted(name)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (settings.getProperty(HooksSettings.HOOK_FLOODGATE_PLAYER)) {
|
if (settings.getProperty(HooksSettings.HOOK_FLOODGATE_PLAYER) && settings.getProperty(HooksSettings.IGNORE_BEDROCK_NAME_CHECK)) {
|
||||||
if (getServer().getPluginManager().getPlugin("floodgate") != null) {
|
if (getServer().getPluginManager().getPlugin("floodgate") != null) {
|
||||||
if (org.geysermc.floodgate.api.FloodgateApi.getInstance().isFloodgateId(event.getUniqueId())) return;
|
if (org.geysermc.floodgate.api.FloodgateApi.getInstance().isFloodgateId(event.getUniqueId())) return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,12 +19,16 @@ public final class HooksSettings implements SettingsHolder {
|
|||||||
public static final Property<Boolean> BUNGEECORD =
|
public static final Property<Boolean> BUNGEECORD =
|
||||||
newProperty("Hooks.bungeecord", false);
|
newProperty("Hooks.bungeecord", false);
|
||||||
|
|
||||||
@Comment({"Allow FloodGatePlayer Join Without checkIsValidName()",
|
@Comment({"Hook into floodgate.",
|
||||||
"This must be true if you want to use other bedrock features."
|
"This must be true if you want to use other bedrock features."
|
||||||
})
|
})
|
||||||
public static final Property<Boolean> HOOK_FLOODGATE_PLAYER =
|
public static final Property<Boolean> HOOK_FLOODGATE_PLAYER =
|
||||||
newProperty("Hooks.floodgate", false);
|
newProperty("Hooks.floodgate", false);
|
||||||
|
|
||||||
|
@Comment("Allow bedrock players join without check isValidName?")
|
||||||
|
public static final Property<Boolean> IGNORE_BEDROCK_NAME_CHECK =
|
||||||
|
newProperty("Hooks.ignoreBedrockNameCheck", true);
|
||||||
|
|
||||||
|
|
||||||
@Comment("Send player to this BungeeCord server after register/login")
|
@Comment("Send player to this BungeeCord server after register/login")
|
||||||
public static final Property<String> BUNGEECORD_SERVER =
|
public static final Property<String> BUNGEECORD_SERVER =
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user