mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-04 11:36:24 +00:00
Allow updating the compass target to be optional (#1937)
If `compass-towards-home-perm` is enabled in the EssentialsX config, then the permission `essentials.home.compass` is checked before changing the player's compass target. Closes #1918.
This commit is contained in:
parent
27d9f3725a
commit
4873beb100
4 changed files with 30 additions and 6 deletions
|
@ -533,6 +533,7 @@ public class Settings implements net.ess3.api.ISettings {
|
|||
currencyFormat = _getCurrencyFormat();
|
||||
unprotectedSigns = _getUnprotectedSign();
|
||||
defaultEnabledConfirmCommands = _getDefaultEnabledConfirmCommands();
|
||||
isCompassTowardsHomePerm = _isCompassTowardsHomePerm();
|
||||
}
|
||||
|
||||
private List<Integer> itemSpawnBl = new ArrayList<Integer>();
|
||||
|
@ -1439,4 +1440,15 @@ public class Settings implements net.ess3.api.ISettings {
|
|||
public boolean isConfirmCommandEnabledByDefault(String commandName) {
|
||||
return getDefaultEnabledConfirmCommands().contains(commandName.toLowerCase());
|
||||
}
|
||||
|
||||
private boolean isCompassTowardsHomePerm;
|
||||
|
||||
private boolean _isCompassTowardsHomePerm() {
|
||||
return config.getBoolean("compass-towards-home-perm", false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCompassTowardsHomePerm() {
|
||||
return isCompassTowardsHomePerm;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue