Skip to content

Commit

Permalink
Start work on ST
Browse files Browse the repository at this point in the history
  • Loading branch information
MSWS committed Feb 4, 2024
1 parent 6e33cec commit 815a082
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
34 changes: 34 additions & 0 deletions mod/Jailbreak.Warden/Commands/SpecialTreatmentBehavior.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using System.Reflection;
using CounterStrikeSharp.API.Core;
using Jailbreak.Public.Behaviors;
using Jailbreak.Public.Mod.Warden;

namespace Jailbreak.Warden.Commands;

public class SpecialTreatmentBehavior : IPluginBehavior, ISpecialTreatmentService
{
private ISet<CCSPlayerController> _sts = new HashSet<CCSPlayerController>();

public void Start(BasePlugin parent)
{
parent.RegisterEventHandler<EventPlayerDisconnect>(OnPlayerDisconnect);

Check failure on line 14 in mod/Jailbreak.Warden/Commands/SpecialTreatmentBehavior.cs

View workflow job for this annotation

GitHub Actions / build

Argument 1: cannot convert from 'method group' to 'CounterStrikeSharp.API.Core.BasePlugin.GameEventHandler<CounterStrikeSharp.API.Core.EventPlayerDisconnect>'

Check failure on line 14 in mod/Jailbreak.Warden/Commands/SpecialTreatmentBehavior.cs

View workflow job for this annotation

GitHub Actions / build

Argument 1: cannot convert from 'method group' to 'CounterStrikeSharp.API.Core.BasePlugin.GameEventHandler<CounterStrikeSharp.API.Core.EventPlayerDisconnect>'
}

HookResult OnPlayerDisconnect(CCSPlayerController player, GameEventInfo info)
{
if(!player.IsValid)
return HookResult.Continue;

return HookResult.Continue;
}

public bool IsSpecialTreatment(CCSPlayerController? player)
{
throw new NotImplementedException();
}

public void SetSpecialTreatment(CCSPlayerController? player, bool value)
{
throw new NotImplementedException();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using CounterStrikeSharp.API.Core;

namespace Jailbreak.Public.Mod.Warden;

public interface ISpecialTreatmentService
{
bool IsSpecialTreatment(CCSPlayerController? player);
void SetSpecialTreatment(CCSPlayerController? player, bool value);
}

0 comments on commit 815a082

Please sign in to comment.