-
Notifications
You must be signed in to change notification settings - Fork 4
/
MurderMystery.java
44 lines (33 loc) · 1.01 KB
/
MurderMystery.java
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
44
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import plugily.projects.murdermystery.api.events.game.MMGameStateChangeEvent;
import xyz.derkades.ssx_connector.Addon;
public class MurderMystery extends Addon {
private String state;
private String arena;
@Override
public String getAuthor() {
return "Lmmb74";
}
@Override
public String getDescription() {
return "Addon for the minigame MurderMystery by Plugily-Projects";
}
@Override
public String getVersion() {
return "1.1.0";
}
@Override
public void onLoad() {
this.registerListeners();
this.state = "Unknown";
this.addPlaceholder("mm-state", () -> this.config.getString(this.state));
this.arena = "Unknown";
this.addPlaceholder("mm-arena", () -> this.arena);
}
@EventHandler(priority = EventPriority.MONITOR)
public void onStateChange(final MMGameStateChangeEvent e) {
this.state = e.getArenaState().getFormattedName();
this.arena = e.getArena().getMapName();
}
}