Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Claim Visibility Override #320

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions common/src/main/java/dev/ftb/mods/ftbchunks/FTBChunks.java
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,9 @@ private void teamPropertiesChanged(TeamPropertiesChangedEvent event) {

if (event.getPreviousProperties().get(FTBChunksProperties.CLAIM_VISIBILITY) != event.getTeam().getProperty(FTBChunksProperties.CLAIM_VISIBILITY)) {
// team is showing or hiding claims; sync all their claims to all players
if(FTBChunksWorldConfig.CLAIM_VISIBILITY_OVERRIDE.get()) {
event.getTeam().setProperty(FTBChunksProperties.CLAIM_VISIBILITY, event.getPreviousProperties().get(FTBChunksProperties.CLAIM_VISIBILITY));
}
ChunkTeamDataImpl teamData = ClaimedChunkManagerImpl.getInstance().getOrCreateData(event.getTeam());
teamData.syncChunksToAll(server);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ public interface FTBChunksWorldConfig {
.comment("If true, the player must have the 'ftbchunks_mapping' Game stage to be able to use the map and minimap.\nRequires KubeJS and/or Gamestages to be installed.");
BooleanValue LOCATION_MODE_OVERRIDE = CONFIG.addBoolean("location_mode_override", false)
.comment("If true, \"Location Visibility\" team settings are ignored, and all players can see each other anywhere on the map.");
BooleanValue CLAIM_VISIBILITY_OVERRIDE = CONFIG.addBoolean("claim_visibility_override", false)
.comment("If true, \"Claim Visibility\" team settings are ignored, and all claims are visible to all players.");

SNBTConfig FAKE_PLAYERS = CONFIG.addGroup("fake_players");
EnumValue<ProtectionPolicy> ALLOW_FAKE_PLAYERS = FAKE_PLAYERS.addEnum("fake_players", NameMap.of(ProtectionPolicy.CHECK, ProtectionPolicy.values()).create())
Expand Down