Skip to content

Commit

Permalink
Merge pull request #36 from THEXN/master
Browse files Browse the repository at this point in the history
update EssentialsPlus
  • Loading branch information
Controllerdestiny authored Apr 20, 2024
2 parents ff44a86 + 1a3e4e6 commit 1de58fa
Show file tree
Hide file tree
Showing 7 changed files with 1,261 additions and 1,173 deletions.
1,809 changes: 923 additions & 886 deletions EssentialsPlus/Commands.cs

Large diffs are not rendered by default.

58 changes: 34 additions & 24 deletions EssentialsPlus/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,38 @@

namespace EssentialsPlus
{
public class Config
{
public string[] DisabledCommandsInPvp = new string[]
{
"back"
};

public int BackPositionHistory = 10;

public string MySqlHost = "";
public string MySqlDbName = "";
public string MySqlUsername = "";
public string MySqlPassword = "";

public void Write(string path)
{
File.WriteAllText(path, JsonConvert.SerializeObject(this, Formatting.Indented));
}

public static Config Read(string path)
{
return File.Exists(path) ? JsonConvert.DeserializeObject<Config>(File.ReadAllText(path)) : new Config();
}
}
public class Config
{
[JsonProperty("Pvp禁用命令")]
public string[] DisabledCommandsInPvp = new string[]
{
"eback"
};

[JsonProperty("回退位置历史记录")]
public int BackPositionHistory = 10;

[JsonProperty("MySql主机")]
public string MySqlHost = "";

[JsonProperty("MySql数据库名称")]
public string MySqlDbName = "";

[JsonProperty("MySql用户名")]
public string MySqlUsername = "";

[JsonProperty("MySql密码")]
public string MySqlPassword = "";

public void Write(string path)
{
File.WriteAllText(path, JsonConvert.SerializeObject(this, Formatting.Indented));
}

public static Config Read(string path)
{
return File.Exists(path) ? JsonConvert.DeserializeObject<Config>(File.ReadAllText(path)) : new Config();
}
}
}

Loading

0 comments on commit 1de58fa

Please sign in to comment.