Skip to content

Commit

Permalink
feat: add option to make right-clicking chairs opt-in for players (#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
SpraxDev committed Aug 17, 2024
1 parent 7510fa4 commit a110716
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,9 @@ public boolean hasChairsDisabled(UUID uuid) {

if (value == null) {
value = Settings.REMEMBER_IF_PLAYER_DISABLED_CHAIRS.getValueAsBoolean() && new File(this.disabledForDir, uuid.toString()).exists();
if (!value) {
value = Settings.HAVE_CHAIRS_DISABLED_FOR_PLAYER_BY_DEFAULT.getValueAsBoolean();
}

if (Bukkit.getPlayer(uuid).isOnline()) {
this.disabled.put(uuid, value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ public class Settings {
"Enable this if you want players to be able to sit on chairs\n" +
"while other plugins (like WorldGuard or PlotSquared) are not\n" +
"allowing interactions/use with the chair blocks.");
public static final ConfigEntry HAVE_CHAIRS_DISABLED_FOR_PLAYER_BY_DEFAULT = config.createEntry(
"Chairs.HaveChairsDisabledForPlayerByDefault", false,
"This requires players to use /toggleChairs or /BetterChairs toggle\n" +
"before they can right-click on chair blocks.");
public static final ConfigEntry REMEMBER_IF_PLAYER_DISABLED_CHAIRS = config.createEntry(
"Chairs.RememberIfPlayerDisabledChairsAfterRelogin", true,
"Enable this if you want BetterChairs to remember a player who used /bc <toggle|on|off> after a plugin reload or him rejoining")
Expand Down

0 comments on commit a110716

Please sign in to comment.