Skip to content

Commit

Permalink
加点小东西
Browse files Browse the repository at this point in the history
  • Loading branch information
Gingmzmzx committed Jan 13, 2023
1 parent 561895b commit 5734268
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
Expand Down Expand Up @@ -73,10 +74,13 @@ public void onGameOver(GameOverEvent event) {
// 重置计分板
Game.scoreboardManager.reset();
// 取消资源刷新

if (Game.resUpdater != null) Game.resUpdater.cancel(); // TODO 灰灰:结束后依然会刷凋落物
// TODO 灰灰:结束后清除已有的凋落物

if (Game.resUpdater != null) Game.resUpdater.cancel();
// 清除世界内的掉落物
event.getWinner().getP1().getWorld().getEntities().forEach(it -> {
if (it.getType() == EntityType.DROPPED_ITEM){
it.remove();
}
});
// 遍历teams数组
Game.teams.forEach(team -> {
// 把每个team注销
Expand Down

0 comments on commit 5734268

Please sign in to comment.