Skip to content

Commit

Permalink
[GM] Allow commands in static classes, closes #327
Browse files Browse the repository at this point in the history
  • Loading branch information
ikkentim committed Feb 1, 2020
1 parent 3cbee14 commit 171f221
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/SampSharp.GameMode/SAMP/Commands/CommandsManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public virtual void RegisterCommands(Assembly assembly)
var method in
assembly.GetTypes()
// Get all classes in the specified assembly.
.Where(type => !type.GetTypeInfo().IsInterface && type.GetTypeInfo().IsClass && !type.GetTypeInfo().IsAbstract)
.Where(type => !type.GetTypeInfo().IsInterface && type.GetTypeInfo().IsClass)
// Select the methods in the type.
.SelectMany(
type =>
Expand Down
2 changes: 1 addition & 1 deletion src/TestMode.GameMode/Commands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace TestMode
{
internal class Commands
internal static class Commands
{
[Command]
public static void DefaultNameCommand(BasePlayer player)
Expand Down

0 comments on commit 171f221

Please sign in to comment.