Skip to content

Commit 68dd8ab

Browse files
committed
WindLeaf 进行的变更
1 parent 02edefb commit 68dd8ab

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/main/java/top/mpt/xzystudio/flywars/game/Game.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class Game {
3535
/**
3636
* 资源刷新
3737
*/
38-
public static final ResourcesUpdate resUpdater = new ResourcesUpdate();
38+
public static ResourcesUpdate resUpdater;
3939

4040
private final CommandSender sender;
4141

@@ -128,6 +128,7 @@ public void startGame() {
128128
@Override
129129
public void run() {
130130
// 资源刷新点
131+
resUpdater = new ResourcesUpdate();
131132
resUpdater.setGameWorld(pl.getWorld());
132133
try {
133134
// if (!resUpdater.isCancelled()) resUpdater.cancel(); // 这样写没用,还是会报错,干脆不用它了,用trycatch

src/main/java/top/mpt/xzystudio/flywars/listeners/GameEventListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public void onTeamEliminated(TeamEliminatedEvent event) {
5252
AtomicInteger ifGameOver = new AtomicInteger();
5353
AtomicReference<GameTeam> aliveTeam = null;
5454
Game.teams.forEach(it -> {
55-
if (Game.scoreboardManager.info.get(it).getAlive()){
55+
if (Game.scoreboardManager.getInfo(it).getAlive()){
5656
ifGameOver.getAndIncrement();
5757
aliveTeam.set(it);
5858
}

src/main/java/top/mpt/xzystudio/flywars/scheduler/ResourcesUpdate.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
*/
1717
public class ResourcesUpdate extends BukkitRunnable {
1818
// resource type
19-
private static final Map<String, Material> resType = new HashMap<String, Material>(){{
19+
private final Map<String, Material> resType = new HashMap<String, Material>(){{
2020
put("firework-rocket", Material.FIREWORK_ROCKET);
2121
put("arrow", Material.ARROW);
2222
put("golden_apple", Material.GOLDEN_APPLE);
2323
}};
2424

2525
// 显示名称
26-
private static final Map<String, String> displayName = new HashMap<String, String>(){{
26+
private final Map<String, String> displayName = new HashMap<String, String>(){{
2727
put("firework-rocket", "#RED#核弹");
2828
put("arrow", "#WHITE#子弹");
2929
put("golden_apple", "#GOLD#天赐金苹果");
@@ -36,7 +36,7 @@ public class ResourcesUpdate extends BukkitRunnable {
3636
* 设置进行游戏的世界
3737
* @param gameWorld 进行游戏的世界
3838
*/
39-
public static void setGameWorld(World gameWorld) {
39+
public void setGameWorld(World gameWorld) {
4040
ResourcesUpdate.gameWorld = gameWorld;
4141
}
4242

0 commit comments

Comments
 (0)