Skip to content

Setting to have placed blocks open to the public by default#266

Merged
spnda merged 5 commits intospnda:masterfrom
TheDiscordian:PublicOnPlace
Feb 24, 2024
Merged

Setting to have placed blocks open to the public by default#266
spnda merged 5 commits intospnda:masterfrom
TheDiscordian:PublicOnPlace

Conversation

@TheDiscordian
Copy link
Contributor

Fixes #265.

Adds setting public_on_place_by_default. Makes it so public is a friend by default.

@TheDiscordian TheDiscordian requested a review from spnda as a code owner February 15, 2024 21:37
@TheDiscordian TheDiscordian changed the title Settings to have placed blocks open to the public by default Setting to have placed blocks open to the public by default Feb 15, 2024
Copy link
Owner

@spnda spnda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding the public as a default friend automatically should happen in a PlayerJoinEvent handler.

Add a new @EventHandler annotated function to listeners/JoinEventListener.java that checks if player.hasPlayedBefore() and then add the to the default friends.

@TheDiscordian
Copy link
Contributor Author

@spnda I couldn't see how to setup a new function as there's already an onJoin function. However I believe I implemented this cleanly now. Thanks a lot for steering me in this direction.

@TheDiscordian TheDiscordian requested a review from spnda February 23, 2024 22:01
@spnda spnda merged commit 52a827e into spnda:master Feb 24, 2024
spnda added a commit that referenced this pull request Jul 12, 2024
The PR changed the config key name at the end, but forgot to change the key name in the Java source.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Default locked, but open to the public.

2 participants