1
0
Fork 0

[+] 添加取消前缀选项

master
Taskeren 2019-08-07 21:26:19 +08:00
parent 8b841cb365
commit 1aa611c5ba
2 changed files with 4 additions and 0 deletions

View File

@ -112,6 +112,8 @@ public class Chatting {
}
public static boolean isPrefixed(String message) {
if(!Config.require_prefix) return true;
for(String prefix : Config.chatting_prefixes) {
if(message.startsWith(prefix)) return true;
}

View File

@ -20,6 +20,7 @@ public class Config {
// The Chatting Settings
public static long group_id;
public static String[] chatting_prefixes;
public static boolean require_prefix;
// I18n Settings
public static boolean useJarLanguageFile;
@ -33,6 +34,7 @@ public class Config {
group_id = cfg.get("chatting", "group", "139971220").getLong(0L);
chatting_prefixes = cfg.getStringList("prefixes", "chatting", new String[] {"!", "\uff01"}, "The prefixes of chatting");
require_prefix = cfg.getBoolean("require_prefiex", "chatting", true, "Should the message to re-sent start with prefixes");
useJarLanguageFile = cfg.getBoolean("lang_refresh", "lang", false, "True if want use the language file in jar");