Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

更新:多项内容 #378

Merged
merged 22 commits into from
Aug 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
ae2c63f
更新:简化代码,更新版本号
THEXN Aug 2, 2024
7edc251
添加插件:AutoReset 完全自动重置插件
THEXN Aug 2, 2024
afd1fc3
doc: PluginManager 自动更新插件
THEXN Aug 2, 2024
d9a8012
更新:白名单插件,优化config内容顺序,整理代码
THEXN Aug 2, 2024
a749e03
Update README.md
THEXN Aug 2, 2024
0275b4b
doc:修改AutoReset 完全自动重置插件的文档
THEXN Aug 2, 2024
d382a39
Merge branch 'master' of https://github.com/THEXN/TShockPlugin
THEXN Aug 2, 2024
53446c2
拉取
THEXN Aug 3, 2024
8bf7179
doc:文档名字
THEXN Aug 3, 2024
4e817e0
更新:Ezperm 便捷权限,优化代码,完善卸载函数
THEXN Aug 3, 2024
fe25cd2
更新:GenerateMap卸载函数完善
THEXN Aug 3, 2024
29d26eb
更新:完善GolfRewards 高尔夫奖励卸载函数
THEXN Aug 3, 2024
0d3e444
更新:完善InvincibilityPlugin 限时无敌的卸载函数
THEXN Aug 3, 2024
a2eae9d
更新:完善直到首字母为I的插件(除了ec和help插件)以外的卸载函数
THEXN Aug 3, 2024
058a1e9
更新:journeyUnlock 解锁旅途物品的卸载函数
THEXN Aug 3, 2024
27919fa
思考
THEXN Aug 3, 2024
98d22c5
Revert "更新:journeyUnlock 解锁旅途物品的卸载函数"
THEXN Aug 3, 2024
5b1ae70
修复:把恋恋插件加回来
THEXN Aug 3, 2024
769e9d5
Merge branch 'Controllerdestiny:master' into master
THEXN Aug 3, 2024
d1e305e
更新:journeyUnlock 解锁旅途物品的卸载函数
THEXN Aug 3, 2024
0f7a623
Merge branch 'master' of https://github.com/THEXN/TShockPlugin
THEXN Aug 3, 2024
f0a18e7
修复:少提交了
THEXN Aug 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion BetterWhitelist/Main.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Newtonsoft.Json;
using Terraria;
using TerrariaApi.Server;
using TShockAPI;
using Terraria;

namespace BetterWhitelist;

Expand Down
2 changes: 1 addition & 1 deletion BetterWhitelist/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# BetterWhitelist 更好的白名单

