From 2cfc5ac039dbd6f479f40b424a8a37c1a6cc9680 Mon Sep 17 00:00:00 2001 From: XtraCube <72575280+XtraCube@users.noreply.github.com> Date: Sun, 23 Mar 2025 14:00:12 -0400 Subject: [PATCH] update example --- MiraAPI.Example/ExampleEventHandlers.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/MiraAPI.Example/ExampleEventHandlers.cs b/MiraAPI.Example/ExampleEventHandlers.cs index 2e8fdf2..d2a22d8 100644 --- a/MiraAPI.Example/ExampleEventHandlers.cs +++ b/MiraAPI.Example/ExampleEventHandlers.cs @@ -38,12 +38,9 @@ public static class ExampleEventHandlers [RegisterEvent] public static void StartMeetingEvent(StartMeetingEvent _) { - foreach (var plr in PlayerControl.AllPlayerControls) + foreach (var plr in PlayerControl.AllPlayerControls.ToArray().Where(player => player.Data.Role is MayorRole)) { - if (plr.Data.Role is MayorRole) - { - plr.GetVoteData().IncreaseRemainingVotes(1); - } + plr.GetVoteData().IncreaseRemainingVotes(1); } }