This commit is contained in:
Color_yr committed 2023-01-06 18:04:01 +08:00
1 parent f255d889c2
commit 6d0a270f6b
3 files changed
+12 -8

No files matched your search

@@ -143,12 +143,12 @@ public class CommandEX {
AllMusic.getMessage().Page.Last, "/music lastpage");
}
for (int a = 0; a < index; a++) {
item = search.getRes(a + search.Page * 10);
item = search.getRes(a + search.getPage() * 10);
info = AllMusic.getMessage().Page.Choice;
info = info.replace("%index%", "" + (a + 1))
.replace("%MusicName%", item.getName())
.replace("%MusicAuthor%", item.getAuthor())
.replace("%MusicAl%", item.getAl());
.replace("%MusicName%", item.name)
.replace("%MusicAuthor%", item.author)
.replace("%MusicAl%", item.al);
AllMusic.side.sendMessageRun(sender, info,
AllMusic.getMessage().Click.This, "/music select " + (a + 1));
}
@@ -304,7 +304,7 @@ public class CommandEX {
return;
}
String[] ID = new String[1];
ID[0] = obj.getSong((obj.Page * 10) + (a - 1));
ID[0] = obj.getSong((obj.getPage() * 10) + (a - 1));
AllMusic.side.sendMessage(sender,
AllMusic.getMessage().Search.Chose.replace("%Num%", "" + a));
addMusic(sender, name, ID);
@@ -46,4 +46,8 @@ public class SearchPage {
public boolean haveLastPage() {
return page != 0;
}
public int getPage() {
return page;
}
}
@@ -55,7 +55,7 @@ public class AllMusicPAPI extends PlaceholderExpansion {
@Override
public String onRequest(OfflinePlayer player, @NotNull String identifier) {
if (AllMusic.getConfig().isTopPAPI()) {
if (AllMusic.getConfig().TopPAPI) {
if (!PluginMessage.update) {
PluginMessage.startUpdate();
return "";
@@ -77,7 +77,7 @@ public class AllMusicPAPI extends PlaceholderExpansion {
return PlayMusic.nowPlayMusic.getCall();
}
case "now_music_info": {
return PlayMusic.nowPlayMusic.Info;
return PlayMusic.nowPlayMusic.getInfo();
}
case "list_size": {
return "" + PluginMessage.size;
@@ -122,7 +122,7 @@ public class AllMusicPAPI extends PlaceholderExpansion {
case "now_music_info": {
if (PlayMusic.nowPlayMusic == null)
return "";
return PlayMusic.nowPlayMusic.Info;
return PlayMusic.nowPlayMusic.getInfo();
}
case "list_size": {
return "" + PlayMusic.getSize();