修复:垃圾箱物品存入立即吞噬的问题和服务器没启用飞行功能被踢出的问题
This commit is contained in:
+2
-3
@@ -1,6 +1,5 @@
|
||||
*.md text=auto encoding=UTF-8
|
||||
*.png binary
|
||||
*.jpg binary
|
||||
*.jpeg binary
|
||||
*.gif binary
|
||||
*.ico binary
|
||||
*.bmp binary
|
||||
*.gif binary
|
||||
@@ -1,451 +1,462 @@
|
||||
package Sdf1_login;
|
||||
|
||||
import java.io.*;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.*;
|
||||
|
||||
import static java.lang.Double.parseDouble;
|
||||
|
||||
public class ConfigManager {
|
||||
|
||||
private final File dataFolder;
|
||||
private final Map<String, String> messages = new LinkedHashMap<>();
|
||||
private final Map<String, String> smtpSettings = new LinkedHashMap<>();
|
||||
|
||||
public String adminTag = "admin";
|
||||
public String adminPassword = "qweasd";
|
||||
public int maxAccountsPerIP = 3;
|
||||
public String approvalMode = "manual";
|
||||
public int autoApproveDelayMinutes = 30;
|
||||
public int loginTimeout = 60;
|
||||
public boolean afkEnabled = false;
|
||||
public int afkTimeout = 300;
|
||||
public boolean smtpSsl = true;
|
||||
public String smtpVerifyCode = "";
|
||||
public long smtpVerifyExpire = 0;
|
||||
public long smtpLastSendTime = 0;
|
||||
public String smtpConfiguringPlayer = "";
|
||||
|
||||
|
||||
public ConfigManager(File dataFolder) {
|
||||
this.dataFolder = dataFolder;
|
||||
}
|
||||
|
||||
// ==================== 消息 ====================
|
||||
|
||||
public void loadMessages() {
|
||||
messages.clear();
|
||||
File file = new File(dataFolder, "消息.txt");
|
||||
if (!file.exists()) createDefaultMessages(file);
|
||||
loadMap(file, messages);
|
||||
}
|
||||
|
||||
public String msg(String key) {
|
||||
String val = messages.getOrDefault(key, key);
|
||||
val = val.replace("<b>", "&l");
|
||||
val = val.replace("</b>", "&r");
|
||||
val = val.replace("<br>", "\n");
|
||||
val = val.replace("\\n", "\n");
|
||||
// &颜色码 转换为 §颜色码
|
||||
val = val.replaceAll(
|
||||
"&([0-9a-fk-orA-FK-OR])", "§$1");
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
private void createDefaultMessages(File f) {
|
||||
List<String> L = new ArrayList<>();
|
||||
L.add("# ==========================================");
|
||||
L.add("# Sdf1_login 消息配置文件");
|
||||
L.add("# ==========================================");
|
||||
L.add("# 颜色代码使用 § 符号");
|
||||
L.add("# §0黑色 §1深蓝 §2深绿 §3深青");
|
||||
L.add("# §4深红 §5深紫 §6金色 §7灰色");
|
||||
L.add("# §8深灰 §9蓝色 §a绿色 §b浅蓝");
|
||||
L.add("# §c红色 §d粉色 §e黄色 §f白色");
|
||||
L.add("# §l粗体 §n下划线 §o斜体 §r重置");
|
||||
L.add("#");
|
||||
L.add("# 占位符用 {xxx} 表示,运行时自动替换");
|
||||
L.add("# 支持 <b>粗体</b> 标签");
|
||||
L.add("# 支持 \\n 或 <br> 换行");
|
||||
L.add("# 修改后执行 /sdf1_login reload 重载");
|
||||
L.add("# ==========================================");
|
||||
L.add("");
|
||||
|
||||
// --- 登录/注册 ---
|
||||
L.add("# ---- 登录注册相关 ----");
|
||||
L.add("# login_timeout: 登录超时被踢出时的提示");
|
||||
L.add("login_timeout=§c登录超时,请重新登录");
|
||||
L.add("# not_registered: 未注册玩家收到的提示");
|
||||
L.add("not_registered=§e您尚未注册,请使用 /reg <密码>");
|
||||
L.add("# not_logged_in: 已注册但未登录的提示");
|
||||
L.add("not_logged_in=§e您尚未登录,请使用 /login <密码>");
|
||||
L.add("# already_registered: 已注册玩家再次注册时的提示");
|
||||
L.add("already_registered=§c您已注册过账号");
|
||||
L.add("# already_logged_in: 已登录玩家再次登录时的提示");
|
||||
L.add("already_logged_in=§c您已登录");
|
||||
L.add("# reg_success: 注册成功提示");
|
||||
L.add("reg_success=§a注册成功!欢迎来到服务器");
|
||||
L.add("# login_success: 登录成功提示");
|
||||
L.add("login_success=§a登录成功!");
|
||||
L.add("# login_failed: 密码错误提示");
|
||||
L.add("login_failed=§c密码错误,请重试");
|
||||
L.add("");
|
||||
|
||||
// --- 密码 ---
|
||||
L.add("# ---- 密码相关 ----");
|
||||
L.add("# password_wrong: 旧密码验证失败");
|
||||
L.add("password_wrong=§c密码错误");
|
||||
L.add("# password_changed: 密码修改成功");
|
||||
L.add("password_changed=§a密码修改成功!");
|
||||
L.add("# password_format_error: 密码格式不符合要求");
|
||||
L.add("password_format_error=§c密码需6位以上,含大小写字母和数字");
|
||||
L.add("# password_same: 新密码与旧密码相同");
|
||||
L.add("password_same=§c新密码不能与旧密码相同");
|
||||
L.add("# reset_no_email: 找回密码时未绑定邮箱");
|
||||
L.add("reset_no_email=§c您未绑定邮箱,无法找回密码");
|
||||
L.add("# reset_sent: 临时密码已发送到邮箱");
|
||||
L.add("reset_sent=§a临时密码已发送到您的邮箱,请查收");
|
||||
L.add("");
|
||||
|
||||
// --- 签到积分 ---
|
||||
L.add("# ---- 签到积分相关 ----");
|
||||
L.add("# checkin_already: 今日已签到");
|
||||
L.add("checkin_already=§c您今日已签到");
|
||||
L.add("# checkin_success: 签到成功,{points}=获得积分 {streak}=连续天数 {multi}=倍率");
|
||||
L.add("checkin_success=§a签到成功!获得 {points} 积分,连续 {streak} 天,倍率 x{multi}");
|
||||
L.add("# points_insufficient: 积分不足");
|
||||
L.add("points_insufficient=§c积分不足,当前: {points}");
|
||||
L.add("# points_purchase_success: 积分购买成功");
|
||||
L.add("points_purchase_success=§a购买成功!消耗 {count} 积分");
|
||||
L.add("");
|
||||
|
||||
// --- 挂机 ---
|
||||
L.add("# ---- 挂机检测相关 ----");
|
||||
L.add("# afk_set_enabled: 挂机检测开启");
|
||||
L.add("afk_set_enabled=§a挂机检测已开启");
|
||||
L.add("# afk_set_disabled: 挂机检测关闭");
|
||||
L.add("afk_set_disabled=§c挂机检测已关闭");
|
||||
L.add("# afk_kick: 因挂机被踢出");
|
||||
L.add("afk_kick=§c因挂机过久被踢出");
|
||||
L.add("");
|
||||
|
||||
// --- 邮箱 ---
|
||||
L.add("# ---- 邮箱相关 ----");
|
||||
L.add("# email_set: 邮箱设置成功");
|
||||
L.add("email_set=§a邮箱设置成功:{email}");
|
||||
L.add("# email_format_error: 邮箱格式错误");
|
||||
L.add("email_format_error=§c邮箱格式不正确");
|
||||
L.add("");
|
||||
|
||||
// --- 邀请 ---
|
||||
L.add("# ---- 邀请相关 ----");
|
||||
L.add("# invite_code_generated: 邀请码生成");
|
||||
L.add("invite_code_generated=§a邀请码:{code}");
|
||||
L.add("# invite_used: 使用邀请码成功");
|
||||
L.add("invite_used=§a邀请成功,邀请人:{player}");
|
||||
L.add("# invite_self: 使用自己的邀请码");
|
||||
L.add("invite_self=§c不能使用自己的邀请码");
|
||||
L.add("# invite_not_found: 邀请码不存在");
|
||||
L.add("invite_not_found=§c邀请码不存在");
|
||||
L.add("# invite_referral_bonus: 被邀请人签到后邀请人获得奖励");
|
||||
L.add("invite_referral_bonus=§a邀请奖励!获得 {points} 积分");
|
||||
L.add("");
|
||||
|
||||
// --- 礼包 ---
|
||||
L.add("# ---- 新人礼包相关 ----");
|
||||
L.add("# gift_not_ready: 礼包条件未满足");
|
||||
L.add("gift_not_ready=§c礼包条件未满足");
|
||||
L.add("# gift_claimed: 礼包领取成功");
|
||||
L.add("gift_claimed=§a礼包领取成功!");
|
||||
L.add("");
|
||||
|
||||
// --- 审批/IP ---
|
||||
L.add("# ---- 审批与IP限制 ----");
|
||||
L.add("# need_approval: 注册需审批");
|
||||
L.add("need_approval=§e注册需审批 (工单#{id})");
|
||||
L.add("# ip_max_accounts: IP注册已达上限");
|
||||
L.add("ip_max_accounts=§cIP注册已达上限");
|
||||
L.add("");
|
||||
|
||||
// --- 管理员 ---
|
||||
L.add("# ---- 管理员操作 ----");
|
||||
L.add("# admin_delete_confirm: 管理员删除账号确认提示");
|
||||
L.add("admin_delete_confirm=§c请在聊天中输入玩家名确认删除");
|
||||
L.add("");
|
||||
|
||||
// --- 聊天过滤 ---
|
||||
L.add("# ---- 聊天过滤 ----");
|
||||
L.add("# chat_muted: 禁言玩家尝试聊天");
|
||||
L.add("chat_muted=§c§l[Sdf1_chat] §f你已被禁言,无法聊天");
|
||||
L.add("# chat_url_blocked: 发送违规链接被拦截");
|
||||
L.add("# {url}=检测到的链接地址");
|
||||
L.add("chat_url_blocked=§c§l[Sdf1_chat] §f检测到违规第三方链接: §e{url}");
|
||||
L.add("# chat_url_violation: 当前违规次数");
|
||||
L.add("# {count}=当前违规次数");
|
||||
L.add("chat_url_violation=§7当前违规次数: §e{count}");
|
||||
L.add("# chat_url_admin_notify: 通知管理员,{player}=玩家名 {url}=链接 {count}=次数");
|
||||
L.add("chat_url_admin_notify=§e§l[Sdf1_chat] §f{player} 发送违规链接: {url} (第{count}次)");
|
||||
L.add("# chat_url_broadcast: 全服通报,{player}=玩家名");
|
||||
L.add("chat_url_broadcast=§c§l[Sdf1_chat] §e{player} §f因发送违规链接被处罚");
|
||||
L.add("");
|
||||
|
||||
// --- 通用 ---
|
||||
L.add("# ---- 通用 ----");
|
||||
L.add("# 未知参数: 未知命令或权限不足时的提示");
|
||||
L.add("未知参数=§c未知参数或权限不足");
|
||||
L.add("# only_player: 仅玩家可用的命令");
|
||||
L.add("# only_player=§c此命令仅玩家可用");
|
||||
|
||||
writeLines(f, L);
|
||||
}
|
||||
|
||||
|
||||
// ==================== SMTP ====================
|
||||
|
||||
public void loadSmtp() {
|
||||
smtpSettings.clear();
|
||||
File file = new File(dataFolder, "SMTP设置.txt");
|
||||
if (!file.exists()) createDefaultSmtp(file);
|
||||
loadMap(file, smtpSettings);
|
||||
}
|
||||
private double parseDouble(String s, double def) {
|
||||
try { return Double.parseDouble(s.trim()); }
|
||||
catch (Exception e) { return def; }
|
||||
}
|
||||
|
||||
public String getSmtp(String key) {
|
||||
return smtpSettings.getOrDefault(key, "");
|
||||
}
|
||||
/** 获取挂机白名单列表 */
|
||||
public List<String> getAfkWhitelist() {
|
||||
List<String> list = new ArrayList<>();
|
||||
File file = new File(dataFolder, "挂机白名单.txt");
|
||||
if (!file.exists()) {
|
||||
try {
|
||||
file.createNewFile();
|
||||
try (BufferedWriter w = new BufferedWriter(
|
||||
new OutputStreamWriter(
|
||||
new FileOutputStream(file),
|
||||
StandardCharsets.UTF_8))) {
|
||||
w.write("# 每行一个玩家名,前面加 # 为注释");
|
||||
w.newLine();
|
||||
w.write("# 以下玩家不会被挂机踢出");
|
||||
w.newLine();
|
||||
}
|
||||
} catch (IOException ignored) {}
|
||||
}
|
||||
try (BufferedReader r = new BufferedReader(
|
||||
new InputStreamReader(
|
||||
new FileInputStream(file),
|
||||
StandardCharsets.UTF_8))) {
|
||||
String line;
|
||||
while ((line = r.readLine()) != null) {
|
||||
line = line.trim();
|
||||
if (!line.isEmpty() && !line.startsWith("#")) {
|
||||
list.add(line);
|
||||
}
|
||||
}
|
||||
} catch (IOException ignored) {}
|
||||
return list;
|
||||
}
|
||||
|
||||
/** 设置SMTP单项(聊天输入用) */
|
||||
public void setSmtp(String key, String value) {
|
||||
smtpSettings.put(key, value);
|
||||
}
|
||||
|
||||
/** 将当前SMTP设置写回文件 */
|
||||
public void saveSmtp() {
|
||||
File file = new File(dataFolder, "SMTP设置.txt");
|
||||
List<String> L = new ArrayList<>();
|
||||
L.add("# ===== SMTP 邮件服务器配置 =====");
|
||||
for (Map.Entry<String, String> e : smtpSettings.entrySet()) {
|
||||
L.add(e.getKey() + "=" + e.getValue());
|
||||
}
|
||||
writeLines(file, L);
|
||||
}
|
||||
|
||||
private void createDefaultSmtp(File f) {
|
||||
List<String> L = new ArrayList<>();
|
||||
L.add("# ===== SMTP 邮件服务器配置 =====");
|
||||
L.add("smtp地址=smtp.example.com");
|
||||
L.add("smtp端口=465");
|
||||
L.add("smtp账号=your_email@example.com");
|
||||
L.add("smtp密码=");
|
||||
L.add("发件人名称=Sdf1_login");
|
||||
L.add("smtp加密=true");
|
||||
writeLines(f, L);
|
||||
}
|
||||
|
||||
// ==================== 插件设置 ====================
|
||||
|
||||
public void loadSettings() {
|
||||
File file = new File(dataFolder, "插件设置.txt");
|
||||
if (!file.exists()) createDefaultSettings(file);
|
||||
Map<String, String> m = new LinkedHashMap<>();
|
||||
loadMap(file, m);
|
||||
adminTag = m.getOrDefault("管理标签", adminTag);
|
||||
adminPassword = m.getOrDefault("管理密码", adminPassword);
|
||||
maxAccountsPerIP = parseInt(
|
||||
m.getOrDefault("每IP最大账号数", "3"), 3);
|
||||
approvalMode = m.getOrDefault("审批模式", approvalMode);
|
||||
autoApproveDelayMinutes = parseInt(
|
||||
m.getOrDefault("自动审批延迟分钟", "30"), 30);
|
||||
loginTimeout = parseInt(
|
||||
m.getOrDefault("登录超时秒数", "60"), 60);
|
||||
afkEnabled = Boolean.parseBoolean(
|
||||
m.getOrDefault("挂机踢出", "false"));
|
||||
afkTimeout = parseInt(
|
||||
m.getOrDefault("挂机超时秒数", "300"), 300);
|
||||
smtpSsl = Boolean.parseBoolean(
|
||||
m.getOrDefault("smtp加密", "true"));
|
||||
providerPointsPerScore = parseDouble(
|
||||
m.getOrDefault("服务商积分倍率", "2.0"),
|
||||
2.0);
|
||||
baseEconomyReward = parseInt(
|
||||
m.getOrDefault("基础经济奖励", "100"),
|
||||
100);
|
||||
providerEconomyPerScore = parseDouble(
|
||||
m.getOrDefault("经济奖励每评分", "50.0"),
|
||||
50.0);
|
||||
requesterPointsReward = parseInt(
|
||||
m.getOrDefault("报单人积分奖励", "10"),
|
||||
10);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void saveSettings() {
|
||||
File file = new File(dataFolder, "插件设置.txt");
|
||||
List<String> L = new ArrayList<>();
|
||||
L.add("# ===== Sdf1_login 插件设置 =====");
|
||||
L.add("管理标签=" + adminTag);
|
||||
L.add("管理密码=" + adminPassword);
|
||||
L.add("每IP最大账号数=" + maxAccountsPerIP);
|
||||
L.add("审批模式=" + approvalMode);
|
||||
L.add("自动审批延迟分钟=" + autoApproveDelayMinutes);
|
||||
L.add("登录超时秒数=" + loginTimeout);
|
||||
L.add("挂机踢出=" + afkEnabled);
|
||||
L.add("挂机超时秒数=" + afkTimeout);
|
||||
// 垃圾站设置
|
||||
L.add("# ---- 垃圾站 ----");
|
||||
L.add("垃圾站_启用: "
|
||||
+ garbageEnabled);
|
||||
L.add("垃圾站_清理间隔秒: "
|
||||
+ garbageInterval);
|
||||
L.add("垃圾站_保留轮数: "
|
||||
+ garbageMaxRounds);
|
||||
|
||||
writeLines(file, L);
|
||||
}
|
||||
public double providerPointsPerScore = 2.0;
|
||||
public int baseEconomyReward = 100;
|
||||
public double providerEconomyPerScore = 50.0;
|
||||
public int requesterPointsReward = 10;
|
||||
public boolean garbageEnabled = true;
|
||||
public int garbageInterval = 300;
|
||||
public int garbageMaxRounds = 1;
|
||||
|
||||
|
||||
private void createDefaultSettings(File f) {
|
||||
List<String> L = new ArrayList<>();
|
||||
L.add("# ===== Sdf1_login 插件设置 =====");
|
||||
L.add("管理标签=admin");
|
||||
L.add("管理密码=qweasd");
|
||||
L.add("每IP最大账号数=3");
|
||||
L.add("审批模式=manual");
|
||||
L.add("自动审批延迟分钟=30");
|
||||
L.add("登录超时秒数=60");
|
||||
L.add("挂机踢出=false");
|
||||
L.add("挂机超时秒数=300");
|
||||
L.add("服务商积分倍率=" + providerPointsPerScore);
|
||||
L.add("基础经济奖励=" + baseEconomyReward);
|
||||
L.add("经济奖励每评分=" + providerEconomyPerScore);
|
||||
L.add("报单人积分奖励=" + requesterPointsReward);
|
||||
|
||||
writeLines(f, L);
|
||||
}
|
||||
|
||||
// ==================== 通用读写 ====================
|
||||
|
||||
private void loadMap(File file, Map<String, String> map) {
|
||||
try (BufferedReader r = new BufferedReader(
|
||||
new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8))) {
|
||||
String line;
|
||||
while ((line = r.readLine()) != null) {
|
||||
line = line.trim();
|
||||
if (line.isEmpty() || line.startsWith("#")) continue;
|
||||
int eq = line.indexOf('=');
|
||||
if (eq > 0) map.put(line.substring(0, eq).trim(), line.substring(eq + 1).trim());
|
||||
}
|
||||
} catch (IOException e) {
|
||||
System.err.println("[Sdf1_login] 读取失败: " + file.getName());
|
||||
}
|
||||
}
|
||||
|
||||
private void writeLines(File file, List<String> lines) {
|
||||
try (BufferedWriter w = new BufferedWriter(
|
||||
new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8))) {
|
||||
for (String l : lines) { w.write(l); w.newLine(); }
|
||||
} catch (IOException e) {
|
||||
System.err.println("[Sdf1_login] 写入失败: " + file.getName());
|
||||
}
|
||||
}
|
||||
|
||||
private int parseInt(String s, int def) {
|
||||
try { return Integer.parseInt(s.trim()); } catch (Exception e) { return def; }
|
||||
}
|
||||
/**
|
||||
* 生成6位验证码(字母+数字)
|
||||
*/
|
||||
public String generateSmtpVerifyCode() {
|
||||
String chars =
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||
+ "abcdefghijklmnopqrstuvwxyz"
|
||||
+ "0123456789";
|
||||
StringBuilder sb = new StringBuilder();
|
||||
java.util.Random r = new java.util.Random();
|
||||
for (int i = 0; i < 6; i++) {
|
||||
sb.append(chars.charAt(r.nextInt(
|
||||
chars.length())));
|
||||
}
|
||||
smtpVerifyCode = sb.toString();
|
||||
smtpVerifyExpire =
|
||||
System.currentTimeMillis() + 300000L;
|
||||
return smtpVerifyCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查验证码是否有效
|
||||
*/
|
||||
public boolean checkSmtpVerifyCode(String code) {
|
||||
if (System.currentTimeMillis() > smtpVerifyExpire) {
|
||||
smtpVerifyCode = "";
|
||||
return false;
|
||||
}
|
||||
return smtpVerifyCode.equalsIgnoreCase(code);
|
||||
}
|
||||
|
||||
/**
|
||||
* 清除验证码
|
||||
*/
|
||||
public void clearSmtpVerifyCode() {
|
||||
smtpVerifyCode = "";
|
||||
smtpVerifyExpire = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查发送间隔是否>=1分钟
|
||||
*/
|
||||
public boolean canSendSmtpVerify() {
|
||||
return System.currentTimeMillis()
|
||||
- smtpLastSendTime >= 60000L;
|
||||
}
|
||||
|
||||
public void recordSmtpSendTime() {
|
||||
smtpLastSendTime = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
}
|
||||
package Sdf1_login;
|
||||
|
||||
import java.io.*;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.*;
|
||||
|
||||
import static java.lang.Double.parseDouble;
|
||||
|
||||
public class ConfigManager {
|
||||
|
||||
private final File dataFolder;
|
||||
private final Map<String, String> messages = new LinkedHashMap<>();
|
||||
private final Map<String, String> smtpSettings = new LinkedHashMap<>();
|
||||
|
||||
public String adminTag = "admin";
|
||||
public String adminPassword = "qweasd";
|
||||
public int maxAccountsPerIP = 3;
|
||||
public String approvalMode = "manual";
|
||||
public int autoApproveDelayMinutes = 30;
|
||||
public int loginTimeout = 60;
|
||||
public boolean afkEnabled = false;
|
||||
public int afkTimeout = 300;
|
||||
public boolean smtpSsl = true;
|
||||
public String smtpVerifyCode = "";
|
||||
public long smtpVerifyExpire = 0;
|
||||
public long smtpLastSendTime = 0;
|
||||
public String smtpConfiguringPlayer = "";
|
||||
|
||||
|
||||
public ConfigManager(File dataFolder) {
|
||||
this.dataFolder = dataFolder;
|
||||
}
|
||||
|
||||
// ==================== 消息 ====================
|
||||
|
||||
public void loadMessages() {
|
||||
messages.clear();
|
||||
File file = new File(dataFolder, "消息.txt");
|
||||
if (!file.exists()) createDefaultMessages(file);
|
||||
loadMap(file, messages);
|
||||
}
|
||||
|
||||
public String msg(String key) {
|
||||
String val = messages.getOrDefault(key, key);
|
||||
val = val.replace("<b>", "&l");
|
||||
val = val.replace("</b>", "&r");
|
||||
val = val.replace("<br>", "\n");
|
||||
val = val.replace("\\n", "\n");
|
||||
// &颜色码 转换为 §颜色码
|
||||
val = val.replaceAll(
|
||||
"&([0-9a-fk-orA-FK-OR])", "§$1");
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
private void createDefaultMessages(File f) {
|
||||
List<String> L = new ArrayList<>();
|
||||
L.add("# ==========================================");
|
||||
L.add("# Sdf1_login 消息配置文件");
|
||||
L.add("# ==========================================");
|
||||
L.add("# 颜色代码使用 § 符号");
|
||||
L.add("# §0黑色 §1深蓝 §2深绿 §3深青");
|
||||
L.add("# §4深红 §5深紫 §6金色 §7灰色");
|
||||
L.add("# §8深灰 §9蓝色 §a绿色 §b浅蓝");
|
||||
L.add("# §c红色 §d粉色 §e黄色 §f白色");
|
||||
L.add("# §l粗体 §n下划线 §o斜体 §r重置");
|
||||
L.add("#");
|
||||
L.add("# 占位符用 {xxx} 表示,运行时自动替换");
|
||||
L.add("# 支持 <b>粗体</b> 标签");
|
||||
L.add("# 支持 \\n 或 <br> 换行");
|
||||
L.add("# 修改后执行 /sdf1_login reload 重载");
|
||||
L.add("# ==========================================");
|
||||
L.add("");
|
||||
|
||||
// --- 登录/注册 ---
|
||||
L.add("# ---- 登录注册相关 ----");
|
||||
L.add("# login_timeout: 登录超时被踢出时的提示");
|
||||
L.add("login_timeout=§c登录超时,请重新登录");
|
||||
L.add("# not_registered: 未注册玩家收到的提示");
|
||||
L.add("not_registered=§e您尚未注册,请使用 /reg <密码>");
|
||||
L.add("# not_logged_in: 已注册但未登录的提示");
|
||||
L.add("not_logged_in=§e您尚未登录,请使用 /login <密码>");
|
||||
L.add("# already_registered: 已注册玩家再次注册时的提示");
|
||||
L.add("already_registered=§c您已注册过账号");
|
||||
L.add("# already_logged_in: 已登录玩家再次登录时的提示");
|
||||
L.add("already_logged_in=§c您已登录");
|
||||
L.add("# reg_success: 注册成功提示");
|
||||
L.add("reg_success=§a注册成功!欢迎来到服务器");
|
||||
L.add("# login_success: 登录成功提示");
|
||||
L.add("login_success=§a登录成功!");
|
||||
L.add("# login_failed: 密码错误提示");
|
||||
L.add("login_failed=§c密码错误,请重试");
|
||||
L.add("");
|
||||
|
||||
// --- 密码 ---
|
||||
L.add("# ---- 密码相关 ----");
|
||||
L.add("# password_wrong: 旧密码验证失败");
|
||||
L.add("password_wrong=§c密码错误");
|
||||
L.add("# password_changed: 密码修改成功");
|
||||
L.add("password_changed=§a密码修改成功!");
|
||||
L.add("# password_format_error: 密码格式不符合要求");
|
||||
L.add("password_format_error=§c密码需6位以上,含大小写字母和数字");
|
||||
L.add("# password_same: 新密码与旧密码相同");
|
||||
L.add("password_same=§c新密码不能与旧密码相同");
|
||||
L.add("# reset_no_email: 找回密码时未绑定邮箱");
|
||||
L.add("reset_no_email=§c您未绑定邮箱,无法找回密码");
|
||||
L.add("# reset_sent: 临时密码已发送到邮箱");
|
||||
L.add("reset_sent=§a临时密码已发送到您的邮箱,请查收");
|
||||
L.add("");
|
||||
|
||||
// --- 签到积分 ---
|
||||
L.add("# ---- 签到积分相关 ----");
|
||||
L.add("# checkin_already: 今日已签到");
|
||||
L.add("checkin_already=§c您今日已签到");
|
||||
L.add("# checkin_success: 签到成功,{points}=获得积分 {streak}=连续天数 {multi}=倍率");
|
||||
L.add("checkin_success=§a签到成功!获得 {points} 积分,连续 {streak} 天,倍率 x{multi}");
|
||||
L.add("# points_insufficient: 积分不足");
|
||||
L.add("points_insufficient=§c积分不足,当前: {points}");
|
||||
L.add("# points_purchase_success: 积分购买成功");
|
||||
L.add("points_purchase_success=§a购买成功!消耗 {count} 积分");
|
||||
L.add("");
|
||||
|
||||
// --- 挂机 ---
|
||||
L.add("# ---- 挂机检测相关 ----");
|
||||
L.add("# afk_set_enabled: 挂机检测开启");
|
||||
L.add("afk_set_enabled=§a挂机检测已开启");
|
||||
L.add("# afk_set_disabled: 挂机检测关闭");
|
||||
L.add("afk_set_disabled=§c挂机检测已关闭");
|
||||
L.add("# afk_kick: 因挂机被踢出");
|
||||
L.add("afk_kick=§c因挂机过久被踢出");
|
||||
L.add("");
|
||||
|
||||
// --- 邮箱 ---
|
||||
L.add("# ---- 邮箱相关 ----");
|
||||
L.add("# email_set: 邮箱设置成功");
|
||||
L.add("email_set=§a邮箱设置成功:{email}");
|
||||
L.add("# email_format_error: 邮箱格式错误");
|
||||
L.add("email_format_error=§c邮箱格式不正确");
|
||||
L.add("");
|
||||
|
||||
// --- 邀请 ---
|
||||
L.add("# ---- 邀请相关 ----");
|
||||
L.add("# invite_code_generated: 邀请码生成");
|
||||
L.add("invite_code_generated=§a邀请码:{code}");
|
||||
L.add("# invite_used: 使用邀请码成功");
|
||||
L.add("invite_used=§a邀请成功,邀请人:{player}");
|
||||
L.add("# invite_self: 使用自己的邀请码");
|
||||
L.add("invite_self=§c不能使用自己的邀请码");
|
||||
L.add("# invite_not_found: 邀请码不存在");
|
||||
L.add("invite_not_found=§c邀请码不存在");
|
||||
L.add("# invite_referral_bonus: 被邀请人签到后邀请人获得奖励");
|
||||
L.add("invite_referral_bonus=§a邀请奖励!获得 {points} 积分");
|
||||
L.add("");
|
||||
|
||||
// --- 礼包 ---
|
||||
L.add("# ---- 新人礼包相关 ----");
|
||||
L.add("# gift_not_ready: 礼包条件未满足");
|
||||
L.add("gift_not_ready=§c礼包条件未满足");
|
||||
L.add("# gift_claimed: 礼包领取成功");
|
||||
L.add("gift_claimed=§a礼包领取成功!");
|
||||
L.add("");
|
||||
|
||||
// --- 审批/IP ---
|
||||
L.add("# ---- 审批与IP限制 ----");
|
||||
L.add("# need_approval: 注册需审批");
|
||||
L.add("need_approval=§e注册需审批 (工单#{id})");
|
||||
L.add("# ip_max_accounts: IP注册已达上限");
|
||||
L.add("ip_max_accounts=§cIP注册已达上限");
|
||||
L.add("");
|
||||
|
||||
// --- 管理员 ---
|
||||
L.add("# ---- 管理员操作 ----");
|
||||
L.add("# admin_delete_confirm: 管理员删除账号确认提示");
|
||||
L.add("admin_delete_confirm=§c请在聊天中输入玩家名确认删除");
|
||||
L.add("");
|
||||
|
||||
// --- 聊天过滤 ---
|
||||
L.add("# ---- 聊天过滤 ----");
|
||||
L.add("# chat_muted: 禁言玩家尝试聊天");
|
||||
L.add("chat_muted=§c§l[Sdf1_chat] §f你已被禁言,无法聊天");
|
||||
L.add("# chat_url_blocked: 发送违规链接被拦截");
|
||||
L.add("# {url}=检测到的链接地址");
|
||||
L.add("chat_url_blocked=§c§l[Sdf1_chat] §f检测到违规第三方链接: §e{url}");
|
||||
L.add("# chat_url_violation: 当前违规次数");
|
||||
L.add("# {count}=当前违规次数");
|
||||
L.add("chat_url_violation=§7当前违规次数: §e{count}");
|
||||
L.add("# chat_url_admin_notify: 通知管理员,{player}=玩家名 {url}=链接 {count}=次数");
|
||||
L.add("chat_url_admin_notify=§e§l[Sdf1_chat] §f{player} 发送违规链接: {url} (第{count}次)");
|
||||
L.add("# chat_url_broadcast: 全服通报,{player}=玩家名");
|
||||
L.add("chat_url_broadcast=§c§l[Sdf1_chat] §e{player} §f因发送违规链接被处罚");
|
||||
L.add("");
|
||||
|
||||
// --- 通用 ---
|
||||
L.add("# ---- 通用 ----");
|
||||
L.add("# 未知参数: 未知命令或权限不足时的提示");
|
||||
L.add("未知参数=§c未知参数或权限不足");
|
||||
L.add("# only_player: 仅玩家可用的命令");
|
||||
L.add("# only_player=§c此命令仅玩家可用");
|
||||
|
||||
writeLines(f, L);
|
||||
}
|
||||
|
||||
|
||||
// ==================== SMTP ====================
|
||||
|
||||
public void loadSmtp() {
|
||||
smtpSettings.clear();
|
||||
File file = new File(dataFolder, "SMTP设置.txt");
|
||||
if (!file.exists()) createDefaultSmtp(file);
|
||||
loadMap(file, smtpSettings);
|
||||
}
|
||||
private double parseDouble(String s, double def) {
|
||||
try { return Double.parseDouble(s.trim()); }
|
||||
catch (Exception e) { return def; }
|
||||
}
|
||||
|
||||
public String getSmtp(String key) {
|
||||
return smtpSettings.getOrDefault(key, "");
|
||||
}
|
||||
/** 获取挂机白名单列表 */
|
||||
public List<String> getAfkWhitelist() {
|
||||
List<String> list = new ArrayList<>();
|
||||
File file = new File(dataFolder, "挂机白名单.txt");
|
||||
if (!file.exists()) {
|
||||
try {
|
||||
file.createNewFile();
|
||||
try (BufferedWriter w = new BufferedWriter(
|
||||
new OutputStreamWriter(
|
||||
new FileOutputStream(file),
|
||||
StandardCharsets.UTF_8))) {
|
||||
w.write("# 每行一个玩家名,前面加 # 为注释");
|
||||
w.newLine();
|
||||
w.write("# 以下玩家不会被挂机踢出");
|
||||
w.newLine();
|
||||
}
|
||||
} catch (IOException ignored) {}
|
||||
}
|
||||
try (BufferedReader r = new BufferedReader(
|
||||
new InputStreamReader(
|
||||
new FileInputStream(file),
|
||||
StandardCharsets.UTF_8))) {
|
||||
String line;
|
||||
while ((line = r.readLine()) != null) {
|
||||
line = line.trim();
|
||||
if (!line.isEmpty() && !line.startsWith("#")) {
|
||||
list.add(line);
|
||||
}
|
||||
}
|
||||
} catch (IOException ignored) {}
|
||||
return list;
|
||||
}
|
||||
|
||||
/** 设置SMTP单项(聊天输入用) */
|
||||
public void setSmtp(String key, String value) {
|
||||
smtpSettings.put(key, value);
|
||||
}
|
||||
|
||||
/** 将当前SMTP设置写回文件 */
|
||||
public void saveSmtp() {
|
||||
File file = new File(dataFolder, "SMTP设置.txt");
|
||||
List<String> L = new ArrayList<>();
|
||||
L.add("# ===== SMTP 邮件服务器配置 =====");
|
||||
for (Map.Entry<String, String> e : smtpSettings.entrySet()) {
|
||||
L.add(e.getKey() + "=" + e.getValue());
|
||||
}
|
||||
writeLines(file, L);
|
||||
}
|
||||
|
||||
private void createDefaultSmtp(File f) {
|
||||
List<String> L = new ArrayList<>();
|
||||
L.add("# ===== SMTP 邮件服务器配置 =====");
|
||||
L.add("smtp地址=smtp.example.com");
|
||||
L.add("smtp端口=465");
|
||||
L.add("smtp账号=your_email@example.com");
|
||||
L.add("smtp密码=");
|
||||
L.add("发件人名称=Sdf1_login");
|
||||
L.add("smtp加密=true");
|
||||
writeLines(f, L);
|
||||
}
|
||||
|
||||
// ==================== 插件设置 ====================
|
||||
|
||||
public void loadSettings() {
|
||||
File file = new File(dataFolder, "插件设置.txt");
|
||||
if (!file.exists()) createDefaultSettings(file);
|
||||
Map<String, String> m = new LinkedHashMap<>();
|
||||
loadMap(file, m);
|
||||
adminTag = m.getOrDefault("管理标签", adminTag);
|
||||
adminPassword = m.getOrDefault("管理密码", adminPassword);
|
||||
maxAccountsPerIP = parseInt(
|
||||
m.getOrDefault("每IP最大账号数", "3"), 3);
|
||||
approvalMode = m.getOrDefault("审批模式", approvalMode);
|
||||
autoApproveDelayMinutes = parseInt(
|
||||
m.getOrDefault("自动审批延迟分钟", "30"), 30);
|
||||
loginTimeout = parseInt(
|
||||
m.getOrDefault("登录超时秒数", "60"), 60);
|
||||
afkEnabled = Boolean.parseBoolean(
|
||||
m.getOrDefault("挂机踢出", "false"));
|
||||
afkTimeout = parseInt(
|
||||
m.getOrDefault("挂机超时秒数", "300"), 300);
|
||||
smtpSsl = Boolean.parseBoolean(
|
||||
m.getOrDefault("smtp加密", "true"));
|
||||
providerPointsPerScore = parseDouble(
|
||||
m.getOrDefault("服务商积分倍率", "2.0"),
|
||||
2.0);
|
||||
baseEconomyReward = parseInt(
|
||||
m.getOrDefault("基础经济奖励", "100"),
|
||||
100);
|
||||
providerEconomyPerScore = parseDouble(
|
||||
m.getOrDefault("经济奖励每评分", "50.0"),
|
||||
50.0);
|
||||
requesterPointsReward = parseInt(
|
||||
m.getOrDefault("报单人积分奖励", "10"),
|
||||
10);
|
||||
garbageEnabled = Boolean.parseBoolean(
|
||||
m.getOrDefault("垃圾站_启用", "true"));
|
||||
garbageInterval = parseInt(
|
||||
m.getOrDefault("垃圾站_清理间隔秒",
|
||||
"300"), 300);
|
||||
garbageMaxRounds = parseInt(
|
||||
m.getOrDefault("垃圾站_保留轮数",
|
||||
"1"), 1);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void saveSettings() {
|
||||
File file = new File(dataFolder, "插件设置.txt");
|
||||
List<String> L = new ArrayList<>();
|
||||
L.add("# ===== Sdf1_login 插件设置 =====");
|
||||
L.add("管理标签=" + adminTag);
|
||||
L.add("管理密码=" + adminPassword);
|
||||
L.add("每IP最大账号数=" + maxAccountsPerIP);
|
||||
L.add("审批模式=" + approvalMode);
|
||||
L.add("自动审批延迟分钟=" + autoApproveDelayMinutes);
|
||||
L.add("登录超时秒数=" + loginTimeout);
|
||||
L.add("挂机踢出=" + afkEnabled);
|
||||
L.add("挂机超时秒数=" + afkTimeout);
|
||||
// 垃圾站设置
|
||||
L.add("# ---- 垃圾站 ----");
|
||||
L.add("垃圾站_启用=" + garbageEnabled);
|
||||
L.add("垃圾站_清理间隔秒=" + garbageInterval);
|
||||
L.add("垃圾站_保留轮数=" + garbageMaxRounds);
|
||||
|
||||
|
||||
writeLines(file, L);
|
||||
}
|
||||
public double providerPointsPerScore = 2.0;
|
||||
public int baseEconomyReward = 100;
|
||||
public double providerEconomyPerScore = 50.0;
|
||||
public int requesterPointsReward = 10;
|
||||
public boolean garbageEnabled = true;
|
||||
public int garbageInterval = 300;
|
||||
public int garbageMaxRounds = 1;
|
||||
|
||||
|
||||
private void createDefaultSettings(File f) {
|
||||
List<String> L = new ArrayList<>();
|
||||
L.add("# ===== Sdf1_login 插件设置 =====");
|
||||
L.add("管理标签=admin");
|
||||
L.add("管理密码=qweasd");
|
||||
L.add("每IP最大账号数=3");
|
||||
L.add("审批模式=manual");
|
||||
L.add("自动审批延迟分钟=30");
|
||||
L.add("登录超时秒数=60");
|
||||
L.add("挂机踢出=false");
|
||||
L.add("挂机超时秒数=300");
|
||||
L.add("服务商积分倍率=" + providerPointsPerScore);
|
||||
L.add("基础经济奖励=" + baseEconomyReward);
|
||||
L.add("经济奖励每评分=" + providerEconomyPerScore);
|
||||
L.add("报单人积分奖励=" + requesterPointsReward);
|
||||
L.add("# ---- 垃圾站 ----");
|
||||
L.add("垃圾站_启用=true");
|
||||
L.add("垃圾站_清理间隔秒=300");
|
||||
L.add("垃圾站_保留轮数=1");
|
||||
|
||||
|
||||
writeLines(f, L);
|
||||
}
|
||||
|
||||
// ==================== 通用读写 ====================
|
||||
|
||||
private void loadMap(File file, Map<String, String> map) {
|
||||
try (BufferedReader r = new BufferedReader(
|
||||
new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8))) {
|
||||
String line;
|
||||
while ((line = r.readLine()) != null) {
|
||||
line = line.trim();
|
||||
if (line.isEmpty() || line.startsWith("#")) continue;
|
||||
int eq = line.indexOf('=');
|
||||
if (eq > 0) map.put(line.substring(0, eq).trim(), line.substring(eq + 1).trim());
|
||||
}
|
||||
} catch (IOException e) {
|
||||
System.err.println("[Sdf1_login] 读取失败: " + file.getName());
|
||||
}
|
||||
}
|
||||
|
||||
private void writeLines(File file, List<String> lines) {
|
||||
try (BufferedWriter w = new BufferedWriter(
|
||||
new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8))) {
|
||||
for (String l : lines) { w.write(l); w.newLine(); }
|
||||
} catch (IOException e) {
|
||||
System.err.println("[Sdf1_login] 写入失败: " + file.getName());
|
||||
}
|
||||
}
|
||||
|
||||
private int parseInt(String s, int def) {
|
||||
try { return Integer.parseInt(s.trim()); } catch (Exception e) { return def; }
|
||||
}
|
||||
/**
|
||||
* 生成6位验证码(字母+数字)
|
||||
*/
|
||||
public String generateSmtpVerifyCode() {
|
||||
String chars =
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||
+ "abcdefghijklmnopqrstuvwxyz"
|
||||
+ "0123456789";
|
||||
StringBuilder sb = new StringBuilder();
|
||||
java.util.Random r = new java.util.Random();
|
||||
for (int i = 0; i < 6; i++) {
|
||||
sb.append(chars.charAt(r.nextInt(
|
||||
chars.length())));
|
||||
}
|
||||
smtpVerifyCode = sb.toString();
|
||||
smtpVerifyExpire =
|
||||
System.currentTimeMillis() + 300000L;
|
||||
return smtpVerifyCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查验证码是否有效
|
||||
*/
|
||||
public boolean checkSmtpVerifyCode(String code) {
|
||||
if (System.currentTimeMillis() > smtpVerifyExpire) {
|
||||
smtpVerifyCode = "";
|
||||
return false;
|
||||
}
|
||||
return smtpVerifyCode.equalsIgnoreCase(code);
|
||||
}
|
||||
|
||||
/**
|
||||
* 清除验证码
|
||||
*/
|
||||
public void clearSmtpVerifyCode() {
|
||||
smtpVerifyCode = "";
|
||||
smtpVerifyExpire = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查发送间隔是否>=1分钟
|
||||
*/
|
||||
public boolean canSendSmtpVerify() {
|
||||
return System.currentTimeMillis()
|
||||
- smtpLastSendTime >= 60000L;
|
||||
}
|
||||
|
||||
public void recordSmtpSendTime() {
|
||||
smtpLastSendTime = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,296 +1,259 @@
|
||||
package Sdf1_login;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.io.*;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.*;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
|
||||
|
||||
public class GiftManager {
|
||||
|
||||
private final File giftFolder;
|
||||
private final Main plugin;
|
||||
private final List<Map<String, Object>> stages =
|
||||
new ArrayList<>();
|
||||
|
||||
public GiftManager(Main plugin) {
|
||||
this.plugin = plugin;
|
||||
this.giftFolder = new File(
|
||||
plugin.getDataFolder(), "新人礼包");
|
||||
}
|
||||
|
||||
public void loadStages() {
|
||||
stages.clear();
|
||||
if (!giftFolder.exists()) {
|
||||
giftFolder.mkdirs();
|
||||
writeDefaultStages();
|
||||
}
|
||||
File[] files = giftFolder.listFiles(
|
||||
(dir, name) -> name.endsWith(".md"));
|
||||
if (files == null) return;
|
||||
Arrays.sort(files);
|
||||
for (File f : files) {
|
||||
stages.add(parseMarkdown(f));
|
||||
}
|
||||
}
|
||||
|
||||
private Map<String, Object> parseMarkdown(File f) {
|
||||
Map<String, Object> stage = new LinkedHashMap<>();
|
||||
stage.put("stage", stages.size() + 1);
|
||||
stage.put("name",
|
||||
f.getName().replace(".md", ""));
|
||||
stage.put("rewards", new ArrayList<String>());
|
||||
try {
|
||||
BufferedReader r = new BufferedReader(
|
||||
new InputStreamReader(
|
||||
new FileInputStream(f),
|
||||
StandardCharsets.UTF_8));
|
||||
String line;
|
||||
List<String> rewards = new ArrayList<>();
|
||||
while ((line = r.readLine()) != null) {
|
||||
if (line.contains("礼包内容")
|
||||
|| line.contains("奖励")
|
||||
|| line.contains("任务内容")) {
|
||||
int colon = line.indexOf(':');
|
||||
if (colon < 0)
|
||||
colon = line.indexOf('\uff1a');
|
||||
if (colon >= 0) {
|
||||
rewards.add(
|
||||
line.substring(colon + 1)
|
||||
.trim());
|
||||
}
|
||||
}
|
||||
}
|
||||
stage.put("rewards", rewards);
|
||||
r.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return stage;
|
||||
}
|
||||
private void writeStage(String name, String content) {
|
||||
File f = new File(giftFolder, name);
|
||||
if (f.exists()) return;
|
||||
try (PrintWriter pw = new PrintWriter(
|
||||
new OutputStreamWriter(
|
||||
new FileOutputStream(f),
|
||||
StandardCharsets.UTF_8))) {
|
||||
pw.print(content);
|
||||
} catch (IOException ignored) {}
|
||||
}
|
||||
|
||||
private void writeDefaultStages() {
|
||||
writeStage("第一阶段.md",
|
||||
"# 第一阶段\n\n## 领取条件\n\n- 无前级条件\n\n## 礼包内容\n\n- 皮革套装 × 1\n- 木制武器工具套装 × 1\n");
|
||||
writeStage("第二阶段.md",
|
||||
"# 第二阶段\n\n## 领取条件\n\n- 在线时长>1小时\n\n## 礼包内容\n\n- 500 游戏币\n");
|
||||
writeStage("第三阶段.md",
|
||||
"# 第三阶段\n\n## 领取条件\n\n- 破坏100个方块\n- 在线>1天\n\n## 礼包内容\n\n- 1500 游戏币\n- 铁质工具套装 × 1\n- 铁质防具 × 1\n");
|
||||
writeStage("第四阶段.md",
|
||||
"# 第四阶段\n\n## 领取条件\n\n- 破坏/放置300方块\n- 在线≥7天\n\n## 礼包内容\n\n- 钻石套装 × 1\n- 2000 游戏币\n");
|
||||
}
|
||||
|
||||
/** 从任意文件夹加载任务列表 */
|
||||
public List<Map<String, Object>> loadTasksFromFolder(
|
||||
File folder) {
|
||||
List<Map<String, Object>> tasks =
|
||||
new ArrayList<>();
|
||||
if (!folder.exists() || !folder.isDirectory())
|
||||
return tasks;
|
||||
File[] files = folder.listFiles(
|
||||
(dir, name) -> name.endsWith(".md"));
|
||||
if (files == null) return tasks;
|
||||
Arrays.sort(files);
|
||||
for (File f : files) {
|
||||
Map<String, Object> task =
|
||||
new LinkedHashMap<>();
|
||||
task.put("name",
|
||||
f.getName().replace(".md", ""));
|
||||
task.put("conditions",
|
||||
new ArrayList<String>());
|
||||
task.put("rewards",
|
||||
new ArrayList<String>());
|
||||
try {
|
||||
BufferedReader r = new BufferedReader(
|
||||
new InputStreamReader(
|
||||
new FileInputStream(f),
|
||||
StandardCharsets.UTF_8));
|
||||
String line;
|
||||
List<String> current = null;
|
||||
while ((line = r.readLine()) != null) {
|
||||
if (line.startsWith("# ")) {
|
||||
task.put("name",
|
||||
line.substring(2)
|
||||
.trim());
|
||||
} else if (line.contains("条件")
|
||||
|| line.contains("领取条件")
|
||||
|| line.contains("完成条件")) {
|
||||
current = (List<String>) task
|
||||
.get("conditions");
|
||||
} else if (line.contains("内容")
|
||||
|| line.contains("奖励")
|
||||
|| line.contains("任务内容")
|
||||
|| line.contains("礼包内容")) {
|
||||
current = (List<String>) task
|
||||
.get("rewards");
|
||||
} else if (line.startsWith("- ")
|
||||
&& current != null) {
|
||||
current.add(line.substring(2)
|
||||
.trim());
|
||||
}
|
||||
}
|
||||
r.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
tasks.add(task);
|
||||
}
|
||||
return tasks;
|
||||
}
|
||||
|
||||
public boolean canClaim(Player p, int stage) {
|
||||
Map<String, Object> user = plugin.getDb()
|
||||
.getUser(p.getName());
|
||||
if (user.isEmpty()) return false;
|
||||
int curStage = ((Number) user.getOrDefault(
|
||||
"gift_stage", 0)).intValue();
|
||||
if (stage > curStage + 1) return false;
|
||||
if (stage < 1 || stage > stages.size())
|
||||
return false;
|
||||
String claimed = (String) user.getOrDefault(
|
||||
"gift_claimed", "");
|
||||
if (claimed.contains("[" + stage + "]"))
|
||||
return false;
|
||||
|
||||
// debug 绕过:检查 tasks_completed
|
||||
String completed = (String) user.getOrDefault(
|
||||
"tasks_completed", "");
|
||||
if (completed.contains("[" + stage + "]"))
|
||||
return true;
|
||||
|
||||
// 正常条件检查
|
||||
long dbTime = ((Number) user.getOrDefault(
|
||||
"total_online_time", 0L)).longValue();
|
||||
long sessionTime = 0;
|
||||
Object lastObj = plugin.getDb().getField(
|
||||
p.getName(), "last_online_check");
|
||||
if (lastObj != null && plugin.getLoggedIn()
|
||||
.contains(p.getName())) {
|
||||
long last = ((Number) lastObj).longValue();
|
||||
if (last > 0) {
|
||||
sessionTime =
|
||||
System.currentTimeMillis() - last;
|
||||
}
|
||||
}
|
||||
long onlineTime = dbTime + sessionTime;
|
||||
int broken = ((Number) user.getOrDefault(
|
||||
"blocks_broken", 0)).intValue();
|
||||
int placed = ((Number) user.getOrDefault(
|
||||
"blocks_placed", 0)).intValue();
|
||||
|
||||
switch (stage) {
|
||||
case 1: return true;
|
||||
case 2: return onlineTime >= 3600000;
|
||||
case 3: return broken >= 100
|
||||
&& onlineTime >= 86400000L;
|
||||
case 4: return (broken + placed) >= 300
|
||||
&& onlineTime >= 604800000L;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
public void claimReward(Player p, int stage) {
|
||||
if (!canClaim(p, stage)) return;
|
||||
Map<String, Object> user = plugin.getDb()
|
||||
.getUser(p.getName());
|
||||
String claimed = (String) user.getOrDefault(
|
||||
"gift_claimed", "");
|
||||
claimed += "[" + stage + "]";
|
||||
plugin.getDb().setField(
|
||||
p.getName(), "gift_claimed", claimed);
|
||||
plugin.getDb().setField(
|
||||
p.getName(), "gift_stage",
|
||||
Math.max(stage,
|
||||
((Number) user.getOrDefault(
|
||||
"gift_stage", 0))
|
||||
.intValue()));
|
||||
|
||||
if (stage == 1) {
|
||||
giveItem(p, Material.LEATHER_HELMET);
|
||||
giveItem(p, Material.LEATHER_CHESTPLATE);
|
||||
giveItem(p, Material.LEATHER_LEGGINGS);
|
||||
giveItem(p, Material.LEATHER_BOOTS);
|
||||
giveItem(p, Material.WOODEN_SWORD);
|
||||
giveItem(p, Material.WOODEN_PICKAXE);
|
||||
giveItem(p, Material.WOODEN_AXE);
|
||||
giveItem(p, Material.WOODEN_SHOVEL);
|
||||
} else if (stage == 2) {
|
||||
if (plugin.getEconomy() != null) {
|
||||
double before = plugin.getEconomy()
|
||||
.getBalance(p);
|
||||
plugin.getEconomy()
|
||||
.depositPlayer(p, 500);
|
||||
double after = plugin.getEconomy()
|
||||
.getBalance(p);
|
||||
p.sendMessage("§a§l[礼包] §f游戏币: §e"
|
||||
+ (long) before
|
||||
+ "§f → §a" + (long) after);
|
||||
}
|
||||
} else if (stage == 3) {
|
||||
if (plugin.getEconomy() != null) {
|
||||
double before = plugin.getEconomy()
|
||||
.getBalance(p);
|
||||
plugin.getEconomy()
|
||||
.depositPlayer(p, 1500);
|
||||
double after = plugin.getEconomy()
|
||||
.getBalance(p);
|
||||
p.sendMessage("§a§l[礼包] §f游戏币: §e"
|
||||
+ (long) before
|
||||
+ "§f → §a" + (long) after);
|
||||
}
|
||||
giveItem(p, Material.IRON_PICKAXE);
|
||||
giveItem(p, Material.IRON_AXE);
|
||||
giveItem(p, Material.IRON_SWORD);
|
||||
giveItem(p, Material.IRON_HELMET);
|
||||
giveItem(p, Material.IRON_CHESTPLATE);
|
||||
giveItem(p, Material.IRON_LEGGINGS);
|
||||
giveItem(p, Material.IRON_BOOTS);
|
||||
} else if (stage == 4) {
|
||||
if (plugin.getEconomy() != null) {
|
||||
double before = plugin.getEconomy()
|
||||
.getBalance(p);
|
||||
plugin.getEconomy()
|
||||
.depositPlayer(p, 2000);
|
||||
double after = plugin.getEconomy()
|
||||
.getBalance(p);
|
||||
p.sendMessage("§a§l[礼包] §f游戏币: §e"
|
||||
+ (long) before
|
||||
+ "§f → §a" + (long) after);
|
||||
}
|
||||
giveItem(p, Material.DIAMOND_HELMET);
|
||||
giveItem(p, Material.DIAMOND_CHESTPLATE);
|
||||
giveItem(p, Material.DIAMOND_LEGGINGS);
|
||||
giveItem(p, Material.DIAMOND_BOOTS);
|
||||
}
|
||||
p.sendMessage(plugin.getConfig2().msg(
|
||||
"gift_claimed"));
|
||||
}
|
||||
|
||||
private void giveItem(Player p, Material mat) {
|
||||
p.getInventory().addItem(new ItemStack(mat));
|
||||
}
|
||||
|
||||
public List<Map<String, Object>> getStages() {
|
||||
return stages;
|
||||
}
|
||||
|
||||
public int getMaxStage() {
|
||||
return stages.size();
|
||||
}
|
||||
}
|
||||
package Sdf1_login;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.io.*;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.*;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
|
||||
|
||||
public class GiftManager {
|
||||
|
||||
private final File giftFolder;
|
||||
private final Main plugin;
|
||||
private final List<Map<String, Object>> stages =
|
||||
new ArrayList<>();
|
||||
|
||||
public GiftManager(Main plugin) {
|
||||
this.plugin = plugin;
|
||||
this.giftFolder = new File(
|
||||
plugin.getDataFolder(), "新人礼包");
|
||||
}
|
||||
|
||||
public void loadStages() {
|
||||
stages.clear();
|
||||
if (!giftFolder.exists()) {
|
||||
giftFolder.mkdirs();
|
||||
writeDefaultStages();
|
||||
}
|
||||
File[] files = giftFolder.listFiles(
|
||||
(dir, name) -> name.endsWith(".md"));
|
||||
if (files == null) return;
|
||||
Arrays.sort(files);
|
||||
for (File f : files) {
|
||||
stages.add(parseMarkdown(f));
|
||||
}
|
||||
}
|
||||
|
||||
private Map<String, Object> parseMarkdown(File f) {
|
||||
Map<String, Object> stage = new LinkedHashMap<>();
|
||||
stage.put("stage", stages.size() + 1);
|
||||
stage.put("name",
|
||||
f.getName().replace(".md", ""));
|
||||
stage.put("rewards", new ArrayList<String>());
|
||||
try {
|
||||
BufferedReader r = new BufferedReader(
|
||||
new InputStreamReader(
|
||||
new FileInputStream(f),
|
||||
StandardCharsets.UTF_8));
|
||||
String line;
|
||||
List<String> rewards = new ArrayList<>();
|
||||
while ((line = r.readLine()) != null) {
|
||||
if (line.contains("礼包内容")
|
||||
|| line.contains("奖励")
|
||||
|| line.contains("任务内容")) {
|
||||
int colon = line.indexOf(':');
|
||||
if (colon < 0)
|
||||
colon = line.indexOf('\uff1a');
|
||||
if (colon >= 0) {
|
||||
rewards.add(
|
||||
line.substring(colon + 1)
|
||||
.trim());
|
||||
}
|
||||
}
|
||||
}
|
||||
stage.put("rewards", rewards);
|
||||
r.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return stage;
|
||||
}
|
||||
private void writeStage(String name, String content) {
|
||||
File f = new File(giftFolder, name);
|
||||
if (f.exists()) return;
|
||||
try (PrintWriter pw = new PrintWriter(
|
||||
new OutputStreamWriter(
|
||||
new FileOutputStream(f),
|
||||
StandardCharsets.UTF_8))) {
|
||||
pw.print(content);
|
||||
} catch (IOException ignored) {}
|
||||
}
|
||||
|
||||
private void writeDefaultStages() {
|
||||
writeStage("第一阶段.md",
|
||||
"# 第一阶段\n\n## 领取条件\n\n- 无前级条件\n\n## 礼包内容\n\n- 皮革套装 × 1\n- 木制武器工具套装 × 1\n");
|
||||
writeStage("第二阶段.md",
|
||||
"# 第二阶段\n\n## 领取条件\n\n- 在线时长>1小时\n\n## 礼包内容\n\n- 500 游戏币\n");
|
||||
writeStage("第三阶段.md",
|
||||
"# 第三阶段\n\n## 领取条件\n\n- 破坏100个方块\n- 在线>1天\n\n## 礼包内容\n\n- 1500 游戏币\n- 铁质工具套装 × 1\n- 铁质防具 × 1\n");
|
||||
writeStage("第四阶段.md",
|
||||
"# 第四阶段\n\n## 领取条件\n\n- 破坏/放置300方块\n- 在线≥7天\n\n## 礼包内容\n\n- 钻石套装 × 1\n- 2000 游戏币\n");
|
||||
}
|
||||
|
||||
/** 从任意文件夹加载任务列表 */
|
||||
public List<Map<String, Object>> loadTasksFromFolder(
|
||||
File folder) {
|
||||
List<Map<String, Object>> tasks =
|
||||
new ArrayList<>();
|
||||
if (!folder.exists() || !folder.isDirectory())
|
||||
return tasks;
|
||||
File[] files = folder.listFiles(
|
||||
(dir, name) -> name.endsWith(".md"));
|
||||
if (files == null) return tasks;
|
||||
Arrays.sort(files);
|
||||
for (File f : files) {
|
||||
Map<String, Object> task =
|
||||
new LinkedHashMap<>();
|
||||
task.put("name",
|
||||
f.getName().replace(".md", ""));
|
||||
task.put("conditions",
|
||||
new ArrayList<String>());
|
||||
task.put("rewards",
|
||||
new ArrayList<String>());
|
||||
try {
|
||||
BufferedReader r = new BufferedReader(
|
||||
new InputStreamReader(
|
||||
new FileInputStream(f),
|
||||
StandardCharsets.UTF_8));
|
||||
String line;
|
||||
List<String> current = null;
|
||||
while ((line = r.readLine()) != null) {
|
||||
if (line.startsWith("# ")) {
|
||||
task.put("name",
|
||||
line.substring(2)
|
||||
.trim());
|
||||
} else if (line.contains("条件")
|
||||
|| line.contains("领取条件")
|
||||
|| line.contains("完成条件")) {
|
||||
current = (List<String>) task
|
||||
.get("conditions");
|
||||
} else if (line.contains("内容")
|
||||
|| line.contains("奖励")
|
||||
|| line.contains("任务内容")
|
||||
|| line.contains("礼包内容")) {
|
||||
current = (List<String>) task
|
||||
.get("rewards");
|
||||
} else if (line.startsWith("- ")
|
||||
&& current != null) {
|
||||
current.add(line.substring(2)
|
||||
.trim());
|
||||
}
|
||||
}
|
||||
r.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
tasks.add(task);
|
||||
}
|
||||
return tasks;
|
||||
}
|
||||
|
||||
public boolean canClaim(Player p, int stage) {
|
||||
String name = p.getName();
|
||||
int curStage = ((Number) plugin.getDb()
|
||||
.getField(name, "gift_stage"))
|
||||
.intValue();
|
||||
String claimed = (String) plugin.getDb()
|
||||
.getField(name, "gift_claimed");
|
||||
if (claimed == null) claimed = "";
|
||||
return curStage >= stage
|
||||
&& !claimed.contains(
|
||||
String.valueOf(stage));
|
||||
}
|
||||
|
||||
|
||||
public void claimReward(Player p, int stage) {
|
||||
if (!canClaim(p, stage)) return;
|
||||
Map<String, Object> user = plugin.getDb()
|
||||
.getUser(p.getName());
|
||||
String claimed = (String) user.getOrDefault(
|
||||
"gift_claimed", "");
|
||||
claimed += "[" + stage + "]";
|
||||
plugin.getDb().setField(
|
||||
p.getName(), "gift_claimed", claimed);
|
||||
plugin.getDb().setField(
|
||||
p.getName(), "gift_stage",
|
||||
Math.max(stage,
|
||||
((Number) user.getOrDefault(
|
||||
"gift_stage", 0))
|
||||
.intValue()));
|
||||
|
||||
if (stage == 1) {
|
||||
giveItem(p, Material.LEATHER_HELMET);
|
||||
giveItem(p, Material.LEATHER_CHESTPLATE);
|
||||
giveItem(p, Material.LEATHER_LEGGINGS);
|
||||
giveItem(p, Material.LEATHER_BOOTS);
|
||||
giveItem(p, Material.WOODEN_SWORD);
|
||||
giveItem(p, Material.WOODEN_PICKAXE);
|
||||
giveItem(p, Material.WOODEN_AXE);
|
||||
giveItem(p, Material.WOODEN_SHOVEL);
|
||||
} else if (stage == 2) {
|
||||
if (plugin.getEconomy() != null) {
|
||||
double before = plugin.getEconomy()
|
||||
.getBalance(p);
|
||||
plugin.getEconomy()
|
||||
.depositPlayer(p, 500);
|
||||
double after = plugin.getEconomy()
|
||||
.getBalance(p);
|
||||
p.sendMessage("§a§l[礼包] §f游戏币: §e"
|
||||
+ (long) before
|
||||
+ "§f → §a" + (long) after);
|
||||
}
|
||||
} else if (stage == 3) {
|
||||
if (plugin.getEconomy() != null) {
|
||||
double before = plugin.getEconomy()
|
||||
.getBalance(p);
|
||||
plugin.getEconomy()
|
||||
.depositPlayer(p, 1500);
|
||||
double after = plugin.getEconomy()
|
||||
.getBalance(p);
|
||||
p.sendMessage("§a§l[礼包] §f游戏币: §e"
|
||||
+ (long) before
|
||||
+ "§f → §a" + (long) after);
|
||||
}
|
||||
giveItem(p, Material.IRON_PICKAXE);
|
||||
giveItem(p, Material.IRON_AXE);
|
||||
giveItem(p, Material.IRON_SWORD);
|
||||
giveItem(p, Material.IRON_HELMET);
|
||||
giveItem(p, Material.IRON_CHESTPLATE);
|
||||
giveItem(p, Material.IRON_LEGGINGS);
|
||||
giveItem(p, Material.IRON_BOOTS);
|
||||
} else if (stage == 4) {
|
||||
if (plugin.getEconomy() != null) {
|
||||
double before = plugin.getEconomy()
|
||||
.getBalance(p);
|
||||
plugin.getEconomy()
|
||||
.depositPlayer(p, 2000);
|
||||
double after = plugin.getEconomy()
|
||||
.getBalance(p);
|
||||
p.sendMessage("§a§l[礼包] §f游戏币: §e"
|
||||
+ (long) before
|
||||
+ "§f → §a" + (long) after);
|
||||
}
|
||||
giveItem(p, Material.DIAMOND_HELMET);
|
||||
giveItem(p, Material.DIAMOND_CHESTPLATE);
|
||||
giveItem(p, Material.DIAMOND_LEGGINGS);
|
||||
giveItem(p, Material.DIAMOND_BOOTS);
|
||||
}
|
||||
p.sendMessage(plugin.getConfig2().msg(
|
||||
"gift_claimed"));
|
||||
}
|
||||
|
||||
private void giveItem(Player p, Material mat) {
|
||||
p.getInventory().addItem(new ItemStack(mat));
|
||||
}
|
||||
|
||||
public List<Map<String, Object>> getStages() {
|
||||
return stages;
|
||||
}
|
||||
|
||||
public int getMaxStage() {
|
||||
return stages.size();
|
||||
}
|
||||
}
|
||||
|
||||
+3186
-3055
File diff suppressed because it is too large
Load Diff
+1644
-1656
File diff suppressed because it is too large
Load Diff
@@ -1,86 +1,89 @@
|
||||
name: Sdf1_login
|
||||
version: 1.0
|
||||
main: Sdf1_login.Main
|
||||
api-version: '1.21'
|
||||
commands:
|
||||
sdf1_login:
|
||||
description: Sdf1_login主命令
|
||||
usage: /sdf1_login
|
||||
reg:
|
||||
description: 注册
|
||||
usage: /reg <密码>
|
||||
login:
|
||||
description: 登录
|
||||
usage: /login <密码>
|
||||
l:
|
||||
description: 登录快捷版
|
||||
usage: /l <密码>
|
||||
注册:
|
||||
description: 注册(中文)
|
||||
usage: /注册 <密码>
|
||||
登录:
|
||||
description: 登录(中文)
|
||||
usage: /登录 <密码>
|
||||
玩家信息:
|
||||
description: 打开面板(中文)
|
||||
usage: /玩家信息
|
||||
改密码:
|
||||
description: 修改密码(中文)
|
||||
usage: /改密码 <旧密码> <新密码> <确认新密码>
|
||||
设置邮箱:
|
||||
description: 设置邮箱(中文)
|
||||
usage: /设置邮箱 <邮箱地址>
|
||||
撤销:
|
||||
description: 撤销操作(中文)
|
||||
usage: /撤销
|
||||
删除:
|
||||
description: 删除玩家(中文)
|
||||
usage: /删除 <玩家> <密码>
|
||||
找回密码:
|
||||
description: 找回密码(中文)
|
||||
usage: /找回密码
|
||||
签到:
|
||||
description: 每日签到(中文)
|
||||
usage: /签到
|
||||
oa:
|
||||
description: 申请删除账号
|
||||
usage: /oa [玩家名]
|
||||
删除账号:
|
||||
description: 申请删除账号(中文)
|
||||
usage: /删除账号 [玩家名]
|
||||
通过:
|
||||
description: 批准OA请求(中文)
|
||||
usage: /通过 <编号>
|
||||
拒绝:
|
||||
description: 拒绝OA请求(中文)
|
||||
usage: /拒绝 <编号> [理由]
|
||||
accept:
|
||||
description: 批准OA请求
|
||||
usage: /accept <编号>
|
||||
deny:
|
||||
description: 拒绝OA请求
|
||||
usage: /deny <编号> [理由]
|
||||
sdf1debug:
|
||||
description: 调试指令
|
||||
usage: /sdf1debug <玩家> take.<阶段>
|
||||
email:
|
||||
description: 绑定邮箱
|
||||
usage: /email <邮箱>
|
||||
绑定:
|
||||
description: 绑定邮箱(中文)
|
||||
usage: /绑定 <邮箱>
|
||||
调试:
|
||||
description: 调试模式
|
||||
usage: /调试
|
||||
绑定邮箱:
|
||||
description: 绑定邮箱
|
||||
usage: /绑定邮箱
|
||||
chat:
|
||||
description: 聊天过滤管理
|
||||
usage: /chat
|
||||
recycle:
|
||||
description: 打开垃圾回收站
|
||||
usage: /recycle
|
||||
垃圾清理:
|
||||
description: 手动清理掉落物
|
||||
usage: /垃圾清理
|
||||
name: Sdf1_login
|
||||
version: 1.0
|
||||
main: Sdf1_login.Main
|
||||
api-version: '1.21'
|
||||
commands:
|
||||
sdf1_login:
|
||||
description: Sdf1_login主命令
|
||||
usage: /sdf1_login
|
||||
reg:
|
||||
description: 注册
|
||||
usage: /reg <密码>
|
||||
login:
|
||||
description: 登录
|
||||
usage: /login <密码>
|
||||
l:
|
||||
description: 登录快捷版
|
||||
usage: /l <密码>
|
||||
注册:
|
||||
description: 注册(中文)
|
||||
usage: /注册 <密码>
|
||||
登录:
|
||||
description: 登录(中文)
|
||||
usage: /登录 <密码>
|
||||
玩家信息:
|
||||
description: 打开面板(中文)
|
||||
usage: /玩家信息
|
||||
改密码:
|
||||
description: 修改密码(中文)
|
||||
usage: /改密码 <旧密码> <新密码> <确认新密码>
|
||||
设置邮箱:
|
||||
description: 设置邮箱(中文)
|
||||
usage: /设置邮箱 <邮箱地址>
|
||||
撤销:
|
||||
description: 撤销操作(中文)
|
||||
usage: /撤销
|
||||
删除:
|
||||
description: 删除玩家(中文)
|
||||
usage: /删除 <玩家> <密码>
|
||||
找回密码:
|
||||
description: 找回密码(中文)
|
||||
usage: /找回密码
|
||||
签到:
|
||||
description: 每日签到(中文)
|
||||
usage: /签到
|
||||
oa:
|
||||
description: 申请删除账号
|
||||
usage: /oa [玩家名]
|
||||
删除账号:
|
||||
description: 申请删除账号(中文)
|
||||
usage: /删除账号 [玩家名]
|
||||
通过:
|
||||
description: 批准OA请求(中文)
|
||||
usage: /通过 <编号>
|
||||
拒绝:
|
||||
description: 拒绝OA请求(中文)
|
||||
usage: /拒绝 <编号> [理由]
|
||||
accept:
|
||||
description: 批准OA请求
|
||||
usage: /accept <编号>
|
||||
deny:
|
||||
description: 拒绝OA请求
|
||||
usage: /deny <编号> [理由]
|
||||
sdf1debug:
|
||||
description: 调试指令
|
||||
usage: /sdf1debug <玩家> take.<阶段>
|
||||
email:
|
||||
description: 绑定邮箱
|
||||
usage: /email <邮箱>
|
||||
绑定:
|
||||
description: 绑定邮箱(中文)
|
||||
usage: /绑定 <邮箱>
|
||||
调试:
|
||||
description: 调试模式
|
||||
usage: /调试
|
||||
绑定邮箱:
|
||||
description: 绑定邮箱
|
||||
usage: /绑定邮箱
|
||||
chat:
|
||||
description: 聊天过滤管理
|
||||
usage: /chat
|
||||
recycle:
|
||||
description: 打开垃圾回收站
|
||||
usage: /recycle
|
||||
垃圾清理:
|
||||
description: 手动清理掉落物
|
||||
usage: /垃圾清理
|
||||
menu:
|
||||
description: 雪球菜单开关控制
|
||||
usage: /menu <开/关>
|
||||
Reference in New Issue
Block a user