Skip to content

Commit

Permalink
Remove auto whitelist
Browse files Browse the repository at this point in the history
This feature is broken and not really something the tool should be doing
Fixes #52
  • Loading branch information
rtm516 committed Dec 16, 2023
1 parent 4dd3af6 commit f61df47
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 25 deletions.
4 changes: 0 additions & 4 deletions bootstrap/geyser/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ dependencies {
api(project(":core"))
api(libs.bundles.jackson.yaml)
compileOnly(libs.bundles.geyser)
compileOnly(libs.floodgate.spigot) {
exclude("dev.folia")
exclude("com.mojang")
}
}

nameJar("MCXboxBroadcastExtension")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,21 +182,5 @@ private void tick() {
} catch (SessionUpdateException e) {
sessionManager.logger().error("Failed to update session information!", e);
}

// If we are in spigot, using floodgate authentication and have the config option enabled
// get the users friends and whitelist them
if (this.geyserApi().defaultRemoteServer().authType() == AuthType.FLOODGATE
&& this.geyserApi().platformType() == PlatformType.SPIGOT // TODO Find API equivalent
&& config.whitelistFriends()) {
try {
for (FollowerResponse.Person person : sessionManager.friendManager().get()) {
if (WhitelistUtils.addPlayer(Utils.getJavaUuid(person.xuid), "unknown")) {
sessionManager.logger().info("Added xbox friend " + person.displayName + " to whitelist");
}
}
} catch (XboxFriendsException e) {
sessionManager.logger().error("Failed to fetch xbox friends for whitelist!", e);
}
}
}
}
3 changes: 0 additions & 3 deletions bootstrap/geyser/src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ remote-port: auto
# Warning: This can be no lower than 20 due to xbox rate limits
update-interval: 30

# Should Xbox Live friends automatically be whitelisted
whitelist-friends: false

# Friend/follower list sync settings
friend-sync:
# The amount of time in seconds to check for follower changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ public record ExtensionConfig(
@JsonProperty("remote-address") String remoteAddress,
@JsonProperty("remote-port") String remotePort,
@JsonProperty("update-interval") int updateInterval,
@JsonProperty("whitelist-friends") boolean whitelistFriends,
@JsonProperty("friend-sync") FriendSyncConfig friendSync) {
}
1 change: 0 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ methanol = "1.7.0"

[libraries]
bedrock-common = { group = "com.nukkitx.protocol", name = "bedrock-common", version.ref = "bedrock-common" }
floodgate-spigot = { group = "org.geysermc.floodgate", name = "spigot", version.ref = "floodgate" }
geyser-api = { group = "org.geysermc.geyser", name = "api", version.ref = "geyser" }
geyser-core = { group = "org.geysermc.geyser", name = "core", version.ref = "geyser" }

Expand Down

0 comments on commit f61df47

Please sign in to comment.