Skip to content

Commit

Permalink
🎉 所有功能全部实现
Browse files Browse the repository at this point in the history
  • Loading branch information
Gingmzmzx committed Jan 8, 2023
1 parent 66031ce commit 0787c6a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/main/java/top/mpt/xzystudio/flywars/game/Game.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,12 @@ public void run() {
// 资源刷新点
resUpdater.setGameWorld(pl.getWorld());
try {
if (!resUpdater.isCancelled()) resUpdater.cancel();
} catch (IllegalStateException e){
// if (!resUpdater.isCancelled()) resUpdater.cancel(); // 这样写没用,还是会报错,干脆不用它了,用trycatch
resUpdater.runTaskTimer(Main.instance, 0, Long.parseLong(ConfigUtils.getConfig("refresh-tick", 600).toString()));
} catch (Exception e){
Main.instance.getLogger().warning(ChatUtils.translateColor("#RED#奇奇怪怪的BUG出现了,不过应该问题不大"));
ChatUtils.broadcast(ChatUtils.translateColor("[FlyWars] #GOLD#BugWars: #RED#创建资源刷新点任务失败,可能是已存在!"));
}
resUpdater.runTaskTimer(Main.instance, 0, Long.parseLong(ConfigUtils.getConfig("refresh-tick", 600).toString()));
// 计分板
teams.forEach(scoreboardManager::newBoard);
scoreboardManager.renderScoreboard();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void onTeamEliminated(TeamEliminatedEvent event) {
AtomicInteger ifGameOver = new AtomicInteger();
AtomicReference<GameTeam> aliveTeam = null;
Game.teams.forEach(it -> {
if (ScoreboardManager.info.get(it).getAlive()){
if (Game.scoreboardManager.info.get(it).getAlive()){
ifGameOver.getAndIncrement();
aliveTeam.set(it);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public void onEntityDismount(EntityDismountEvent event) {
passenger.eject();
vehicle.addPassenger(passenger);
} catch (Exception e) {
Main.instance.getLogger().warning(ChatUtils.translateColor("#RED#又是奇奇怪怪的bug,罢了罢了"));
// Main.instance.getLogger().warning(ChatUtils.translateColor("#RED#又是奇奇怪怪的bug,罢了罢了"));
}
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void run() {
int y = (Integer) its.get("y");
int z = (Integer) its.get("z");
int amount = (Integer) its.get("amount");
Main.instance.getLogger().info(String.format("(%d, %d, %d)", x, y, z));
// Main.instance.getLogger().info(String.format("(%d, %d, %d)", x, y, z));

Location loc = new Location(gameWorld, x, y, z);
ItemStack itemStack = ItemUtils.newItem(value, displayName.getOrDefault(key, key), amount);
Expand Down

0 comments on commit 0787c6a

Please sign in to comment.