1
0
mirror of https://github.com/chylex/Minecraft-Phantom-Panel.git synced 2024-10-17 03:42:50 +02:00
Minecraft-Phantom-Panel/Agent/Phantom.Agent.Minecraft/Properties/MinecraftServerProperty.cs

19 lines
427 B
C#

using Phantom.Agent.Minecraft.Java;
namespace Phantom.Agent.Minecraft.Properties;
abstract class MinecraftServerProperty<T> {
private readonly string key;
protected MinecraftServerProperty(string key) {
this.key = key;
}
protected abstract T Read(string value);
protected abstract string Write(T value);
public void Set(JavaPropertiesFileEditor properties, T value) {
properties.Set(key, Write(value));
}
}