本文整理匯總了Java中lt.ekgame.bancho.api.units.Beatmap類的典型用法代碼示例。如果您正苦於以下問題:Java Beatmap類的具體用法?Java Beatmap怎麽用?Java Beatmap使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Beatmap類屬於lt.ekgame.bancho.api.units包,在下文中一共展示了Beatmap類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: BeatmapHandler
import lt.ekgame.bancho.api.units.Beatmap; //導入依賴的package包/類
public BeatmapHandler(String folder) {
File beatmapFolder = new File(folder);
if (beatmapFolder.exists() && beatmapFolder.isDirectory()) {
File[] files = beatmapFolder.listFiles(i -> i.getName().toLowerCase().endsWith("osu"));
for (File file : files) {
try {
Beatmap beatmap = new Beatmap(file);
beatmaps.add(beatmap);
}
catch (Exception e) {
System.err.println("Failed to load " + file.getName());
}
}
}
}
示例2: recentlyPlayed
import lt.ekgame.bancho.api.units.Beatmap; //導入依賴的package包/類
public boolean recentlyPlayed(Beatmap check, int recentness) {
int i = 0;
for (Beatmap beatmap : completed) {
if (beatmap.getChecksum().toLowerCase().equals(check.getChecksum().toLowerCase()))
if (completed.size() - i < recentness)
return true;
i++;
}
return false;
}
示例3: inQueue
import lt.ekgame.bancho.api.units.Beatmap; //導入依賴的package包/類
public boolean inQueue(Beatmap check) {
if (current != null && current.getChecksum().toLowerCase().equals(check.getChecksum().toLowerCase()))
return true;
for (Beatmap beatmap : beatmaps) {
if (beatmap.getChecksum().toLowerCase().equals(check.getChecksum().toLowerCase()))
return true;
}
return false;
}
示例4: onBeatmapChange
import lt.ekgame.bancho.api.units.Beatmap; //導入依賴的package包/類
public void onBeatmapChange() {
resetVoteSkip();
timer.resetTimer();
Beatmap beatmap = bot.beatmaps.getBeatmap();
if (beatmap == null) {
bot.bancho.sendMessage("#multiplayer", "No more beatmaps in the queue. Use !add [link to beatmap] to add more beatmaps.");
} else {
bot.bancho.sendMessage("#multiplayer", String.format("Up next: %s - %s [%s] mapped by %s.",
beatmap.getArtist(), beatmap.getTitle(), beatmap.getVersion(), beatmap.getCreator()));
}
}
示例5: onBeatmapAdded
import lt.ekgame.bancho.api.units.Beatmap; //導入依賴的package包/類
public void onBeatmapAdded(Beatmap beatmap) {
bot.bancho.sendMessage("#multiplayer", String.format("Added %s - %s [%s] mapped by %s",
beatmap.getArtist(), beatmap.getTitle(), beatmap.getVersion(), beatmap.getCreator()));
if (bot.beatmaps.getBeatmap() == null) {
MultiplayerHandler mp = bot.bancho.getMultiplayerHandler();
mp.setBeatmap(bot.beatmaps.nextBeatmap());
}
}
示例6: PacketStatusUpdate
import lt.ekgame.bancho.api.units.Beatmap; //導入依賴的package包/類
public PacketStatusUpdate(UserState status, Beatmap beatmap, Mods mods, Playmode playmode) {
this(status, beatmap.getName(), beatmap.getChecksum(), mods, playmode, 0);
}
示例7: setBeatmap
import lt.ekgame.bancho.api.units.Beatmap; //導入依賴的package包/類
public StatusBuilder setBeatmap(Beatmap beatmap) {
this.beatmap = beatmap;
return this;
}
示例8: setBeatmap
import lt.ekgame.bancho.api.units.Beatmap; //導入依賴的package包/類
public void setBeatmap(Beatmap beatmap) {
if (isHost()) {
currentRoom.setBeatmap(beatmap == null ? Beatmap.DEFAULT : beatmap);
sendRoomUpdate();
}
}
示例9: StatusImpl
import lt.ekgame.bancho.api.units.Beatmap; //導入依賴的package包/類
public StatusImpl(Beatmap beatmap, UserState state, Playmode playmode, Mods mods) {
this.beatmap = beatmap;
this.state = state;
this.playmode = playmode;
this.mods = mods;
}
示例10: getBeatmap
import lt.ekgame.bancho.api.units.Beatmap; //導入依賴的package包/類
@Override
public Beatmap getBeatmap() {
return beatmap;
}
示例11: nextBeatmap
import lt.ekgame.bancho.api.units.Beatmap; //導入依賴的package包/類
public Beatmap nextBeatmap() {
if (current != null)
completed.add(current);
current = beatmaps.poll();
return current;
}
示例12: getBeatmap
import lt.ekgame.bancho.api.units.Beatmap; //導入依賴的package包/類
public Beatmap getBeatmap() {
return current;
}
示例13: push
import lt.ekgame.bancho.api.units.Beatmap; //導入依賴的package包/類
public void push(Beatmap beatmap) {
beatmaps.add(beatmap);
}
示例14: setCurrentBeatmap
import lt.ekgame.bancho.api.units.Beatmap; //導入依賴的package包/類
public void setCurrentBeatmap(Beatmap beatmap) {
currentBeatmap = beatmap;
}
示例15: getCurrentBeatmap
import lt.ekgame.bancho.api.units.Beatmap; //導入依賴的package包/類
public Beatmap getCurrentBeatmap() {
return currentBeatmap;
}