Skip to content

Commit

Permalink
Register in plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
MSWS committed Sep 17, 2024
1 parent e4436ec commit a94a342
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions mod/Gangs.BombIconPerk/BombIconCommand.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using CounterStrikeSharp.API;
using CounterStrikeSharp.API.Core;
using GangsAPI;
using GangsAPI.Data;
using GangsAPI.Data.Command;
Expand Down Expand Up @@ -39,15 +40,16 @@ public class BombIconCommand(IServiceProvider provider) : ICommand {

private readonly IRankManager ranks =
provider.GetRequiredService<IRankManager>();

private readonly ICommandManager commands =
provider.GetRequiredService<ICommandManager>();

public string Name => "css_bombicon";
public string[] Usage => ["<icon>"];

public void Start() {
public void Start(BasePlugin? plugin, bool hotReload) {
Server.PrintToConsole("Registering Bomb Icon Command");
Server.PrintToConsole("Registered: " + provider
.GetRequiredService<ICommandManager>()
.RegisterCommand(this));
Server.PrintToConsole("Registered: " + commands.RegisterCommand(this));
}

public async Task<CommandResult> Execute(PlayerWrapper? executor,
Expand Down

0 comments on commit a94a342

Please sign in to comment.