generated from AriasCreations/vsmodtemplate
48 lines
No EOL
1 KiB
C#
48 lines
No EOL
1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using Vintagestory.API.Server;
|
|
|
|
namespace AriasServerUtils
|
|
{
|
|
public enum ModConfigType
|
|
{
|
|
Global,
|
|
World
|
|
}
|
|
|
|
[Serializable]
|
|
public class ASUModConfig
|
|
{
|
|
public int MaxHomes { get; set; } = 20;
|
|
public bool AdminsBypassMaxHomes { get; set; } = true;
|
|
public bool onlyAdminsCreateWarps { get; set; } = true;
|
|
|
|
|
|
public PlayerPosition Spawn { get; set; }
|
|
}
|
|
|
|
[Serializable]
|
|
public class Warp
|
|
{
|
|
public PlayerPosition Location;
|
|
public string CreatedBy;
|
|
public DateTime CreatedAt;
|
|
|
|
|
|
public static Warp Create(IServerPlayer player)
|
|
{
|
|
Warp warp = new Warp();
|
|
warp.Location = PlayerPosition.from(player.Entity);
|
|
warp.CreatedBy = player.PlayerName;
|
|
warp.CreatedAt = DateTime.Now;
|
|
|
|
return warp;
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class Warps
|
|
{
|
|
public Dictionary<string, Warp> warps = new Dictionary<string, Warp>();
|
|
}
|
|
} |