Fix PluginManager.Unload erroring on mono.

This commit is contained in:
UnknownShadow200 2016-07-29 10:05:33 +10:00
parent 23b0d3fcc9
commit 49a7a1ab03
6 changed files with 235 additions and 236 deletions

View File

@ -539,20 +539,20 @@
<Compile Include="Player\Undo\UndoFile.cs" /> <Compile Include="Player\Undo\UndoFile.cs" />
<Compile Include="Player\Undo\UndoFileBin.cs" /> <Compile Include="Player\Undo\UndoFileBin.cs" />
<Compile Include="Player\Undo\UndoFileText.cs" /> <Compile Include="Player\Undo\UndoFileText.cs" />
<Compile Include="Plugins\Enums.cs" /> <Compile Include="Plugins\Events\Enums.cs" />
<Compile Include="Plugins\Events\GroupEvents.cs" /> <Compile Include="Plugins\Events\GroupEvents.cs" />
<Compile Include="Plugins\Events\IPluginEvent.cs" />
<Compile Include="Plugins\Events\LevelEvents.cs" /> <Compile Include="Plugins\Events\LevelEvents.cs" />
<Compile Include="Plugins\Events\PlayerEvents.cs" /> <Compile Include="Plugins\Events\PlayerEvents.cs" />
<Compile Include="Plugins\Events\ServerEvents.cs" /> <Compile Include="Plugins\Events\ServerEvents.cs" />
<Compile Include="Plugins\IPluginEvent.cs" />
<Compile Include="Plugins\Manager\Plugin.Events.cs" />
<Compile Include="Plugins\Manager\PluginManager.cs" />
<Compile Include="Plugins\Manager\Plugin.cs" />
<Compile Include="Network\NetUtils.cs" /> <Compile Include="Network\NetUtils.cs" />
<Compile Include="Network\Opcode.cs" /> <Compile Include="Network\Opcode.cs" />
<Compile Include="Network\Player.Networking.cs" /> <Compile Include="Network\Player.Networking.cs" />
<Compile Include="Player\Alias.cs" /> <Compile Include="Player\Alias.cs" />
<Compile Include="API\API.cs" /> <Compile Include="API\API.cs" />
<Compile Include="Plugins\Plugin.cs" />
<Compile Include="Plugins\Plugin.Events.cs" />
<Compile Include="Plugins\PluginManager.cs" />
<Compile Include="Scripting\Scripting.cs" /> <Compile Include="Scripting\Scripting.cs" />
<Compile Include="Player\Ban.cs" /> <Compile Include="Player\Ban.cs" />
<Compile Include="Levels\BlockDefinitions.cs" /> <Compile Include="Levels\BlockDefinitions.cs" />
@ -706,7 +706,6 @@
<Folder Include="Player\Undo" /> <Folder Include="Player\Undo" />
<Folder Include="Plugins" /> <Folder Include="Plugins" />
<Folder Include="Plugins\Events" /> <Folder Include="Plugins\Events" />
<Folder Include="Plugins\Manager" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.

View File

@ -119,9 +119,9 @@ namespace MCGalaxy {
/// <summary> Unload all plugins </summary> /// <summary> Unload all plugins </summary>
public static void Unload() { public static void Unload() {
all.ForEach(delegate(Plugin p) { for (int i = 0; i < all.Count; i++) {
Unload(p, true); Unload(all[i], true); i--;
}); }
} }
/// <summary> Load all plugins </summary> /// <summary> Load all plugins </summary>