mirror of
https://e.coding.net/circlecloud/MiaoBoard.git
synced 2024-11-22 01:49:05 +00:00
feat: compatible to 1.19
Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
parent
3f193bbf46
commit
00db90be47
6
pom.xml
6
pom.xml
@ -3,7 +3,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>MiaoBoard</artifactId>
|
<artifactId>MiaoBoard</artifactId>
|
||||||
<version>2.5.1</version>
|
<version>2.6.0</version>
|
||||||
<description>喵式记分板</description>
|
<description>喵式记分板</description>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
@ -13,8 +13,10 @@
|
|||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<update.description>§a正式版本 2.5.1</update.description>
|
<update.description>§a正式版本 兼容 1.19 版本</update.description>
|
||||||
<update.changes>
|
<update.changes>
|
||||||
|
§622-06-25 §afeat: 兼容 1.19 版本;
|
||||||
|
§621-06-23 §afeat: 解除32个字符限制(1.13+);
|
||||||
§621-05-31 §cfix: 修复记分板切换异常问题;
|
§621-05-31 §cfix: 修复记分板切换异常问题;
|
||||||
§619-12-30 §cfix: 修复字符截取错误导致的报错;
|
§619-12-30 §cfix: 修复字符截取错误导致的报错;
|
||||||
§619-10-24 §cfix: 调整默认配置的 time.end 为2099年;
|
§619-10-24 §cfix: 调整默认配置的 time.end 为2099年;
|
||||||
|
@ -3,7 +3,6 @@ package pw.yumc.MiaoBoard;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
import pw.yumc.MiaoBoard.listener.PlayerListener;
|
import pw.yumc.MiaoBoard.listener.PlayerListener;
|
||||||
import pw.yumc.MiaoBoard.listener.SelfListener;
|
import pw.yumc.MiaoBoard.listener.SelfListener;
|
||||||
import pw.yumc.MiaoBoard.misc.Checker;
|
import pw.yumc.MiaoBoard.misc.Checker;
|
||||||
|
@ -2,11 +2,13 @@ package pw.yumc.MiaoBoard.scoreboard.core;
|
|||||||
|
|
||||||
import org.apache.commons.lang.Validate;
|
import org.apache.commons.lang.Validate;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
|
import org.bukkit.Material;
|
||||||
import org.bukkit.OfflinePlayer;
|
import org.bukkit.OfflinePlayer;
|
||||||
import org.bukkit.scoreboard.DisplaySlot;
|
import org.bukkit.scoreboard.DisplaySlot;
|
||||||
import org.bukkit.scoreboard.Objective;
|
import org.bukkit.scoreboard.Objective;
|
||||||
import org.bukkit.scoreboard.Team;
|
import org.bukkit.scoreboard.Team;
|
||||||
import pw.yumc.MiaoBoard.misc.FakePlayer;
|
import pw.yumc.MiaoBoard.misc.FakePlayer;
|
||||||
|
import pw.yumc.YumCore.bukkit.Log;
|
||||||
import pw.yumc.YumCore.kit.StrKit;
|
import pw.yumc.YumCore.kit.StrKit;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -19,8 +21,8 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public class SidebarBoardPage extends BoardPage {
|
public class SidebarBoardPage extends BoardPage {
|
||||||
private static final List<ChatColor> COLORS = Arrays.asList(ChatColor.values());
|
private static final List<ChatColor> COLORS = Arrays.asList(ChatColor.values());
|
||||||
private static final int BOARD_LINE_MAX_CHARS = 16;
|
private static int BOARD_LINE_MAX_CHARS = 16;
|
||||||
private static final int BOARD_LINE_MAX_CHARS_SUB1 = BOARD_LINE_MAX_CHARS - 1;
|
private static int BOARD_LINE_MAX_CHARS_SUB1 = BOARD_LINE_MAX_CHARS - 1;
|
||||||
private static boolean newVer = true;
|
private static boolean newVer = true;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
@ -29,6 +31,13 @@ public class SidebarBoardPage extends BoardPage {
|
|||||||
} catch (NoSuchMethodException e) {
|
} catch (NoSuchMethodException e) {
|
||||||
newVer = false;
|
newVer = false;
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
|
Material.valueOf("KELP");
|
||||||
|
BOARD_LINE_MAX_CHARS = 64;
|
||||||
|
BOARD_LINE_MAX_CHARS_SUB1 = BOARD_LINE_MAX_CHARS - 1;
|
||||||
|
Log.console("§a当前服务端支持新版记分板 长度限制为128个字符...");
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private final Objective objective;
|
private final Objective objective;
|
||||||
|
@ -20,7 +20,7 @@ Boards:
|
|||||||
title: '玩家信息'
|
title: '玩家信息'
|
||||||
#记分板权限
|
#记分板权限
|
||||||
permission: mb.default
|
permission: mb.default
|
||||||
#记分板内容(不得超过38个字符 包括颜色字符 超过部分自动截取)
|
#记分板内容(不得超过32个字符(1.13+限制为128字符) 包括颜色字符 超过部分自动截取)
|
||||||
lines:
|
lines:
|
||||||
- '&6名 称: &a%player_displayname%'
|
- '&6名 称: &a%player_displayname%'
|
||||||
- '&6世 界: &b%player_world%'
|
- '&6世 界: &b%player_world%'
|
||||||
@ -38,7 +38,7 @@ Boards:
|
|||||||
title: '服务器信息'
|
title: '服务器信息'
|
||||||
#记分板权限
|
#记分板权限
|
||||||
permission: mb.reload
|
permission: mb.reload
|
||||||
#记分板内容(不得超过38个字符 包括颜色字符 超过部分自动截取)
|
#记分板内容(不得超过32个字符(1.13+限制为128字符) 包括颜色字符 超过部分自动截取)
|
||||||
lines:
|
lines:
|
||||||
- '&6名 称: &a%plugin_name%'
|
- '&6名 称: &a%plugin_name%'
|
||||||
- '&6版 本: &b%plugin_version%'
|
- '&6版 本: &b%plugin_version%'
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
name: ${project.artifactId}
|
name: ${project.artifactId}
|
||||||
description: ${project.description}
|
description: ${project.description}
|
||||||
main: ${project.groupId}.${project.artifactId}.${project.artifactId}
|
main: ${project.groupId}.${project.artifactId}.${project.artifactId}
|
||||||
|
api-version: 1.13
|
||||||
version: ${project.version}-git-${env.GIT_COMMIT}
|
version: ${project.version}-git-${env.GIT_COMMIT}
|
||||||
author: 喵♂呜
|
author: 喵♂呜
|
||||||
website: ${ciManagement.url}
|
website: ${ciManagement.url}
|
||||||
|
Loading…
Reference in New Issue
Block a user