mirror of
https://github.com/Coloryr/AllMusic.git
synced 2026-11-19 14:19:07 +00:00
修bug
This commit is contained in:
1 parent
712375a76a
commit
f72c95fbf9
2 files changed
+6
-5
No files matched your search
@@ -27,6 +27,7 @@ public class PlayMusic {
|
||||
|
||||
public static int Vote_time = 0;
|
||||
public static int All_music = 0;
|
||||
public static int Music_time = 0;
|
||||
|
||||
static Thread playgo = new playgo();
|
||||
|
||||
@@ -118,22 +119,22 @@ class playgo extends Thread {
|
||||
String playsong = PlayMusic.playlist.get("0");
|
||||
String song = PlayMusic.realURL(ALLmusic_BC.Music_Api1 + playsong);
|
||||
if (song != null) {
|
||||
int Music_time = PlayMusic.Music_Time(song);
|
||||
PlayMusic.Music_time = PlayMusic.Music_Time(song);
|
||||
ProxyServer.getInstance().broadcast(new TextComponent("§d[ALLmusic]§2" + "正在播放歌曲" + playsong));
|
||||
PlayMusic.SendToPlayer("[Net]" + song);
|
||||
PlayMusic.playlist.remove("0");
|
||||
music_list();
|
||||
try {
|
||||
while (Music_time > 0) {
|
||||
while (PlayMusic.Music_time > 0) {
|
||||
Thread.sleep(1000);
|
||||
Music_time--;
|
||||
PlayMusic.Music_time--;
|
||||
if (PlayMusic.Vote_time > 0) {
|
||||
PlayMusic.Vote_time--;
|
||||
int players = ProxyServer.getInstance().getOnlineCount();
|
||||
if (PlayMusic.Vote.size() >= ALLmusic_BC.min_vote || (players < ALLmusic_BC.min_vote && players == PlayMusic.Vote.size())) {
|
||||
ProxyServer.getInstance().broadcast(new TextComponent("§d[ALLmusic]§2" + "已切歌"));
|
||||
PlayMusic.SendToPlayer("[Stop]");
|
||||
Music_time = 0;
|
||||
PlayMusic.Music_time = 0;
|
||||
if (PlayMusic.All_music == 0) {
|
||||
ProxyServer.getInstance().broadcast(new TextComponent("§d[ALLmusic]§2" + "队列中无歌曲"));
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ public class command extends Command {
|
||||
ALLmusic_BC.reloadConfig();
|
||||
sender.sendMessage(new TextComponent("§d[ALLmusic]§2已重读配置文件"));
|
||||
} else if (args[0].equalsIgnoreCase("next") && sender.hasPermission("ALLmusic.admin")) {
|
||||
PlayMusic.Vote_time = 0;
|
||||
PlayMusic.Music_time = 1;
|
||||
PlayMusic.SendToPlayer("[Stop]");
|
||||
sender.sendMessage(new TextComponent("§d[ALLmusic]§2已切歌"));
|
||||
} else
|
||||
|
||||
Reference in new issue
Block a user