feat: 添加重试失败后继续重试

Signed-off-by: 502647092 <admin@yumc.pw>
vbauth
502647092 2016-09-28 13:55:37 +08:00
parent 76e73b5c25
commit 43b8d43254
4 changed files with 9 additions and 2 deletions

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>pw.yumc</groupId>
<artifactId>MiaoLobby</artifactId>
<version>1.0</version>
<version>1.2</version>
<build>
<finalName>${project.name}</finalName>
<resources>

View File

@ -19,4 +19,5 @@ public class Config extends InjectConfig {
public String Unavailable;
public Boolean AuthMeAutoTP;
public Integer AutoTPDelay;
public Boolean ReTry;
}

View File

@ -70,6 +70,10 @@ public class MiaoLobby extends JavaPlugin implements CommandExecutor {
@Override
public void run() {
if (servers.isEmpty()) {
if (config.ReTry) {
servers.addAll(config.Servers);
return;
}
C.ActionBar.send(player, config.Unavailable);
player.sendMessage(config.Unavailable);
} else if (player.isOnline()) {

View File

@ -1,5 +1,5 @@
#配置文件版本 请勿修改
Version: 1.1
Version: 1.2
#数据库信息
Servers:
@ -11,6 +11,8 @@ WaitTime: 35
AuthMeAutoTP: true
#自动登录延时(单位: 秒)
AutoTPDelay: 10
#尝试完毕后是否继续重试
ReTry: true
#传送提示
Message: '&a请稍候 正在传送至服务器 %s ...'
TimeOut: '&c传送超时 正在切换到服务器 %s ...'