-
Notifications
You must be signed in to change notification settings - Fork 0
/
Plugin.cs
81 lines (66 loc) · 1.71 KB
/
Plugin.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
using System.Data;
using Terraria.Localization;
using TerrariaApi.Server;
using TShockAPI;
namespace ForceChinese
{
[ApiVersion(2, 1)]
public class Main : TerrariaPlugin
{
public override string Author
{
get
{
return "Cai";
}
}
public override string Description
{
get
{
return "强制使用简体中文作为服务器语言";
}
}
public override string Name
{
get
{
return "ForceChineseLang(强制简体中文)";
}
}
public override Version Version
{
get
{
return new Version(1, 2, 0, 0);
}
}
public Main(Terraria.Main game) : base(game)
{
LanguageManager.Instance.SetLanguage(7);
if (Terraria.Program.LaunchParameters.ContainsKey("-lang"))
{
Terraria.Program.LaunchParameters["-lang"] = "7";
}
else
{
Terraria.Program.LaunchParameters.Add("-lang", "7");
}
Console.WriteLine(
"[ForceChineseLang]已强制修改语言选项!\n" +
"*如需使用其他语言请移除此插件!\n" +
"*本插件为免费插件");
base.Order = int.MinValue;
}
public override void Initialize()
{
}
protected override void Dispose(bool disposing)
{
if (disposing)
{
}
base.Dispose(disposing);
}
}
}