mirror of
https://github.com/chylex/Minecraft-Phantom-Panel.git
synced 2024-11-23 19:42:51 +01:00
19 lines
427 B
C#
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));
|
|
}
|
|
}
|