Skip to content

Commit

Permalink
IMinecraftProject indicates what type of runtime the project requires…
Browse files Browse the repository at this point in the history
… (e.g. Java, Php or no special runtime)
  • Loading branch information
tekgator committed Jun 3, 2023
1 parent c944a06 commit 05b0d49
Show file tree
Hide file tree
Showing 17 changed files with 56 additions and 16 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file.

## [Unreleased]


## [1.4.3] - 2023-06-03

### Added
- IMinecraftProject indicates what type of runtime the project requires (e.g. Java, Php or no special runtime)


## [1.4.2] - 2023-06-03

### Removed
Expand Down
5 changes: 5 additions & 0 deletions MinecraftJars.Core/Projects/IMinecraftProject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ public interface IMinecraftProject
/// </summary>
string Url { get; }

/// <summary>
/// Required runtime for the project
/// </summary>
Runtime Runtime { get; }

/// <summary>
/// PNG logo of the project
/// </summary>
Expand Down
19 changes: 19 additions & 0 deletions MinecraftJars.Core/Projects/Runtime.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
namespace MinecraftJars.Core.Projects;

public enum Runtime
{
/// <summary>
/// No special runtime required e.g. compiled executable for this os (e.g. Mojang Bedrock)
/// </summary>
None,

/// <summary>
/// Java installation required (most of the projects)
/// </summary>
Java,

/// <summary>
/// PHP installation required e.g. Pocketmine which requires a special PHP installation
/// </summary>
Php
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ namespace MinecraftJars.Plugin.Fabric;

internal static class FabricProjectFactory
{
public const string Fabric = "Fabric";

public static readonly IEnumerable<FabricProject> Projects = new List<FabricProject>
{
new(Group: Group.Server,
Name: Fabric,
Name: "Fabric",
Description: "Fabric is a lightweight, experimental modding toolchain for Minecraft.",
Url: "https://fabricmc.net",
Runtime: Runtime.Java,
Logo: Properties.Resources.Fabric)
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ public record FabricProject(
string Name,
string Description,
string Url,
Runtime Runtime,
byte[] Logo) : IMinecraftProject
{
public async Task<IEnumerable<IMinecraftVersion>> GetVersions(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ public record MohistProject(
string Name,
string Description,
string Url,
Runtime Runtime,
byte[] Logo) : IMinecraftProject
{
public async Task<IEnumerable<IMinecraftVersion>> GetVersions(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ namespace MinecraftJars.Plugin.Mohist;

internal static class MohistProjectFactory
{
public const string Mohist = "Mohist";

public static readonly IEnumerable<MohistProject> Projects = new List<MohistProject>
{
new(Group: Group.Server,
Name: Mohist,
Name: "Mohist",
Description: "Minecraft Forge Server Software Implementing Paper/Spigot/Bukkit API.",
Url: "https://mohistmc.com",
Runtime: Runtime.Java,
Logo: Properties.Resources.Mohist)
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ public record MojangProject(
string Name,
string Description,
string Url,
Runtime Runtime,
byte[] Logo) : IMinecraftProject
{
public async Task<IEnumerable<IMinecraftVersion>> GetVersions(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,19 @@ namespace MinecraftJars.Plugin.Mojang;

internal class MojangProjectFactory
{
public const string Vanilla = "Vanilla";
public const string Bedrock = "Bedrock";

public static readonly IEnumerable<MojangProject> Projects = new List<MojangProject>
{
new(Group: Group.Server,
Name: Vanilla,
Name: "Vanilla",
Description: "The Mojang vanilla Minecraft experience without mod support.",
Url: "https://www.minecraft.net/download/server",
Runtime: Runtime.Java,
Logo: Properties.Resources.Vanilla),
new(Group: Group.Bedrock,
Name: Bedrock,
Name: "Bedrock",
Description: "Minecraft: Bedrock Edition refers to the multi-platform versions of Minecraft based on the Bedrock codebase.",
Url: "https://www.minecraft.net/download/server/bedrock",
Runtime: Runtime.None,
Logo: Properties.Resources.Bedrock)
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ public record PaperProject(
string Name,
string Description,
string Url,
Runtime Runtime,
byte[] Logo) : IMinecraftProject
{
public async Task<IEnumerable<IMinecraftVersion>> GetVersions(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,25 @@ internal static class PaperProjectFactory
Name: "Paper",
Description: "Paper is a Minecraft game server based on Spigot, designed to greatly improve performance and offer more advanced features and API.",
Url: "https://purpurmc.org",
Runtime: Runtime.Java,
Logo: Properties.Resources.Paper),
new(Group: Group.Server,
Name: "Folia",
Description: "Folia is a new fork of Paper that adds regionized multithreading to the server.",
Url: "https://papermc.io/software/folia",
Runtime: Runtime.Java,
Logo: Properties.Resources.Folia),
new(Group: Group.Proxy,
Name: "Velocity",
Description: "Velocity is the modern, high-performance proxy. Designed with performance and stability in mind, it’s a full alternative to Waterfall with its own plugin ecosystem.",
Url: "https://papermc.io/software/velocity",
Runtime: Runtime.Java,
Logo: Properties.Resources.Velocity),
new(Group: Group.Proxy,
Name: "Waterfall",
Description: "Waterfall is an upgraded BungeeCord, offering full compatibility with improvements to performance and stability.",
Url: "https://papermc.io/software/waterfall",
Runtime: Runtime.Java,
Logo: Properties.Resources.Waterfall)
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ public record PocketmineProject(
string Name,
string Description,
string Url,
Runtime Runtime,
byte[] Logo) : IMinecraftProject
{
public async Task<IEnumerable<IMinecraftVersion>> GetVersions(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ internal static class PocketmineProjectFactory
Name: "Pocketmine",
Description: "A highly customizable, open source server software for Minecraft: Bedrock Edition written in PHP.",
Url: "https://www.pocketmine.net",
Runtime.Php,
Logo: Properties.Resources.Pocketmine)
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ public record PurpurProject(
string Name,
string Description,
string Url,
Runtime Runtime,
byte[] Logo) : IMinecraftProject
{
public async Task<IEnumerable<IMinecraftVersion>> GetVersions(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ internal static class PurpurProjectFactory
Name: "Purpur",
Description: "Purpur is a drop-in replacement for Paper servers designed for configurability, new fun and exciting gameplay features, and performance built on top of Paper.",
Url: "https://purpurmc.org",
Runtime: Runtime.Java,
Logo: Properties.Resources.Purpur)
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ public record SpigotProject(
string Name,
string Description,
string Url,
Runtime Runtime,
byte[] Logo) : IMinecraftProject
{
public async Task<IEnumerable<IMinecraftVersion>> GetVersions(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,19 @@ namespace MinecraftJars.Plugin.Spigot;

internal static class SpigotProjectFactory
{
public const string Spigot = "Spigot";
public const string BungeeCord = "BungeeCord";

public static readonly IEnumerable<SpigotProject> Projects = new List<SpigotProject>
{
new(Group: Group.Server,
Name: Spigot,
Name: "Spigot",
Description: "Spigot is a modified Minecraft server which provides additional performance optimizations, configuration options and features, whilst still remaining compatible with all existing plugins and consistent with Vanilla Minecraft game mechanics.",
Url: "https://www.spigotmc.org/wiki/spigot",
Runtime: Runtime.Java,
Logo: Properties.Resources.Spigot),
new(Group: Group.Proxy,
Name: BungeeCord,
Name: "BungeeCord",
Description: "BungeeCord acts as a proxy between the player's client and multiple connected Minecraft servers.",
Url: "https://www.spigotmc.org/wiki/bungeecord",
Runtime: Runtime.Java,
Logo: Properties.Resources.BungeeCord),

};
Expand Down

0 comments on commit 05b0d49

Please sign in to comment.