- 作者: 豆沙,肝帝熙恩修改
- 作者: 豆沙,肝帝熙恩修,Cai改
- 出处: [gitee](https://gitee.com/Crafty/BetterWhitelist)
- 将玩家名字加入白名单,仅在白名单内的玩家可进入游戏

Expand Down
18 changes: 10 additions & 8 deletions Ezperm/Ezperm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class Ezperm : TerrariaPlugin
public override string Name => "Ezperm";
public override string Author => "大豆子,肝帝熙恩优化1449";
public override string Description => "一个指令帮助小白给初始服务器添加缺失的权限,还可以批量添删权限";
public override Version Version => new Version(1, 2, 0);
public override Version Version => new Version(1, 2, 1);
internal static Configuration Config;
public Ezperm(Main game) : base(game)
{
Expand All @@ -33,14 +33,16 @@ private static void ReloadConfig(ReloadEventArgs args)
public override void Initialize()
{
GeneralHooks.ReloadEvent += ReloadConfig;
Commands.ChatCommands.Add(new Command(new List<string>
{
"inperms.admin"
}, new CommandDelegate(this.Cmd), new string[]
Commands.ChatCommands.Add(new Command("inperms.admin",Cmd,"inperms","批量改权限"));
}
protected override void Dispose(bool disposing)
{
if (disposing)
{
"inperms",
"批量改权限"
}));
Commands.ChatCommands.RemoveAll(x => x.CommandDelegate == Cmd);
GeneralHooks.ReloadEvent -= ReloadConfig;
}
base.Dispose(disposing);
}
private void Cmd(CommandArgs args)
{
Expand Down
3 changes: 2 additions & 1 deletion Ezperm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
## 更新日志

```
暂无
v1.2.1
优化代码,完善卸载函数
```

## 指令
Expand Down
10 changes: 10 additions & 0 deletions GenerateMap/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Terraria;
using TerrariaApi.Server;
using TShockAPI;
using TShockAPI.Hooks;

namespace GenerateMap;

Expand All @@ -27,6 +28,15 @@ public override void Initialize()
Commands.ChatCommands.Add(new("generate.map", CGenerate, "生成地图"));
}

protected override void Dispose(bool disposing)
{
if (disposing)
{
Commands.ChatCommands.RemoveAll(x => x.CommandDelegate == CGenerate);
}
base.Dispose(disposing);
}

private object RestGenerateMap(RestRequestArgs args)
{
var bytes = CaiLib.CaiMap.CreateMapBytes();
Expand Down
5 changes: 3 additions & 2 deletions GolfRewards/GolfRewards.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class GolfRewards : TerrariaPlugin
public override string Name => "高尔夫奖励";
public override string Author => "GK 阁下 由 鸽子 定制,肝帝熙恩更新适配1449";
public override string Description => "将高尔夫打入球洞会得到奖励.";
public override Version Version => new Version(1, 0, 5);
public override Version Version => new Version(1, 0, 6);

public GolfRewards(Main game) : base(game)
{
Expand All @@ -33,7 +33,7 @@ private void OnInitialize(EventArgs args)

public override void Initialize()
{
GeneralHooks.ReloadEvent -= CMD;
GeneralHooks.ReloadEvent += CMD;
ServerApi.Hooks.NetGetData.Register(this, GetData);

ServerApi.Hooks.GameInitialize.Register(this, OnInitialize);
Expand All @@ -52,6 +52,7 @@ protected override void Dispose(bool disposing)
{
if (disposing)
{
GeneralHooks.ReloadEvent -= CMD;
ServerApi.Hooks.NetGetData.Deregister(this, GetData);

ServerApi.Hooks.GameInitialize.Deregister(this, OnInitialize);
Expand Down
3 changes: 2 additions & 1 deletion GolfRewards/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
## 更新日志

```
暂无
v1.0.6
完善卸载函数
```

## 指令
Expand Down
3 changes: 2 additions & 1 deletion Invincibility/InvincibilityPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class InvincibilityPlugin : TerrariaPlugin
public override string Author => "肝帝熙恩";
public override string Description => "在命令中给予玩家一段时间的无敌状态。";
public override string Name => "InvincibilityPlugin";
public override Version Version => new Version(1, 0, 5);
public override Version Version => new Version(1, 0, 6);
public static Configuration Config;

private readonly Dictionary<TSPlayer, float> invincibleDurations = new();
Expand Down Expand Up @@ -46,6 +46,7 @@ protected override void Dispose(bool disposing)
{
if (disposing)
{
GeneralHooks.ReloadEvent -= ReloadConfig;
ServerApi.Hooks.GameInitialize.Deregister(this, OnInitialize);
ServerApi.Hooks.GameUpdate.Deregister(this, OnUpdate);
}
Expand Down
3 changes: 2 additions & 1 deletion Invincibility/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
## 更新日志

```
暂无
v1.0.6
完善卸载函数
```

## 指令
Expand Down
3 changes: 2 additions & 1 deletion ItemPreserver/ItemPreserver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class ItemPreserver : TerrariaPlugin
public override string Author => "肝帝熙恩 & 少司命";
public override string Description => "指定物品不消耗";
public override string Name => "ItemPreserver";
public override Version Version => new(1, 0, 6);
public override Version Version => new(1, 0, 7);
public static Configuration Config = new();

public class Pitem
Expand Down Expand Up @@ -120,6 +120,7 @@ protected override void Dispose(bool disposing)
if (disposing)
{
GeneralHooks.ReloadEvent -= ReloadConfig;
GetDataHandlers.PlayerSlot.UnRegister(OnSlot);
}
base.Dispose(disposing);
}
Expand Down
2 changes: 2 additions & 0 deletions ItemPreserver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
## 更新日志

```
v1.0.7
完善卸载函数
V1.0.6
1. 添加数量条件
```
Expand Down
60 changes: 30 additions & 30 deletions Plugin.sln
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ShortCommand", "ShortComman
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DTEntryBlock", "DTEntryBlock\DTEntryBlock.csproj", "{1486C0F5-9A7D-4530-B73F-4D1938F0B083}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Plugin", "Yaaiomni\Core\Plugin.csproj", "{E384B4DB-BC07-46B8-97A8-F9A1CDBB20C1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Misc", "Yaaiomni\Misc\Misc.csproj", "{9A5A7344-A47A-4DC4-A23D-56B92B7F051B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SourceGen", "Yaaiomni\SourceGen\SourceGen.csproj", "{C9B00432-3802-489F-B2D1-C27C36B17DA1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CaiBot", "CaiBot\CaiBot.csproj", "{78EA1806-A757-47F3-A1C5-DF2FC3B8288B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HouseRegion", "HouseRegion\HouseRegion.csproj", "{4FEDE121-FE96-4B51-B598-0CDD3C5AA078}"
Expand Down Expand Up @@ -222,6 +216,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BetterWhitelist", "BetterWh
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoReset", "AutoReset\AutoReset.csproj", "{023244CF-F536-4621-9C89-6BCD0D242878}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Plugin", "Yaaiomni\Core\Plugin.csproj", "{951F0545-1630-4E9B-B365-535D7FE9A845}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Misc", "Yaaiomni\Misc\Misc.csproj", "{44B035E4-3049-4AB1-A8C1-212A427371A3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SourceGen", "Yaaiomni\SourceGen\SourceGen.csproj", "{0CD78DBF-DC60-4B91-B5EF-4910172547CE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -750,30 +750,6 @@ Global
{1486C0F5-9A7D-4530-B73F-4D1938F0B083}.Release|Any CPU.Build.0 = Release|Any CPU
{1486C0F5-9A7D-4530-B73F-4D1938F0B083}.Release|x64.ActiveCfg = Release|Any CPU
{1486C0F5-9A7D-4530-B73F-4D1938F0B083}.Release|x64.Build.0 = Release|Any CPU
{E384B4DB-BC07-46B8-97A8-F9A1CDBB20C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E384B4DB-BC07-46B8-97A8-F9A1CDBB20C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E384B4DB-BC07-46B8-97A8-F9A1CDBB20C1}.Debug|x64.ActiveCfg = Debug|Any CPU
{E384B4DB-BC07-46B8-97A8-F9A1CDBB20C1}.Debug|x64.Build.0 = Debug|Any CPU
{E384B4DB-BC07-46B8-97A8-F9A1CDBB20C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E384B4DB-BC07-46B8-97A8-F9A1CDBB20C1}.Release|Any CPU.Build.0 = Release|Any CPU
{E384B4DB-BC07-46B8-97A8-F9A1CDBB20C1}.Release|x64.ActiveCfg = Release|Any CPU
{E384B4DB-BC07-46B8-97A8-F9A1CDBB20C1}.Release|x64.Build.0 = Release|Any CPU
{9A5A7344-A47A-4DC4-A23D-56B92B7F051B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9A5A7344-A47A-4DC4-A23D-56B92B7F051B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9A5A7344-A47A-4DC4-A23D-56B92B7F051B}.Debug|x64.ActiveCfg = Debug|Any CPU
{9A5A7344-A47A-4DC4-A23D-56B92B7F051B}.Debug|x64.Build.0 = Debug|Any CPU
{9A5A7344-A47A-4DC4-A23D-56B92B7F051B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9A5A7344-A47A-4DC4-A23D-56B92B7F051B}.Release|Any CPU.Build.0 = Release|Any CPU
{9A5A7344-A47A-4DC4-A23D-56B92B7F051B}.Release|x64.ActiveCfg = Release|Any CPU
{9A5A7344-A47A-4DC4-A23D-56B92B7F051B}.Release|x64.Build.0 = Release|Any CPU
{C9B00432-3802-489F-B2D1-C27C36B17DA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C9B00432-3802-489F-B2D1-C27C36B17DA1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C9B00432-3802-489F-B2D1-C27C36B17DA1}.Debug|x64.ActiveCfg = Debug|Any CPU
{C9B00432-3802-489F-B2D1-C27C36B17DA1}.Debug|x64.Build.0 = Debug|Any CPU
{C9B00432-3802-489F-B2D1-C27C36B17DA1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C9B00432-3802-489F-B2D1-C27C36B17DA1}.Release|Any CPU.Build.0 = Release|Any CPU
{C9B00432-3802-489F-B2D1-C27C36B17DA1}.Release|x64.ActiveCfg = Release|Any CPU
{C9B00432-3802-489F-B2D1-C27C36B17DA1}.Release|x64.Build.0 = Release|Any CPU
{78EA1806-A757-47F3-A1C5-DF2FC3B8288B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{78EA1806-A757-47F3-A1C5-DF2FC3B8288B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{78EA1806-A757-47F3-A1C5-DF2FC3B8288B}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -1086,6 +1062,30 @@ Global
{023244CF-F536-4621-9C89-6BCD0D242878}.Release|Any CPU.Build.0 = Release|Any CPU
{023244CF-F536-4621-9C89-6BCD0D242878}.Release|x64.ActiveCfg = Release|x64
{023244CF-F536-4621-9C89-6BCD0D242878}.Release|x64.Build.0 = Release|x64
{951F0545-1630-4E9B-B365-535D7FE9A845}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{951F0545-1630-4E9B-B365-535D7FE9A845}.Debug|Any CPU.Build.0 = Debug|Any CPU
{951F0545-1630-4E9B-B365-535D7FE9A845}.Debug|x64.ActiveCfg = Debug|Any CPU
{951F0545-1630-4E9B-B365-535D7FE9A845}.Debug|x64.Build.0 = Debug|Any CPU
{951F0545-1630-4E9B-B365-535D7FE9A845}.Release|Any CPU.ActiveCfg = Release|Any CPU
{951F0545-1630-4E9B-B365-535D7FE9A845}.Release|Any CPU.Build.0 = Release|Any CPU
{951F0545-1630-4E9B-B365-535D7FE9A845}.Release|x64.ActiveCfg = Release|Any CPU
{951F0545-1630-4E9B-B365-535D7FE9A845}.Release|x64.Build.0 = Release|Any CPU
{44B035E4-3049-4AB1-A8C1-212A427371A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{44B035E4-3049-4AB1-A8C1-212A427371A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{44B035E4-3049-4AB1-A8C1-212A427371A3}.Debug|x64.ActiveCfg = Debug|Any CPU
{44B035E4-3049-4AB1-A8C1-212A427371A3}.Debug|x64.Build.0 = Debug|Any CPU
{44B035E4-3049-4AB1-A8C1-212A427371A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{44B035E4-3049-4AB1-A8C1-212A427371A3}.Release|Any CPU.Build.0 = Release|Any CPU
{44B035E4-3049-4AB1-A8C1-212A427371A3}.Release|x64.ActiveCfg = Release|Any CPU
{44B035E4-3049-4AB1-A8C1-212A427371A3}.Release|x64.Build.0 = Release|Any CPU
{0CD78DBF-DC60-4B91-B5EF-4910172547CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0CD78DBF-DC60-4B91-B5EF-4910172547CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0CD78DBF-DC60-4B91-B5EF-4910172547CE}.Debug|x64.ActiveCfg = Debug|Any CPU
{0CD78DBF-DC60-4B91-B5EF-4910172547CE}.Debug|x64.Build.0 = Debug|Any CPU
{0CD78DBF-DC60-4B91-B5EF-4910172547CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0CD78DBF-DC60-4B91-B5EF-4910172547CE}.Release|Any CPU.Build.0 = Release|Any CPU
{0CD78DBF-DC60-4B91-B5EF-4910172547CE}.Release|x64.ActiveCfg = Release|Any CPU
{0CD78DBF-DC60-4B91-B5EF-4910172547CE}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
3 changes: 2 additions & 1 deletion journeyUnlock/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
## 更新日志

```
暂无
v1.0.1.1
补全卸载函数
```

## 指令
Expand Down
22 changes: 13 additions & 9 deletions journeyUnlock/journeyUnlock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Terraria.Net;
using TerrariaApi.Server;
using TShockAPI;
using TShockAPI.Hooks;

namespace journeyUnlock
{
Expand All @@ -16,24 +17,27 @@ public class journeyUnlock : TerrariaPlugin

public override string Name => "journeyUnlock";

public override Version Version => new(1, 0, 1, 0);
public override Version Version => new(1, 0, 1, 1);

public journeyUnlock(Main game) : base(game)
{
}

public override void Initialize()
{
Commands.ChatCommands.Add(new Command(
permissions: new List<string> { "journeyunlock.unlock" },
cmd: this.unlockCommand,
"journeyunlock", "junlock", "i解锁")
Commands.ChatCommands.Add(new Command("journeyunlock.unlock",unlockCommand,"journeyunlock", "junlock", "i解锁")
{ AllowServer = false });

Commands.ChatCommands.Add(new Command(
permissions: new List<string> { "journeyunlock.unlockfor" },
cmd: this.unlockForCommand,
"unlockfor", "unlockf", "g解锁玩家"));
Commands.ChatCommands.Add(new Command("journeyunlock.unlockfor",unlockForCommand,"unlockfor", "unlockf", "g解锁玩家"));
}

protected override void Dispose(bool disposing)
{
if (disposing)
{
Commands.ChatCommands.RemoveAll(x => x.CommandDelegate == unlockCommand || x.CommandDelegate == unlockForCommand);
}
base.Dispose(disposing);
}

private void unlock(Player tplayer, TSPlayer sender, string parameter, bool isSelf)
Expand Down
Loading