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

修复:修复了简短指令插件 Dispose方法中关服引发的超堆栈问题,加了个免疫阻止原始的权限名 #22

Merged
merged 3 commits into from
Apr 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 9 additions & 3 deletions ShortCommand/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ public CommandCD(string name, string cmd)

public override string Name => "简短指令改良版";

public override string Author => "GK 超级改良";
public override string Author => "GK 少司命修复版";

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

public override string Description => "由GK改良的简短指令插件!";

Expand Down Expand Up @@ -107,7 +107,7 @@ protected override void Dispose(bool disposing)
ServerApi.Hooks.GameInitialize.Deregister(this, this.OnInitialize);
PlayerHooks.PlayerCommand -= this.OnChat;
}
this.Dispose(disposing);
base.Dispose(disposing);
}

private void OnInitialize(EventArgs args)
Expand All @@ -121,6 +121,12 @@ private void OnChat(PlayerCommandEventArgs args)
{
return;
}

if (args.Player.HasPermission("免禁指令"))
{
return;
}

if (this.NotSourceCmd.Contains(args.CommandName))
{
args.Player.SendErrorMessage("该指令已被禁止使用!");
Expand Down
21 changes: 15 additions & 6 deletions ShortCommand/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
# ShortCommand 短指令
# ShortCommand 简短指令

- 作者: GK
- 出处: GK
- 使命令更加简洁
- 作者: GK、少司命、羽学
- 出处: QQ群(232109072)
- 这是一个Tshock服务器插件主要用于将插件或原生自带的Tshock命令映射成一个自己想要的命令
- 并可通过配置文件中的【阻止原始】彻底禁用一个命令,加了Reload重载配置文件方法
- 并配备了一个权限名【免检指令】使特定用户组不受【阻止原始】的影响

## 更新日志

```
暂无
v1.3.0
修复了Dispose方法中关服引发的超堆栈问题
加了个免疫阻止原始的权限名
```

## 指令

| 语法 | 权限 | 说明 |
| -------------- | :-----------------: | :------: |
| 无 | 免禁指令 |插件不对其禁止使用原始命令|

## 配置

Expand Down Expand Up @@ -40,3 +46,6 @@
]
}
```
## 反馈
- 共同维护的插件库:https://github.com/THEXN/TShockPlugin/
- 国内社区trhub.cn 或 TShock官方群等
Loading