mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-27 12:33:51 +00:00
finish rewrite; port to cmake, loads of other changes
Theres documentation at https://sylvessa.zip/fourkit/ now. And a bunch of other changes. Check the discord server for a more comprehensive list
This commit is contained in:
parent
ecb3f00bd6
commit
f5f9aa1cf5
107 changed files with 14289 additions and 40 deletions
83
Minecraft.Server.FourKit/docs/setup.md
Normal file
83
Minecraft.Server.FourKit/docs/setup.md
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
@page setup Setting up your Development Environment
|
||||
|
||||
You can use any IDE of choice. I recommend using Visual Studio for new developers.
|
||||
|
||||
Also make sure you have [.NET 10 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/10.0) installed.
|
||||
|
||||
@section visual-studio Visual Studio
|
||||
|
||||
This tutorial will go over creating a plugin in Visual Studio.
|
||||
|
||||
When installing Visual Studio, make sure you have .NET SDK installed under Individual Components in the Visual Studio Installer.
|
||||
|
||||
After installing all the prerequisities, go to create a new Project and select Class Library for C#
|
||||
|
||||

|
||||
|
||||
After selecting class library and pressing OK, it should prompt what .NET version to use. Be sure to select .NET 10
|
||||
|
||||
You can name the project whatever you want.
|
||||
|
||||
After all thats done, you should enter the code environment.
|
||||
|
||||
First thing you should do is right click your project and add a reference to the compiled FourKit DLL.
|
||||
|
||||

|
||||
|
||||
Afterwards a popup should appear. Click Browse and then browse to the DLL and then click OK.
|
||||
|
||||
After that you can continue to making a plugin!
|
||||
|
||||
@section dotnet Dotnet CLI
|
||||
|
||||
If you dont want to install Visual Studio, you can use the dotnet CLI program.
|
||||
|
||||
You can create a new dll project by running `dotnet new classlib -n MyAwesomePlugin`
|
||||
|
||||
Be sure to add a reference to the FourKit DLL in your csproj file (example for it being in parent dir):
|
||||
|
||||
```xml
|
||||
<ItemGroup>
|
||||
<Reference Include="Minecraft.Server.FourKit">
|
||||
<HintPath>..\Minecraft.Server.FourKit.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
```
|
||||
|
||||
After this, you can build using `dotnet build`! Your compiled DLL should be in the `bin` folder.
|
||||
|
||||
To build as release: `dotnet build -c Release`
|
||||
|
||||
Make sure the target framework is set to `net10.0`!
|
||||
|
||||
Example full csproj file:
|
||||
|
||||
```xml
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Minecraft.Server.FourKit">
|
||||
<HintPath>..\Minecraft.Server.FourKit.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
```
|
||||
|
||||
@section compiling Building your plugin
|
||||
|
||||
When you build your plugin, it will compile as a DLL.
|
||||
|
||||
You place this DLL into the `plugins` folder in your server directory.
|
||||
|
||||
You can also even have plugins with dependencies!
|
||||
|
||||
Below page will discuss actually making your plugin function, and using dependencies:
|
||||
|
||||
@ref plugin-creation
|
||||
Loading…
Add table
Add a link
Reference in a new issue