Add "allow-world-in-broadcastworld" option

Allows players to send broadcasts to a specified world by running `/broadcastworld [world] <message>` if enabled.

This is disabled by default in old configs to avoid confusion between updates.
This commit is contained in:
md678685 2018-08-27 10:19:46 +01:00
parent e642192461
commit 2806156cf4
4 changed files with 50 additions and 2 deletions

View file

@ -537,6 +537,7 @@ public class Settings implements net.ess3.api.ISettings {
unprotectedSigns = _getUnprotectedSign();
defaultEnabledConfirmCommands = _getDefaultEnabledConfirmCommands();
isCompassTowardsHomePerm = _isCompassTowardsHomePerm();
isAllowWorldInBroadcastworld = _isAllowWorldInBroadcastworld();
}
private List<Integer> itemSpawnBl = new ArrayList<Integer>();
@ -1459,4 +1460,15 @@ public class Settings implements net.ess3.api.ISettings {
public boolean isCompassTowardsHomePerm() {
return isCompassTowardsHomePerm;
}
private boolean isAllowWorldInBroadcastworld;
private boolean _isAllowWorldInBroadcastworld() {
return config.getBoolean("allow-world-in-broadcastworld", false);
}
@Override
public boolean isAllowWorldInBroadcastworld() {
return isAllowWorldInBroadcastworld;
}
}