Major mute system overhaul
Commands: - /mute <nick> [time] [-s] [reason] - mute player - /unmute <nick> [-s] - unmute player - /mutelist - list active mutes - /mutehistory <nick> - player mute history - /muteblame <moderator> - mutes issued by moderator Features: - Configurable messages with placeholders (%player%, %operator%, %duration%, %reason%) - Duration permissions: lochat.mute.dur.<time> (10m, 30m, 1h, 6h, 12h, 1d, 3d, 7d, 14d, 30d, perm) - Silent mute: -s flag (requires lochat.mute.silent) - See silent mutes: lochat.mute.see-silent - Default reason configurable (default: Нету.) - Auto-use max allowed duration if not specified - All settings in config.yml under 'mute' section
This commit is contained in:
parent
d92799613e
commit
b74fa21272
9 changed files with 502 additions and 98 deletions
|
|
@ -92,6 +92,41 @@ public class ConfigManager {
|
|||
this.config = plugin.getConfig();
|
||||
}
|
||||
|
||||
/**
|
||||
* Получить строку из конфига с дефолтным значением
|
||||
*/
|
||||
public String getString(String path, String defaultValue) {
|
||||
return config.getString(path, defaultValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* Получить строку из конфига
|
||||
*/
|
||||
public String getString(String path) {
|
||||
return config.getString(path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Получить int из конфига
|
||||
*/
|
||||
public int getInt(String path, int defaultValue) {
|
||||
return config.getInt(path, defaultValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* Получить boolean из конфига
|
||||
*/
|
||||
public boolean getBoolean(String path, boolean defaultValue) {
|
||||
return config.getBoolean(path, defaultValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* Получить список строк из конфига
|
||||
*/
|
||||
public List<String> getStringList(String path) {
|
||||
return config.getStringList(path);
|
||||
}
|
||||
|
||||
// Global chat
|
||||
public boolean isGlobalEnabled() {
|
||||
return config.getBoolean("chat.global.enabled", true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue