Skip to content

Commit

Permalink
fix machine ownership config value wording to make more sense
Browse files Browse the repository at this point in the history
  • Loading branch information
YoungOnionMC committed Oct 20, 2024
1 parent 5f4f067 commit 3ac8674
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -327,13 +327,13 @@ public InteractionResult use(BlockState state, Level world, BlockPos pos, Player
}

public boolean canOpenOwnerMachine(Player player, IMachineBlockEntity machine) {
if (!ConfigHolder.INSTANCE.machines.machineOwnerGUI) return true;
if (!ConfigHolder.INSTANCE.machines.onlyOwnerGUI) return true;
if (machine.getOwner() == null) return true;
return machine.getOwner().isPlayerInTeam(player) || machine.getOwner().isPlayerFriendly(player);
}

public static boolean canBreakOwnerMachine(Player player, IMachineBlockEntity machine) {
if (!ConfigHolder.INSTANCE.machines.machineOwnerBreak) return true;
if (!ConfigHolder.INSTANCE.machines.onlyOwnerBreak) return true;
if (machine.getOwner() == null) return true;
return machine.getOwner().isPlayerInTeam(player);
}
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/gregtechceu/gtceu/config/ConfigHolder.java
Original file line number Diff line number Diff line change
Expand Up @@ -393,11 +393,11 @@ public static class MachineConfigs {
public int ldFluidPipeMinDistance = 50;

@Configurable
@Configurable.Comment({ "Whether non owners can open a machine gui", "Default: false" })
public boolean machineOwnerGUI = true;
@Configurable.Comment({ "Whether ONLY owners can open a machine gui", "Default: false" })
public boolean onlyOwnerGUI = false;
@Configurable
@Configurable.Comment({ "Whether non owners can break a machine", "Default: false" })
public boolean machineOwnerBreak = true;
@Configurable.Comment({ "Whether ONLY owners can break a machine", "Default: false" })
public boolean onlyOwnerBreak = false;

/**
* <strong>Addons mods should not reference this config directly.</strong>
Expand Down

0 comments on commit 3ac8674

Please sign in to comment.