mirror of
https://e.coding.net/circlecloud/MiaoBoard.git
synced 2024-11-14 00:29:07 +00:00
fix: 修复 1.12 不允许异步创建计分板的问题
This commit is contained in:
parent
3104428641
commit
46ba5c8994
16
pom.xml
16
pom.xml
@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>pw.yumc</groupId>
|
||||
<artifactId>MiaoBoard</artifactId>
|
||||
<version>2.4.0</version>
|
||||
<version>2.4.1</version>
|
||||
<description>喵式记分板</description>
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
@ -71,15 +71,17 @@
|
||||
<url>http://ci.yumc.pw/job/${project.artifactId}/</url>
|
||||
</ciManagement>
|
||||
<properties>
|
||||
<update.description>§a正式版本 2.4.0</update.description>
|
||||
<update.description>§a正式版本 2.4.1</update.description>
|
||||
<update.changes>
|
||||
§618-03-05 §cfix: 修复1.12不兼容的问题;
|
||||
§617-10-15 §cfix: 修复颜色字符分割错误;
|
||||
§617-08-15 §cfix: 修复事件未标记为异步的问题;
|
||||
§617-08-15 §cfix: 修复事件未标记为异步的问题
|
||||
</update.changes>
|
||||
<update.changelog>
|
||||
§617-06-28 §cfix: 修复T端不兼容的问题;
|
||||
§617-03-09 §cfix: 修复行更新错误;
|
||||
§617-03-09 §afeat: 添加记分板更新事件
|
||||
</update.changes>
|
||||
<update.changelog></update.changelog>
|
||||
§617-03-09 §afeat: 添加记分板更新事件;
|
||||
</update.changelog>
|
||||
<env.GIT_COMMIT>DEV</env.GIT_COMMIT>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
@ -103,7 +105,7 @@
|
||||
<groupId>pw.yumc</groupId>
|
||||
<artifactId>YumCore</artifactId>
|
||||
<type>jar</type>
|
||||
<version>1.7</version>
|
||||
<version>[1.8.1,)</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
@ -4,6 +4,7 @@ import java.util.Comparator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import pw.yumc.MiaoBoard.config.MiaoBoardConfig;
|
||||
@ -21,10 +22,10 @@ import pw.yumc.YumCore.config.FileConfig;
|
||||
* @author 喵♂呜
|
||||
*/
|
||||
public class ScoreBoardManager {
|
||||
public Status cot = new Status();
|
||||
public SidebarBoard sbd = new SidebarBoard(P.instance);
|
||||
public FileConfig config = MiaoBoardConfig.i().getConfig();
|
||||
public List<BoardModel> bms = new LinkedList<>();
|
||||
private Status cot = new Status();
|
||||
private SidebarBoard sbd = new SidebarBoard(P.instance);
|
||||
private FileConfig config = MiaoBoardConfig.i().getConfig();
|
||||
private List<BoardModel> bms = new LinkedList<>();
|
||||
|
||||
public ScoreBoardManager() {
|
||||
load();
|
||||
@ -32,7 +33,7 @@ public class ScoreBoardManager {
|
||||
|
||||
public void addTarget(final Player player) {
|
||||
if (!MiaoBoardConfig.i().DisableWorld.contains(player.getWorld().getName())) {
|
||||
getSidebarBoard().addTarget(player);
|
||||
Bukkit.getScheduler().runTask(P.instance, () -> getSidebarBoard().addTarget(player));
|
||||
}
|
||||
}
|
||||
|
||||
@ -44,7 +45,7 @@ public class ScoreBoardManager {
|
||||
return sbd;
|
||||
}
|
||||
|
||||
public void load() {
|
||||
private void load() {
|
||||
bms.clear();
|
||||
config.getConfigurationSection("Boards").getKeys(false).forEach(bmn -> bms.add(new BoardModel(bmn, config.getConfigurationSection("Boards." + bmn))));
|
||||
bms.sort(Comparator.comparing(o -> o.index));
|
||||
@ -74,7 +75,7 @@ public class ScoreBoardManager {
|
||||
return status;
|
||||
}
|
||||
|
||||
public Status set(final boolean status) {
|
||||
Status set(final boolean status) {
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user