diff --git a/README.md b/README.md index 05b3b8be..a0e7ca3a 100644 --- a/README.md +++ b/README.md @@ -23,13 +23,13 @@ ## 使用方法 >1. 安装AllMusic插件 ->复制`AllMusic-2.18.0-all.jar`到你的`plugins`文件夹 +>复制`AllMusic-2.19.2-all.jar`到你的`plugins`文件夹 >重启过服务器 >2. 安装客户端mod >目前只支持 ->`forge:1.7.10 1.8 1.12.2 1.14 1.15 1.16 1.17 1.18 1.19` ->`fabric:1.14 1.15 1.16 1.17 1.18 1.19` ->复制`[forge-xxx]AllMusic-2.6.5`到客户端的`mods`文件夹 +>`forge:1.7.10 1.8 1.12.2 1.14 1.15 1.16 1.17 1.18 1.19 1.20` +>`fabric:1.14 1.15 1.16 1.17 1.18 1.19 1.20` +>复制`[forge-xxx]AllMusic-2.6.8`到客户端的`mods`文件夹 >fabric同理 ## 播放VIP歌曲 @@ -109,6 +109,7 @@ 2.18.9:添加folia服务端支持 2.18.10:BC改名Top 2.19.0:新增玩家点歌限制 +2.19.2:修复潜在的问题 MOD: 1.2.0:无需指令就能修改音量 @@ -125,4 +126,5 @@ MOD: 2.6.0:新增图片大小调整 2.6.3:1.19支持 2.6.5:图片旋转 +2.6.8:尝试修复掉帧问题 ``` diff --git a/core/AllMusic.java b/core/AllMusic.java index 47f750ba..494a7c26 100644 --- a/core/AllMusic.java +++ b/core/AllMusic.java @@ -37,7 +37,7 @@ public class AllMusic { /** * 插件版本号 */ - public static final String version = "2.19.1"; + public static final String version = "2.19.2"; /** * 配置文件版本号 */ @@ -386,7 +386,7 @@ public class AllMusic { messageCheck(); log.info("§d[AllMusic]§e当前语言配置文件版本为:" + messageVersion - + ",你的语言文件版本为:" + config.Version); + + ",你的语言文件版本为:" + message.Version); if (!message.Version.equalsIgnoreCase(messageVersion)) { log.warning("§d[AllMusic]§c语言文件版本号错误,运行可能会发生问题,请删除后重载"); diff --git a/core/music/play/LyricSave.java b/core/music/play/LyricSave.java index b7773350..ea174739 100644 --- a/core/music/play/LyricSave.java +++ b/core/music/play/LyricSave.java @@ -87,29 +87,29 @@ public class LyricSave { * 因为一些原因,直接 Map.get 会出现歌词匹配速度不太对的问题... * 本方法虽然没有原来的好看,但准度提高并且几乎不会影响服务器 */ - public LyricItemObj findLrcObj(Map map, int time) { - Set set = map.entrySet(); - LyricItemObj latestObj = new LyricItemObj("", ""); - for (Iterator iter = set.iterator(); iter.hasNext();) { - Map.Entry entry = (Map.Entry) iter.next(); - int key = (int) entry.getKey(); - if (time == key) - return (LyricItemObj) entry.getValue(); - else if (time < key) { - return latestObj; - } else { - latestObj = (LyricItemObj) entry.getValue(); - } - } - return latestObj; - } +// public LyricItemObj findLrcObj(Map map, int time) { +// Set set = map.entrySet(); +// LyricItemObj latestObj = new LyricItemObj("", ""); +// for (Iterator iter = set.iterator(); iter.hasNext();) { +// Map.Entry entry = (Map.Entry) iter.next(); +// int key = (int) entry.getKey(); +// if (time == key) +// return (LyricItemObj) entry.getValue(); +// else if (time < key) { +// return latestObj; +// } else { +// latestObj = (LyricItemObj) entry.getValue(); +// } +// } +// return latestObj; +// } public boolean checkTime(int playNow, boolean ktv) { if (lyric == null) return false; boolean res = false; - LyricItemObj temp = findLrcObj(lyric, playNow); + LyricItemObj temp = lyric.get(playNow); if (temp != null) { now = temp; lly = now.lyric; diff --git a/core/music/play/PlayGo.java b/core/music/play/PlayGo.java index f8c7c8cd..0ef263c7 100644 --- a/core/music/play/PlayGo.java +++ b/core/music/play/PlayGo.java @@ -172,20 +172,24 @@ public class PlayGo { if (PlayMusic.nowPlayMusic.getLength() != 0) { PlayMusic.musicAllTime = PlayMusic.musicLessTime = (PlayMusic.nowPlayMusic.getLength() / 1000) + 3; + startTimer(); + AllMusic.side.sendMusic(url); if (!AllMusic.getConfig().MutePlayMessage) { - String info = AllMusic.getMessage().MusicPlay.Play; - info = info.replace("%MusicName%", PlayMusic.nowPlayMusic.getName()) + String info = AllMusic.getMessage().MusicPlay.Play + .replace("%MusicName%", PlayMusic.nowPlayMusic.getName()) .replace("%MusicAuthor%", PlayMusic.nowPlayMusic.getAuthor()) .replace("%MusicAl%", PlayMusic.nowPlayMusic.getAl()) .replace("%MusicAlia%", PlayMusic.nowPlayMusic.getAlia()) .replace("%PlayerName%", PlayMusic.nowPlayMusic.getCall()); + if(AllMusic.getConfig().MessageLimit + && info.length() > AllMusic.getConfig().MessageLimitSize) { + info = info.substring(0, AllMusic.getConfig().MessageLimitSize) + "..."; + } if (AllMusic.getConfig().ShowInBar) AllMusic.side.sendBar(info); else AllMusic.side.bqt(info); } - startTimer(); - AllMusic.side.sendMusic(url); if (!PlayMusic.nowPlayMusic.isUrl() && PlayMusic.nowPlayMusic.getPicUrl() != null) { AllMusic.side.sendPic(PlayMusic.nowPlayMusic.getPicUrl()); } diff --git a/core/music/play/PlayMusic.java b/core/music/play/PlayMusic.java index fa6730df..e34744f2 100644 --- a/core/music/play/PlayMusic.java +++ b/core/music/play/PlayMusic.java @@ -130,11 +130,15 @@ public class PlayMusic { } playList.add(info); if (!AllMusic.getConfig().MuteAddMessage) { - String data = AllMusic.getMessage().MusicPlay.AddMusic; - data = data.replace("%MusicName%", info.getName()) + String data = AllMusic.getMessage().MusicPlay.AddMusic + .replace("%MusicName%", info.getName()) .replace("%MusicAuthor%", info.getAuthor()) .replace("%MusicAl%", info.getAl()) .replace("%MusicAlia%", info.getAlia()); + if(AllMusic.getConfig().MessageLimit + && data.length() > AllMusic.getConfig().MessageLimitSize) { + data = data.substring(0, AllMusic.getConfig().MessageLimitSize) + "..."; + } if (AllMusic.getConfig().ShowInBar) { AllMusic.side.sendBar(data); } else { diff --git a/core/objs/message/MusicPlayObj.java b/core/objs/message/MusicPlayObj.java index 0143bdd6..b20df524 100644 --- a/core/objs/message/MusicPlayObj.java +++ b/core/objs/message/MusicPlayObj.java @@ -48,7 +48,7 @@ public class MusicPlayObj { public void init() { StopPlay = "§d[AllMusic]§e已停止你的音乐播放"; NoMusic = "§d[AllMusic]§e无正在播放的歌曲"; - Play = "§d[AllMusic]§e正在播放:%MusicName% | %MusicAuthor% | %MusicAl% | %MusicAlia% | by: %PlayerName%"; + Play = "§d[AllMusic]§e正在播放:%MusicName% | %MusicAuthor% by:%PlayerName%"; NoPlay = "§d[AllMusic]§e队列中无歌曲"; ListMusic = ListMusicObj.make(); NoCanPlay = "§d[AllMusic]§c无法播放歌曲%MusicID%可能该歌曲为VIP歌曲"; diff --git a/fabric_1_16_5/gradle.properties b/fabric_1_16_5/gradle.properties index 89bb5654..8cf29705 100644 --- a/fabric_1_16_5/gradle.properties +++ b/fabric_1_16_5/gradle.properties @@ -6,11 +6,11 @@ org.gradle.parallel=true # check these on https://fabricmc.net/develop minecraft_version=1.16.5 yarn_mappings=1.16.5+build.10 -loader_version=0.14.14 +loader_version=0.15.3 fabric_kotlin_version=1.9.1+kotlin.1.8.10 # Mod Properties -mod_version = 2.18.14 +mod_version = 2.19.1 maven_group = coloryr.allmusic archives_base_name =[Fabric1.16.5]AllMusic_Server diff --git a/fabric_1_16_5/src/main/resources/fabric.mod.json b/fabric_1_16_5/src/main/resources/fabric.mod.json index 0768ad3e..f13c0d99 100644 --- a/fabric_1_16_5/src/main/resources/fabric.mod.json +++ b/fabric_1_16_5/src/main/resources/fabric.mod.json @@ -29,7 +29,7 @@ "fabricloader": ">=0.14.14", "minecraft": "~1.16", "java": ">=16", - "fabric-api": "*", + "fabric": "*", "fabric-language-kotlin": ">=1.8.10" }, "suggests": { diff --git a/folia/build.gradle b/folia/build.gradle index dded2df0..5ba9138a 100644 --- a/folia/build.gradle +++ b/folia/build.gradle @@ -3,7 +3,7 @@ plugins { id 'maven-publish' id 'com.github.johnrengelman.shadow' version '7.1.2' } -version = "2.18.14" +version = "2.19.2" repositories { mavenCentral() @@ -38,15 +38,15 @@ dependencies { //implementation "org.apache.commons:commons-dbcp2:2.9.0" //implementation 'mysql:mysql-connector-java:8.0.31' - compileOnly 'dev.folia:folia-api:1.19.4-R0.1-SNAPSHOT' + compileOnly 'dev.folia:folia-api:1.20-R0.1-SNAPSHOT' compileOnly "com.github.MilkBowl:VaultAPI:1.7.1" compileOnly 'me.clip:placeholderapi:2.10.10' //compileOnly 'net.citizensnpcs:citizens-main:2.0.30-SNAPSHOT' // compileOnly fileTree(dir:'lib',include:['*.jar']) //implementation 'org.xerial:sqlite-jdbc:3.39.3.0' - implementation 'com.squareup.okhttp3:okhttp:4.10.0' - implementation 'com.google.code.gson:gson:2.10' + implementation 'com.squareup.okhttp3:okhttp:4.12.0' + implementation 'com.google.code.gson:gson:2.10.1' } shadowJar { diff --git a/server/build.gradle b/server/build.gradle index 19d1593c..523e7b37 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -3,7 +3,7 @@ plugins { id 'maven-publish' id 'com.github.johnrengelman.shadow' version '6.1.0' } -version = "2.19.1" +version = "2.19.2" repositories { mavenCentral() @@ -34,7 +34,7 @@ dependencies { //implementation "org.apache.commons:commons-dbcp2:2.9.0" //implementation 'mysql:mysql-connector-java:8.0.31' - compileOnly 'org.spigotmc:spigot-api:1.19.2-R0.1-SNAPSHOT' + compileOnly 'org.spigotmc:spigot-api:1.20-R0.1-SNAPSHOT' //compileOnly 'net.md-5:bungeecord-api:1.19-R0.1-SNAPSHOT' compileOnly "com.github.MilkBowl:VaultAPI:1.7.1" //compileOnly 'com.velocitypowered:velocity-api:3.0.0' @@ -43,7 +43,7 @@ dependencies { // compileOnly fileTree(dir:'lib',include:['*.jar']) //implementation 'org.xerial:sqlite-jdbc:3.39.3.0' - compile 'com.squareup.okhttp3:okhttp:4.10.0' + compile 'com.squareup.okhttp3:okhttp:4.12.0' compile 'com.google.code.gson:gson:2.10' //annotationProcessor 'com.velocitypowered:velocity-api:3.0.0' diff --git a/server_top/build.gradle b/server_top/build.gradle index fe70d610..862ddcbf 100644 --- a/server_top/build.gradle +++ b/server_top/build.gradle @@ -3,7 +3,7 @@ plugins { id 'maven-publish' id 'com.github.johnrengelman.shadow' version '6.1.0' } -version = "2.18.14" +version = "2.19.2" repositories { mavenCentral() @@ -35,16 +35,16 @@ dependencies { //implementation 'mysql:mysql-connector-java:8.0.31' //compileOnly 'org.spigotmc:spigot-api:1.19.2-R0.1-SNAPSHOT' - compileOnly 'net.md-5:bungeecord-api:1.19-R0.1-SNAPSHOT' + compileOnly 'net.md-5:bungeecord-api:1.20-R0.1-SNAPSHOT' compileOnly "com.github.MilkBowl:VaultAPI:1.7.1" compileOnly 'com.velocitypowered:velocity-api:3.0.0' compileOnly 'me.clip:placeholderapi:2.10.10' //compileOnly 'net.citizensnpcs:citizens-main:2.0.30-SNAPSHOT' // compileOnly fileTree(dir:'lib',include:['*.jar']) - implementation 'org.xerial:sqlite-jdbc:3.39.3.0' - compile 'com.squareup.okhttp3:okhttp:4.10.0' - compile 'com.google.code.gson:gson:2.10' + implementation 'org.xerial:sqlite-jdbc:3.44.1.0' + compile 'com.squareup.okhttp3:okhttp:4.12.0' + compile 'com.google.code.gson:gson:2.10.1' annotationProcessor 'com.velocitypowered:velocity-api:3.0.0' } diff --git a/server_top/src/main/resources/bungee.yml b/server_top/src/main/resources/bungee.yml index 3951460f..7820cf16 100644 --- a/server_top/src/main/resources/bungee.yml +++ b/server_top/src/main/resources/bungee.yml @@ -1,4 +1,4 @@ name: AllMusic main: coloryr.allmusic.AllMusicBC author: Color_yr -version: 2.18.14 +version: 2.19.2