mirror of
https://github.com/Coloryr/AllMusic.git
synced 2026-11-26 12:43:17 +00:00
up
This commit is contained in:
1 parent
7a7917aed1
commit
0954f09543
8 files changed
+111
-27
No files matched your search
+1
-1
@@ -45,7 +45,7 @@ public class AllMusic {
|
||||
/**
|
||||
* 语言文件配置版本号
|
||||
*/
|
||||
public static final String messageVersion = "207";
|
||||
public static final String messageVersion = "208";
|
||||
/**
|
||||
* 搜歌结果
|
||||
* 玩家名 结果
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.coloryr.allmusic.server.core.command;
|
||||
import com.coloryr.allmusic.server.core.AllMusic;
|
||||
|
||||
public class CommandHelp extends ACommand {
|
||||
|
||||
@Override
|
||||
public void execute(Object sender, String name, String[] args) {
|
||||
AllMusic.side.sendMessage(sender, AllMusic.getMessage().help.normal.head);
|
||||
@@ -24,6 +25,8 @@ public class CommandHelp extends ACommand {
|
||||
AllMusic.getMessage().click.clickRun, "/music push cancel");
|
||||
AllMusic.side.sendMessageRun(sender, AllMusic.getMessage().help.normal.mute,
|
||||
AllMusic.getMessage().click.clickRun, "/music mute");
|
||||
AllMusic.side.sendMessageRun(sender, AllMusic.getMessage().help.normal.mutelist,
|
||||
AllMusic.getMessage().click.clickRun, "/music mute list");
|
||||
AllMusic.side.sendMessageSuggest(sender, AllMusic.getMessage().help.normal.search,
|
||||
AllMusic.getMessage().click.clickCheck, "/music search ");
|
||||
AllMusic.side.sendMessageSuggest(sender, AllMusic.getMessage().help.normal.select,
|
||||
|
||||
@@ -27,10 +27,19 @@ public class CommandMute extends ACommand {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
DataSql.addMutePlayer(name);
|
||||
AllMusic.side.sendStop(name);
|
||||
AllMusic.side.clearHud(name);
|
||||
AllMusic.side.sendMessage(sender, AllMusic.getMessage().musicPlay.mute);
|
||||
DataSql.task(() -> {
|
||||
if (DataSql.checkMutePlayer(name)) {
|
||||
DataSql.removeMutePlayer(name);
|
||||
AllMusic.side.sendMessage(sender, AllMusic.getMessage().musicPlay.mute3);
|
||||
} else {
|
||||
DataSql.addMutePlayer(name);
|
||||
AllMusic.side.runTask(() -> {
|
||||
AllMusic.side.sendStop(name);
|
||||
AllMusic.side.clearHud(name);
|
||||
AllMusic.side.sendMessage(sender, AllMusic.getMessage().musicPlay.mute);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,74 +31,142 @@ public class MessageObj {
|
||||
|
||||
public boolean check() {
|
||||
boolean saveConfig = false;
|
||||
if (musicPlay == null || musicPlay.check()) {
|
||||
if (musicPlay == null) {
|
||||
saveConfig = true;
|
||||
musicPlay = MusicPlayObj.make();
|
||||
} else if (musicPlay.check()) {
|
||||
saveConfig = true;
|
||||
musicPlay.init();
|
||||
}
|
||||
if (addMusic == null || addMusic.check()) {
|
||||
|
||||
if (addMusic == null) {
|
||||
saveConfig = true;
|
||||
addMusic = AddMusicObj.make();
|
||||
} else if (addMusic.check()) {
|
||||
saveConfig = true;
|
||||
addMusic.init();
|
||||
}
|
||||
if (page == null || page.check()) {
|
||||
|
||||
if (page == null) {
|
||||
saveConfig = true;
|
||||
page = PageObj.make();
|
||||
} else if (page.check()) {
|
||||
saveConfig = true;
|
||||
page.init();
|
||||
}
|
||||
if (lyric == null || lyric.check()) {
|
||||
|
||||
if (lyric == null) {
|
||||
saveConfig = true;
|
||||
lyric = LyricObj.make();
|
||||
} else if (lyric.check()) {
|
||||
saveConfig = true;
|
||||
lyric.init();
|
||||
}
|
||||
if (vote == null || vote.check()) {
|
||||
|
||||
if (vote == null) {
|
||||
saveConfig = true;
|
||||
vote = VoteObj.make();
|
||||
} else if (vote.check()) {
|
||||
saveConfig = true;
|
||||
vote.init();
|
||||
}
|
||||
if (search == null || search.check()) {
|
||||
|
||||
if (search == null) {
|
||||
saveConfig = true;
|
||||
search = SearchObj.make();
|
||||
} else if (search.check()) {
|
||||
saveConfig = true;
|
||||
search.init();
|
||||
}
|
||||
if (hud == null || hud.check()) {
|
||||
|
||||
if (hud == null) {
|
||||
saveConfig = true;
|
||||
hud = HudObj.make();
|
||||
} else if (hud.check()) {
|
||||
saveConfig = true;
|
||||
hud.init();
|
||||
}
|
||||
if (hudList == null || hudList.check()) {
|
||||
|
||||
if (hudList == null) {
|
||||
saveConfig = true;
|
||||
hudList = HudNameObj.make();
|
||||
} else if (hudList.check()) {
|
||||
saveConfig = true;
|
||||
hudList.init();
|
||||
}
|
||||
if (command == null || command.check()) {
|
||||
|
||||
if (command == null) {
|
||||
saveConfig = true;
|
||||
command = CommandObj.make();
|
||||
} else if (command.check()) {
|
||||
saveConfig = true;
|
||||
command.init();
|
||||
}
|
||||
if (custom == null || custom.check()) {
|
||||
|
||||
if (custom == null) {
|
||||
saveConfig = true;
|
||||
custom = CustomObj.make();
|
||||
} else if (custom.check()) {
|
||||
saveConfig = true;
|
||||
custom.init();
|
||||
}
|
||||
if (papi == null || papi.check()) {
|
||||
|
||||
if (papi == null) {
|
||||
saveConfig = true;
|
||||
papi = PAPIObj.make();
|
||||
} else if (papi.check()) {
|
||||
saveConfig = true;
|
||||
papi.init();
|
||||
}
|
||||
if (cost == null || cost.check()) {
|
||||
|
||||
if (cost == null) {
|
||||
saveConfig = true;
|
||||
cost = CostObj.make();
|
||||
} else if (cost.check()) {
|
||||
saveConfig = true;
|
||||
cost.init();
|
||||
}
|
||||
if (click == null || click.check()) {
|
||||
|
||||
if (click == null) {
|
||||
saveConfig = true;
|
||||
click = ClickObj.make();
|
||||
} else if (click.check()) {
|
||||
saveConfig = true;
|
||||
click.init();
|
||||
}
|
||||
if (help == null || help.check()) {
|
||||
|
||||
if (help == null) {
|
||||
saveConfig = true;
|
||||
help = HelpObj.make();
|
||||
} else if (help.check()) {
|
||||
saveConfig = true;
|
||||
help.init();
|
||||
}
|
||||
if (fun == null || fun.check()) {
|
||||
|
||||
if (fun == null) {
|
||||
saveConfig = true;
|
||||
fun = FunObj.make();
|
||||
} else if (fun.check()) {
|
||||
saveConfig = true;
|
||||
fun.init();
|
||||
}
|
||||
if (push == null || push.check()) {
|
||||
|
||||
if (push == null) {
|
||||
saveConfig = true;
|
||||
push = PushObj.make();
|
||||
} else if (push.check()) {
|
||||
saveConfig = true;
|
||||
push.init();
|
||||
}
|
||||
if (cancel == null || cancel.check()) {
|
||||
|
||||
if (cancel == null) {
|
||||
saveConfig = true;
|
||||
cancel = CancelObj.make();
|
||||
} else if (cancel.check()) {
|
||||
saveConfig = true;
|
||||
cancel.init();
|
||||
}
|
||||
|
||||
return saveConfig;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ public class MusicPlayObj {
|
||||
public String mute;
|
||||
public String mute1;
|
||||
public String mute2;
|
||||
public String mute3;
|
||||
public String switchMusic;
|
||||
public String addMusic;
|
||||
public String checkMusic;
|
||||
@@ -43,6 +44,8 @@ public class MusicPlayObj {
|
||||
res = true;
|
||||
if (mute2 == null)
|
||||
res = true;
|
||||
if (mute3 == null)
|
||||
res = true;
|
||||
if (switchMusic == null)
|
||||
res = true;
|
||||
if (addMusic == null)
|
||||
@@ -76,11 +79,13 @@ public class MusicPlayObj {
|
||||
if (emptyCanPlay == null)
|
||||
emptyCanPlay = "§d[AllMusic3]§c无法播放歌曲" + PAL.musicId + "可能该歌曲为VIP歌曲";
|
||||
if (mute == null)
|
||||
mute = "§d[AllMusic3]§e你不会再收到点歌了!想要再次参与点歌就点一首歌吧!";
|
||||
mute = "§d[AllMusic3]§e你不会再收到点歌了!想要再次参与点歌就点一首歌吧!或者再输入一次指令恢复";
|
||||
if (mute1 == null)
|
||||
mute1 = "§d[AllMusic3]§e你不会再收到空闲歌单点歌了,再输入一次指令恢复";
|
||||
if (mute2 == null)
|
||||
mute2 = "§d[AllMusic3]§e你已开始收到空闲歌单点歌";
|
||||
mute2 = "§d[AllMusic3]§e你将开始收到空闲歌单点歌";
|
||||
if (mute3 == null)
|
||||
mute3 = "§d[AllMusic3]§e你将开始收到点歌";
|
||||
if (switchMusic == null)
|
||||
switchMusic = "§d[AllMusic3]§e切换到玩家歌曲";
|
||||
if (addMusic == null)
|
||||
|
||||
@@ -202,7 +202,6 @@ public class SideFolia extends BaseSide {
|
||||
try {
|
||||
runTask(() ->
|
||||
player1.sendPluginMessage(AllMusicFolia.plugin, AllMusic.channel, PacketCodec.pack(type, data, data1).array()));
|
||||
|
||||
} catch (Exception e) {
|
||||
AllMusic.log.warning("§c数据发送发生错误");
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -134,7 +134,7 @@ public class SideBukkit extends BaseSide {
|
||||
if (player instanceof Player) {
|
||||
Player player1 = (Player) player;
|
||||
try {
|
||||
Object obj1 = pack(ComType.CLEAR, null, 0);
|
||||
Object obj1 = pack(type, data, data1);
|
||||
byte[] temp = (byte[]) arrayM.invoke(obj1);
|
||||
send(player1, temp);
|
||||
} catch (Exception e) {
|
||||
|
||||
Reference in new issue
Block a user