Skip to content
This repository was archived by the owner on Mar 15, 2024. It is now read-only.

Commit 4ef2366

Browse files
committed
Fix(example): game event return type
1 parent 5fddca1 commit 4ef2366

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

PluginExample/Example.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using SourceSharp.Sdk.Enums;
44
using SourceSharp.Sdk.Interfaces;
55
using SourceSharp.Sdk.Models;
6+
using SourceSharp.Sdk.Structs;
67
using System.Reflection;
78

89
namespace SourceSharp.Example;
@@ -51,8 +52,11 @@ private void TestClientCommand(ConsoleCommand command, GamePlayer? player)
5152
=> _sourceSharp.LogMessage("test command executed: " + command.ArgString);
5253

5354
[GameEvent("player_spawn")]
54-
private void OnPlayerSpawn(GameEvent @event)
55-
=> _sourceSharp.LogMessage("player spawned -> userId: " + @event.Get<int>("userid"));
55+
private ActionResponse<bool> OnPlayerSpawn(GameEvent @event)
56+
{
57+
_sourceSharp.LogMessage("player spawned -> userId: " + @event.Get<int>("userid"));
58+
return default;
59+
}
5660

5761
[GameFrame]
5862
private void OnGameFrame(bool simulating)

0 commit comments

Comments
 (0)