Skip to content

Commit cd2891a

Browse files
authored
Reset participant activity on match start (#5)
1 parent 09bcc62 commit cd2891a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/java/tc/oc/occ/idly/IdlyListener.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import org.bukkit.event.player.AsyncPlayerChatEvent;
77
import org.bukkit.event.player.PlayerJoinEvent;
88
import org.bukkit.event.player.PlayerMoveEvent;
9+
import tc.oc.pgm.api.match.event.MatchStartEvent;
910
import tc.oc.pgm.api.party.Competitor;
1011
import tc.oc.pgm.events.PlayerPartyChangeEvent;
1112

@@ -31,6 +32,11 @@ public void onPlayerPartyChange(PlayerPartyChangeEvent event) {
3132
}
3233
}
3334

35+
@EventHandler(priority = EventPriority.MONITOR)
36+
public void onMatchStart(MatchStartEvent event) {
37+
event.getMatch().getParticipants().forEach(p -> this.manager.logMovement(p.getBukkit()));
38+
}
39+
3440
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
3541
public void onPlayerChatEvent(AsyncPlayerChatEvent event) {
3642
if (config.isChatCheck()) {

0 commit comments

Comments
 (0)