-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathBuildBattle.java
More file actions
43 lines (33 loc) · 1 KB
/
BuildBattle.java
File metadata and controls
43 lines (33 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import plugily.projects.buildbattle.api.event.game.BBGameChangeStateEvent;
import xyz.derkades.ssx_connector.Addon;
public class BuildBattle extends Addon {
private String state;
private String arena;
@Override
public String getAuthor() {
return "Lmmb74";
}
@Override
public String getDescription() {
return "Addon for the minigame BuildBattle by Plugily-Projects";
}
@Override
public String getVersion() {
return "1.0.0";
}
@Override
public void onLoad() {
this.registerListeners();
this.state = "Unknown";
this.addPlaceholder("bb-state", () -> this.config.getString(this.state));
this.arena = "Unknown";
this.addPlaceholder("bb-arena", () -> this.arena);
}
@EventHandler(priority = EventPriority.MONITOR)
public void onStateChange(final BBGameChangeStateEvent e) {
this.state = e.getState().getFormattedName();
this.arena = e.getArena().getMapName();
}
}