forked from OxideMod/Oxide.Rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRustHooks.cs
More file actions
715 lines (631 loc) · 26 KB
/
RustHooks.cs
File metadata and controls
715 lines (631 loc) · 26 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
using ConVar;
using Network;
using Oxide.Core;
using Oxide.Core.Configuration;
using Oxide.Core.Libraries.Covalence;
using Oxide.Core.Plugins;
using Oxide.Core.RemoteConsole;
using Oxide.Game.Rust.Libraries.Covalence;
using Rust.Ai.Gen2;
using Steamworks;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Net;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using UnityEngine;
namespace Oxide.Game.Rust
{
/// <summary>
/// Game hooks and wrappers for the core Rust plugin
/// </summary>
public partial class RustCore
{
internal bool isPlayerTakingDamage;
internal static string ipPattern = @":{1}[0-9]{1}\d*";
private static readonly DateTime Eoy = new DateTime(2025, 12, 31);
#region Entity Hooks
/// <summary>
/// Called when a BaseCombatEntity takes damage
/// This is used to call OnEntityTakeDamage for anything other than a BasePlayer
/// </summary>
/// <param name="entity"></param>
/// <param name="hitInfo"></param>
/// <returns></returns>
[HookMethod("IOnBaseCombatEntityHurt")]
private object IOnBaseCombatEntityHurt(BaseCombatEntity entity, HitInfo hitInfo)
{
return entity is BasePlayer ? null : Interface.CallHook("OnEntityTakeDamage", entity, hitInfo);
}
/// <summary>
/// Called when an NPC animal tries to target an entity
/// </summary>
/// <param name="npc"></param>
/// <param name="target"></param>
/// <returns></returns>
[HookMethod("IOnNpcTarget")]
private object IOnNpcTarget(BaseNpc npc, BaseEntity target)
{
if (Interface.CallHook("OnNpcTarget", npc, target) != null)
{
npc.SetFact(BaseNpc.Facts.HasEnemy, 0);
npc.SetFact(BaseNpc.Facts.EnemyRange, 3);
npc.SetFact(BaseNpc.Facts.AfraidRange, 1);
//TODO: Find replacements of those:
// npc.AiContext.EnemyPlayer = null;
// npc.AiContext.LastEnemyPlayerScore = 0f;
npc.playerTargetDecisionStartTime = 0f;
return 0f;
}
return null;
}
/// <summary>
/// Called when an NPC tries to target an entity
/// </summary>
/// <param name="sense"></param>
/// <param name="target"></param>
/// <returns></returns>
[HookMethod("IOnNpcTarget")]
private object IOnNpcTarget(SenseComponent sense, BaseEntity target)
{
if (!sense || !target)
{
return null;
}
BaseEntity baseEntity = sense.baseEntity;
if (!baseEntity)
{
return null;
}
if (Interface.CallHook("OnNpcTarget", baseEntity, target) != null)
{
return false;
}
return null;
}
/// <summary>
/// Called after a BaseNetworkable has been saved into a ProtoBuf object that is about to
/// be serialized for a network connection or cache
/// </summary>
/// <param name="baseNetworkable"></param>
/// <param name="saveInfo"></param>
[HookMethod("IOnEntitySaved")]
private void IOnEntitySaved(BaseNetworkable baseNetworkable, BaseNetworkable.SaveInfo saveInfo)
{
// Only call when saving for the network since we don't expect plugins to want to intercept saving to disk
if (!serverInitialized || saveInfo.forConnection == null)
{
return;
}
Interface.CallHook("OnEntitySaved", baseNetworkable, saveInfo);
}
#endregion Entity Hooks
#region Item Hooks
/// <summary>
/// Called when an item loses durability
/// </summary>
/// <param name="item"></param>
/// <param name="amount"></param>
/// <returns></returns>
[HookMethod("IOnLoseCondition")]
private object IOnLoseCondition(Item item, float amount)
{
object[] arguments = { item, amount };
Interface.CallHook("OnLoseCondition", arguments);
amount = (float)arguments[1];
float condition = item.condition;
item.condition -= amount;
if (item.condition <= 0f && item.condition < condition)
{
item.OnBroken();
}
return true;
}
#endregion Item Hooks
#region Player Hooks
/// <summary>
/// Called when a player attempts to pick up a DoorCloser or RFTimedExplosive entity
/// </summary>
/// <param name="basePlayer"></param>
/// <param name="entity"></param>
/// <returns></returns>
[HookMethod("ICanPickupEntity")]
private object ICanPickupEntity(BasePlayer basePlayer, BaseEntity entity)
{
object callHook = Interface.CallHook("CanPickupEntity", basePlayer, entity);
return callHook is bool result && !result ? (object)true : null;
}
/// <summary>
/// Called when a BasePlayer is attacked
/// This is used to call OnEntityTakeDamage for a BasePlayer when attacked
/// </summary>
/// <param name="basePlayer"></param>
/// <param name="hitInfo"></param>
[HookMethod("IOnBasePlayerAttacked")]
private object IOnBasePlayerAttacked(BasePlayer basePlayer, HitInfo hitInfo)
{
if (!serverInitialized || basePlayer == null || hitInfo == null || basePlayer.IsDead() || isPlayerTakingDamage || basePlayer is NPCPlayer)
{
return null;
}
if (Interface.CallHook("OnEntityTakeDamage", basePlayer, hitInfo) != null)
{
return true;
}
isPlayerTakingDamage = true;
try
{
basePlayer.OnAttacked(hitInfo);
}
finally
{
isPlayerTakingDamage = false;
}
return true;
}
/// <summary>
/// Called when a BasePlayer is hurt
/// This is used to call OnEntityTakeDamage when the player was hurt without being attacked
/// </summary>
/// <param name="basePlayer"></param>
/// <param name="hitInfo"></param>
/// <returns></returns>
[HookMethod("IOnBasePlayerHurt")]
private object IOnBasePlayerHurt(BasePlayer basePlayer, HitInfo hitInfo)
{
return isPlayerTakingDamage ? null : Interface.CallHook("OnEntityTakeDamage", basePlayer, hitInfo);
}
/// <summary>
/// Called when a server group is set for an ID (i.e. banned)
/// </summary>
/// <param name="steamId"></param>
/// <param name="group"></param>
/// <param name="playerName"></param>
/// <param name="reason"></param>
/// <param name="expiry"></param>
[HookMethod("OnServerUserSet")]
private void OnServerUserSet(ulong steamId, ServerUsers.UserGroup group, string playerName, string reason, long expiry)
{
if (serverInitialized && group == ServerUsers.UserGroup.Banned)
{
string playerId = steamId.ToString();
IPlayer player = Covalence.PlayerManager.FindPlayerById(playerId);
Interface.CallHook("OnPlayerBanned", playerName, steamId, player?.Address ?? "0", reason, expiry);
Interface.CallHook("OnUserBanned", playerName, playerId, player?.Address ?? "0", reason, expiry);
}
}
/// <summary>
/// Called when a server group is removed for an ID (i.e. unbanned)
/// </summary>
/// <param name="steamId"></param>
[HookMethod("OnServerUserRemove")]
private void OnServerUserRemove(ulong steamId)
{
if (serverInitialized && ServerUsers.users.ContainsKey(steamId) && ServerUsers.users[steamId].group == ServerUsers.UserGroup.Banned)
{
string playerId = steamId.ToString();
IPlayer player = Covalence.PlayerManager.FindPlayerById(playerId);
Interface.CallHook("OnPlayerUnbanned", player?.Name ?? "Unnamed", steamId, player?.Address ?? "0");
Interface.CallHook("OnUserUnbanned", player?.Name ?? "Unnamed", playerId, player?.Address ?? "0");
}
}
/// <summary>
/// Called when the player is attempting to connect
/// </summary>
/// <param name="connection"></param>
/// <returns></returns>
[HookMethod("IOnUserApprove")]
private object IOnUserApprove(Connection connection)
{
string playerName = connection.username;
string connectionId = connection.userid.ToString();
string connectionIp = Regex.Replace(connection.ipaddress, ipPattern, "");
uint authLevel = connection.authLevel;
// Update name and groups with permissions
if (permission.IsLoaded)
{
permission.UpdateNickname(connectionId, playerName);
OxideConfig.DefaultGroups defaultGroups = Interface.Oxide.Config.Options.DefaultGroups;
if (!permission.UserHasGroup(connectionId, defaultGroups.Players))
{
permission.AddUserGroup(connectionId, defaultGroups.Players);
}
if (authLevel >= 2 && !permission.UserHasGroup(connectionId, defaultGroups.Administrators))
{
permission.AddUserGroup(connectionId, defaultGroups.Administrators);
}
}
// Let covalence know
Covalence.PlayerManager.PlayerJoin(connection.userid, playerName);
// Call hooks for plugins
object loginSpecific = Interface.CallHook("CanClientLogin", connection);
object loginCovalence = Interface.CallHook("CanUserLogin", playerName, connectionId, connectionIp);
object canLogin = loginSpecific is null ? loginCovalence : loginSpecific;
if (canLogin is string || canLogin is bool loginBlocked && !loginBlocked)
{
ConnectionAuth.Reject(connection, canLogin is string ? canLogin.ToString() : lang.GetMessage("ConnectionRejected", this, connectionId));
return true;
}
// Call hooks for plugins
object approvedSpecific = Interface.CallHook("OnUserApprove", connection);
object approvedCovalence = Interface.CallHook("OnUserApproved", playerName, connectionId, connectionIp);
return approvedSpecific is null ? approvedCovalence : approvedSpecific;
}
/// <summary>
/// Called when the player has been banned by Publisher/VAC
/// </summary>
/// <param name="connection"></param>
/// <param name="status"></param>
[HookMethod("IOnPlayerBanned")]
private void IOnPlayerBanned(Connection connection, AuthResponse status)
{
// TODO: Get BasePlayer and pass instead of Connection
Interface.CallHook("OnPlayerBanned", connection, status.ToString());
}
/// <summary>
/// Called when the player sends a chat message
/// </summary>
/// <param name="playerId"></param>
/// <param name="playerName"></param>
/// <param name="message"></param>
/// <param name="channel"></param>
/// <param name="basePlayer"></param>
/// <returns></returns>
[HookMethod("IOnPlayerChat")]
private object IOnPlayerChat(ulong playerId, string playerName, string message, Chat.ChatChannel channel, BasePlayer basePlayer)
{
// Ignore empty and "default" text
if (string.IsNullOrEmpty(message) || message.Equals("text"))
{
return true;
}
// Check if chat command
string chatCommandPrefix = CommandHandler.GetChatCommandPrefix(message);
if ( chatCommandPrefix != null )
{
TryRunPlayerCommand( basePlayer, message, chatCommandPrefix );
return false;
}
message = message.EscapeRichText();
// Check if using Rust+ app
if (basePlayer == null || !basePlayer.IsConnected)
{
// Call offline chat hook
return Interface.CallHook("OnPlayerOfflineChat", playerId, playerName, message, channel);
}
// Call hooks for plugins
object chatSpecific = Interface.CallHook("OnPlayerChat", basePlayer, message, channel);
object chatCovalence = Interface.CallHook("OnUserChat", basePlayer.IPlayer, message);
return chatSpecific is null ? chatCovalence : chatSpecific;
}
/// <summary>
/// Called when the player sends a chat command
/// </summary>
/// <param name="basePlayer"></param>
/// <param name="message"></param>
/// <returns></returns>
private void TryRunPlayerCommand(BasePlayer basePlayer, string message, string commandPrefix)
{
if (basePlayer == null)
{
return;
}
string str = message.Replace("\n", "").Replace("\r", "").Trim();
// Check if it is a chat command
if (string.IsNullOrEmpty(str))
{
return;
}
// Parse the command
ParseCommand(str.Substring(commandPrefix.Length), out string cmd, out string[] args);
if (cmd == null)
{
return;
}
// Check if using Rust+ app
if (!basePlayer.IsConnected)
{
Interface.CallHook("OnApplicationCommand", basePlayer, cmd, args);
Interface.CallHook("OnApplicationCommand", basePlayer.IPlayer, cmd, args);
return;
}
// Is the command blocked?
object commandSpecific = Interface.CallHook("OnPlayerCommand", basePlayer, cmd, args);
object commandCovalence = Interface.CallHook("OnUserCommand", basePlayer.IPlayer, cmd, args);
object canBlock = commandSpecific is null ? commandCovalence : commandSpecific;
if (canBlock != null)
{
return;
}
try
{
// Is it a valid chat command?
if (!Covalence.CommandSystem.HandleChatMessage(basePlayer.IPlayer, str) && !cmdlib.HandleChatCommand(basePlayer, cmd, args))
{
if (Interface.Oxide.Config.Options.Modded)
{
basePlayer.IPlayer.Reply(string.Format(lang.GetMessage("UnknownCommand", this, basePlayer.IPlayer.Id), cmd));
}
}
}
catch (Exception ex)
{
Exception innerException = ex;
string errorMessage = string.Empty;
string pluginName = string.Empty;
StringBuilder stackTraceSb = new StringBuilder();
while (innerException != null)
{
string name = innerException.GetType().Name;
errorMessage = $"{name}: {innerException.Message}".TrimEnd(' ', ':');
stackTraceSb.AppendLine(innerException.StackTrace);
if (innerException.InnerException != null)
{
stackTraceSb.AppendLine($"Rethrow as {name}");
}
innerException = innerException.InnerException;
}
StackTrace stackTrace = new StackTrace(ex, 0, true);
for (int i = 0; i < stackTrace.FrameCount; i++)
{
StackFrame frame = stackTrace.GetFrame(i);
MethodBase method = frame.GetMethod();
if (method is null || method.DeclaringType is null) continue;
if (method.DeclaringType.Namespace == "Oxide.Plugins")
{
pluginName = method.DeclaringType.Name;
}
}
Interface.Oxide.LogError($"Failed to run command '/{cmd}' on plugin '{pluginName}'. ({errorMessage.Replace(Environment.NewLine, " ")}){Environment.NewLine}{stackTrace}");
}
}
/// <summary>
/// Called when the player is authenticating
/// </summary>
/// <param name="connection"></param>
[HookMethod("OnClientAuth")]
private void OnClientAuth(Connection connection)
{
connection.username = Regex.Replace(connection.username, @"<[^>]*>", string.Empty);
}
/// <summary>
/// Called when the player has connected
/// </summary>
/// <param name="basePlayer"></param>
[HookMethod("IOnPlayerConnected")]
private void IOnPlayerConnected(BasePlayer basePlayer)
{
// Set language for player
lang.SetLanguage(basePlayer.net.connection.info.GetString("global.language", "en"), basePlayer.UserIDString);
// Send CUI to player manually
basePlayer.SendEntitySnapshot(CommunityEntity.ServerInstance);
// Let covalence know
Covalence.PlayerManager.PlayerConnected(basePlayer);
IPlayer player = Covalence.PlayerManager.FindPlayerById(basePlayer.UserIDString);
if (player != null)
{
basePlayer.IPlayer = player;
Interface.CallHook("OnUserConnected", player);
}
Interface.Oxide.CallHook("OnPlayerConnected", basePlayer);
}
/// <summary>
/// Called when the player has disconnected
/// </summary>
/// <param name="basePlayer"></param>
/// <param name="reason"></param>
[HookMethod("OnPlayerDisconnected")]
private void OnPlayerDisconnected(BasePlayer basePlayer, string reason)
{
IPlayer player = basePlayer.IPlayer;
if (player != null)
{
Interface.CallHook("OnUserDisconnected", player, reason);
}
Covalence.PlayerManager.PlayerDisconnected(basePlayer);
}
/// <summary>
/// Called when setting/changing info values for a player
/// </summary>
/// <param name="connection"></param>
/// <param name="key"></param>
/// <param name="val"></param>
[HookMethod("OnPlayerSetInfo")]
private void OnPlayerSetInfo(Connection connection, string key, string val)
{
// Change language for player
if (key == "global.language")
{
lang.SetLanguage(val, connection.userid.ToString());
BasePlayer basePlayer = connection.player as BasePlayer;
if (basePlayer != null)
{
Interface.CallHook("OnPlayerLanguageChanged", basePlayer, val);
if (basePlayer.IPlayer != null)
{
Interface.CallHook("OnPlayerLanguageChanged", basePlayer.IPlayer, val);
}
}
}
}
/// <summary>
/// Called when the player has been kicked
/// </summary>
/// <param name="basePlayer"></param>
/// <param name="reason"></param>
[HookMethod("OnPlayerKicked")]
private void OnPlayerKicked(BasePlayer basePlayer, string reason)
{
IPlayer player = basePlayer.IPlayer;
if (player != null)
{
Interface.CallHook("OnUserKicked", basePlayer.IPlayer, reason);
}
}
/// <summary>
/// Called when the player is respawning
/// </summary>
/// <param name="basePlayer"></param>
/// <returns></returns>
[HookMethod("OnPlayerRespawn")]
private object OnPlayerRespawn(BasePlayer basePlayer)
{
IPlayer player = basePlayer.IPlayer;
return player != null ? Interface.CallHook("OnUserRespawn", player) : null;
}
/// <summary>
/// Called when the player has respawned
/// </summary>
/// <param name="basePlayer"></param>
[HookMethod("OnPlayerRespawned")]
private void OnPlayerRespawned(BasePlayer basePlayer)
{
IPlayer player = basePlayer.IPlayer;
if (player != null)
{
Interface.CallHook("OnUserRespawned", player);
}
}
#endregion Player Hooks
#region Server Hooks
/// <summary>
/// Called when a remote console command is received
/// </summary>
/// <returns></returns>
/// <param name="ipAddress"></param>
/// <param name="command"></param>
[HookMethod("IOnRconMessage")]
private object IOnRconMessage(IPAddress ipAddress, string command)
{
if (ipAddress != null && !string.IsNullOrEmpty(command))
{
RemoteMessage message = RemoteMessage.GetMessage(command);
if (string.IsNullOrEmpty(message?.Message))
{
return null;
}
if (Interface.CallHook("OnRconMessage", ipAddress, message) != null)
{
return true;
}
string[] fullCommand = CommandLine.Split(message.Message);
if (fullCommand.Length >= 1)
{
string cmd = fullCommand[0].ToLower();
string[] args = fullCommand.Skip(1).ToArray();
if (Interface.CallHook("OnRconCommand", ipAddress, cmd, args) != null)
{
return true;
}
}
}
return null;
}
/// <summary>
/// Called when the remote console is initialized
/// </summary>
/// <returns></returns>
[HookMethod("IOnRconInitialize")]
private object IOnRconInitialize() => Interface.Oxide.Config.Rcon.Enabled ? (object)true : null;
/// <summary>
/// Called when the command-line is ran
/// </summary>
/// <returns></returns>
[HookMethod("IOnRunCommandLine")]
private object IOnRunCommandLine()
{
foreach (KeyValuePair<string, string> pair in Facepunch.CommandLine.GetSwitches())
{
string value = pair.Value;
if (value == "")
{
value = "1";
}
string str = pair.Key.Substring(1);
ConsoleSystem.Option options = ConsoleSystem.Option.Unrestricted;
options.PrintOutput = false;
ConsoleSystem.Run(options, str, value);
}
return false;
}
/// <summary>
/// Called when a server command was run
/// </summary>
/// <param name="arg"></param>
/// <returns></returns>
[HookMethod("IOnServerCommand")]
private object IOnServerCommand(ConsoleSystem.Arg arg)
{
// Ignore invalid connections
if (arg == null || arg.Connection != null && arg.Player() == null)
{
return true;
}
// Ignore all chat messages
if (arg.cmd.FullName == "chat.say" || arg.cmd.FullName == "chat.teamsay" || arg.cmd.FullName == "chat.localsay")
{
return null;
}
// Is the command blocked?
object commandSpecific = Interface.CallHook("OnServerCommand", arg);
object commandCovalence = Interface.CallHook("OnServerCommand", arg.cmd.FullName, RustCommandSystem.ExtractArgs(arg));
object canBlock = commandSpecific is null ? commandCovalence : commandSpecific;
if (canBlock != null)
{
return true;
}
return null;
}
/// <summary>
/// Called when the server has updated Steam information
/// </summary>
[HookMethod("OnServerInformationUpdated")]
private void OnServerInformationUpdated()
{
// Add Steam tags for Oxide
SteamServer.GameTags += ",^o";
if (Interface.Oxide.Config.Options.Modded)
{
SteamServer.GameTags += "^z";
}
}
#endregion Server Hooks
#region Structure hooks
[HookMethod("IOnCupboardAuthorize")]
private object IOnCupboardAuthorize(ulong userID, BasePlayer player, BuildingPrivlidge privlidge)
{
if (userID == player.userID)
{
if (Interface.CallHook("OnCupboardAuthorize", privlidge, player) != null)
{
return true;
}
}
else if (Interface.CallHook("OnCupboardAssign", privlidge, userID, player) != null)
{
return true;
}
return null;
}
#endregion
#region Deprecated Hooks
[HookMethod("OnTeamMemberPromote")]
private void OnTeamMemberPromote(RelationshipManager.PlayerTeam team, ulong newTeamLeader)
{
BasePlayer player = BasePlayer.FindByID(newTeamLeader);
if (player != null)
{
Interface.Oxide.CallDeprecatedHook("OnTeamPromote", "OnTeamMemberPromote(PlayerTeam team, ulong userId)", Eoy, team, player);
}
}
[HookMethod("IOnTeamInvite")]
private object IOnTeamInvite(BasePlayer basePlayer, BasePlayer basePlayer2)
{
return Interface.Oxide.CallDeprecatedHook("OnTeamInvite", "OnTeamMemberInvite(PlayerTeam playerTeam, BasePlayer basePlayer, ulong userId)", Eoy, basePlayer, basePlayer2);
}
#endregion
}
}