Skip to content
This repository was archived by the owner on Jan 16, 2020. It is now read-only.

Commit 51584d8

Browse files
committed
Fix example plugins
1 parent dcbea98 commit 51584d8

5 files changed

Lines changed: 11 additions & 6 deletions

File tree

examples/Rocket-Examples.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Rocket", "Rocket", "{AA1B40
1313
EndProject
1414
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Rocket.API", "..\Rocket.API\Rocket.API.csproj", "{DA356ABB-AA77-4B22-9AB1-34A30CF4048A}"
1515
EndProject
16+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Rocket.NuGet", "..\Rocket.NuGet\Rocket.NuGet.csproj", "{0ED24087-1A84-4943-9DD2-3CDFBD2A63E4}"
17+
EndProject
1618
Global
1719
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1820
Debug|Any CPU = Debug|Any CPU
@@ -35,13 +37,18 @@ Global
3537
{DA356ABB-AA77-4B22-9AB1-34A30CF4048A}.Debug|Any CPU.Build.0 = Debug|Any CPU
3638
{DA356ABB-AA77-4B22-9AB1-34A30CF4048A}.Release|Any CPU.ActiveCfg = Release|Any CPU
3739
{DA356ABB-AA77-4B22-9AB1-34A30CF4048A}.Release|Any CPU.Build.0 = Release|Any CPU
40+
{0ED24087-1A84-4943-9DD2-3CDFBD2A63E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
41+
{0ED24087-1A84-4943-9DD2-3CDFBD2A63E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
42+
{0ED24087-1A84-4943-9DD2-3CDFBD2A63E4}.Release|Any CPU.ActiveCfg = Release|Any CPU
43+
{0ED24087-1A84-4943-9DD2-3CDFBD2A63E4}.Release|Any CPU.Build.0 = Release|Any CPU
3844
EndGlobalSection
3945
GlobalSection(SolutionProperties) = preSolution
4046
HideSolutionNode = FALSE
4147
EndGlobalSection
4248
GlobalSection(NestedProjects) = preSolution
4349
{A7056AB1-C5F5-493B-8E47-DC42DE69961D} = {AA1B40F4-3312-41E0-9D02-8BCB5D9E3F97}
4450
{DA356ABB-AA77-4B22-9AB1-34A30CF4048A} = {AA1B40F4-3312-41E0-9D02-8BCB5D9E3F97}
51+
{0ED24087-1A84-4943-9DD2-3CDFBD2A63E4} = {AA1B40F4-3312-41E0-9D02-8BCB5D9E3F97}
4552
EndGlobalSection
4653
GlobalSection(ExtensibilityGlobals) = postSolution
4754
SolutionGuid = {F3DD8450-BEEC-4E04-8B4B-85B2779DDC01}

examples/commands/CommandsCollection.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ public async Task KillPlayer(IUser sender, IPlayer target)
3333
[Command(Name = "Broadcast", Summary = "Broadcasts a message.")]
3434
[CommandAlias("bc")]
3535
[CommandUser(typeof(IConsole))] // only console can call it
36-
public void Broadcast(IUser sender, string[] args)
36+
public async Task Broadcast(IUser sender, string[] args)
3737
{
38-
userManager.BroadcastAsync(sender, translations.GetAsync("broadcast", sender, string.Join(" ", args)).Result);
38+
await userManager.BroadcastAsync(sender, translations.GetAsync("broadcast", sender, string.Join(" ", args)).Result);
3939
}
4040
}
4141
}

examples/commands/CommandsExample.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
</PropertyGroup>
1010
<ItemGroup>
1111
<ProjectReference Include="..\..\Rocket.API\Rocket.API.csproj" />
12-
<ProjectReference Include="..\..\Rocket.Compatibility\Rocket.Compatibility.csproj" />
1312
<ProjectReference Include="..\..\Rocket.Core\Rocket.Core.csproj" />
1413
</ItemGroup>
1514
</Project>

examples/hello_world/HelloWorldPlugin.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Rocket.Examples.HelloWorld
88
{
99
public class HelloWorldPlugin : Plugin
1010
{
11-
public HelloWorldPlugin(IDependencyContainer container) : base("HelloWorldPlugin", container)
11+
public HelloWorldPlugin(IDependencyContainer container) : base("Hello World Plugin", container)
1212
{
1313
RegisterCommandsFromObject(this);
1414
}
@@ -32,7 +32,7 @@ protected override async Task OnActivate(bool isFromReload)
3232
Logger.LogInformation("Hello world!");
3333
}
3434

35-
protected override void OnDeactivate()
35+
protected override async Task OnDeactivate()
3636
{
3737
Logger.LogInformation("Good bye!");
3838
}

examples/hello_world/HelloWorldPlugin.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
</PropertyGroup>
1010
<ItemGroup>
1111
<ProjectReference Include="..\..\Rocket.API\Rocket.API.csproj" />
12-
<ProjectReference Include="..\..\Rocket.Compatibility\Rocket.Compatibility.csproj" />
1312
<ProjectReference Include="..\..\Rocket.Core\Rocket.Core.csproj" />
1413
</ItemGroup>
1514
</Project>

0 commit comments

Comments
 (0)