-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from oscar-wos/1.3.1
feat: TestPlugin
- Loading branch information
Showing
7 changed files
with
746 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,6 @@ | |
src/bin/ | ||
src/obj/ | ||
Sessions.API/bin/ | ||
Sessions.API/obj/ | ||
Sessions.API/obj/ | ||
TestPlugin/bin/ | ||
TestPlugin/obj/ |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Supports postgresql + mysql | ||
`counterstrikesharp/configs/plugins/Sessions/Sessions.json` | ||
``` | ||
{ | ||
"DatabaseType": "mysql", | ||
} | ||
{ | ||
"DatabaseType": "postgresql", | ||
} | ||
``` | ||
### Aliases | ||
![image](https://github.com/oscar-wos/Sessions/assets/29248751/983c65eb-746a-4759-9b39-76efded4177b) | ||
|
||
### Players | ||
![image](https://github.com/oscar-wos/Sessions/assets/29248751/7edd304a-6b4c-4d22-98b5-54cd24cba64c) | ||
|
||
### Messages | ||
![image](https://github.com/oscar-wos/Sessions/assets/29248751/097d1018-9c78-418e-8583-1d454721a800) | ||
|
||
### Sessions | ||
![image](https://github.com/oscar-wos/Sessions/assets/29248751/278eadbd-e76c-4801-ab07-f9d4933955af) | ||
![image](https://github.com/oscar-wos/Sessions/assets/29248751/331a4858-6611-476a-ba8e-ddd43fa6ede0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using CounterStrikeSharp.API; | ||
using CounterStrikeSharp.API.Core; | ||
using CounterStrikeSharp.API.Core.Capabilities; | ||
using Sessions.API; | ||
|
||
namespace TestPlugin; | ||
|
||
public class TestPlugin : BasePlugin | ||
{ | ||
public override string ModuleName => "TestPlugin"; | ||
public override string ModuleVersion => "1.0.0"; | ||
|
||
private static PlayerCapability<ISessionsPlayer> CapabilityPlayer { get; } = new("sessions:player"); | ||
|
||
public override void Load(bool isReload) | ||
{ | ||
foreach (var session in Utilities.GetPlayers().Select(player => CapabilityPlayer.Get(player)!.Session)) | ||
{ | ||
Console.WriteLine(session!.Id); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="CounterStrikeSharp.API" Version="*" ExcludeAssets="runtime" /> | ||
<ProjectReference Include="..\Sessions.API\Sessions.API.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters