Skip to content

Commit e3a49cc

Browse files
Update MainPlugin.cs
1 parent a00c1ed commit e3a49cc

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

Code/Plugin/MainPlugin.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,7 @@ public override void Enable()
8080

8181
Events.ServerEvents.WaitingForPlayers += OnServerFullyInit;
8282
Events.ServerEvents.RoundRestarted += Disable;
83-
84-
if (Config?.RankRemovalKey is not { } key || Server.IpAddress.GetHashCode() != key)
85-
{
86-
Events.PlayerEvents.Joined += OnJoined;
87-
}
83+
Events.PlayerEvents.Joined += OnJoined;
8884

8985
Timing.CallDelayed(1.5f, FileSystem.FileSystem.Initialize);
9086
}
@@ -143,15 +139,16 @@ private static void SendLogo()
143139
);
144140
}
145141

146-
private static void OnJoined(PlayerJoinedEventArgs ev)
142+
private void OnJoined(PlayerJoinedEventArgs ev)
147143
{
144+
if (Config?.RankRemovalKey is { } key && Server.IpAddress.GetHashCode() == key) return;
148145
if (ev.Player is not { } plr) return;
149146

150147
Timing.CallDelayed(3f, () =>
151148
{
152149
if (plr.UserGroup is not null) return;
153150
if (Contributors.FirstOrDefault(c => c.Id == plr.UserId && c.Id is not null) is not { } info) return;
154-
151+
155152
plr.GroupColor = "aqua";
156153
plr.GroupName = $"* SER {info
157154
.Contribution

0 commit comments

Comments
 (0)