File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed
src/main/java/top/mpt/xzystudio/flywars Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ public class Game {
35
35
/**
36
36
* 资源刷新
37
37
*/
38
- public static final ResourcesUpdate resUpdater = new ResourcesUpdate () ;
38
+ public static ResourcesUpdate resUpdater ;
39
39
40
40
private final CommandSender sender ;
41
41
@@ -128,6 +128,7 @@ public void startGame() {
128
128
@ Override
129
129
public void run () {
130
130
// 资源刷新点
131
+ resUpdater = new ResourcesUpdate ();
131
132
resUpdater .setGameWorld (pl .getWorld ());
132
133
try {
133
134
// if (!resUpdater.isCancelled()) resUpdater.cancel(); // 这样写没用,还是会报错,干脆不用它了,用trycatch
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ public void onTeamEliminated(TeamEliminatedEvent event) {
52
52
AtomicInteger ifGameOver = new AtomicInteger ();
53
53
AtomicReference <GameTeam > aliveTeam = null ;
54
54
Game .teams .forEach (it -> {
55
- if (Game .scoreboardManager .info . get (it ).getAlive ()){
55
+ if (Game .scoreboardManager .getInfo (it ).getAlive ()){
56
56
ifGameOver .getAndIncrement ();
57
57
aliveTeam .set (it );
58
58
}
Original file line number Diff line number Diff line change 16
16
*/
17
17
public class ResourcesUpdate extends BukkitRunnable {
18
18
// 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 >(){{
20
20
put ("firework-rocket" , Material .FIREWORK_ROCKET );
21
21
put ("arrow" , Material .ARROW );
22
22
put ("golden_apple" , Material .GOLDEN_APPLE );
23
23
}};
24
24
25
25
// 显示名称
26
- private static final Map <String , String > displayName = new HashMap <String , String >(){{
26
+ private final Map <String , String > displayName = new HashMap <String , String >(){{
27
27
put ("firework-rocket" , "#RED#核弹" );
28
28
put ("arrow" , "#WHITE#子弹" );
29
29
put ("golden_apple" , "#GOLD#天赐金苹果" );
@@ -36,7 +36,7 @@ public class ResourcesUpdate extends BukkitRunnable {
36
36
* 设置进行游戏的世界
37
37
* @param gameWorld 进行游戏的世界
38
38
*/
39
- public static void setGameWorld (World gameWorld ) {
39
+ public void setGameWorld (World gameWorld ) {
40
40
ResourcesUpdate .gameWorld = gameWorld ;
41
41
}
42
42
You can’t perform that action at this time.
0 commit comments