更新:宵禁v2.2.0 加入指令功能与权限检查#219
Merged
Controllerdestiny merged 8 commits intoUnrealMultiple:masterfrom Jun 18, 2024
1242509682:master
Merged
更新:宵禁v2.2.0 加入指令功能与权限检查#219Controllerdestiny merged 8 commits intoUnrealMultiple:masterfrom 1242509682:master
Controllerdestiny merged 8 commits intoUnrealMultiple:masterfrom
1242509682:master
Conversation
Contributor
|
还是存在bug吗 |
Controllerdestiny
requested changes
Jun 18, 2024
GoodNight/GnUtils.cs
Outdated
Contributor
There was a problem hiding this comment.
这里的方法应该挪到Config类里
Controllerdestiny
requested changes
Jun 18, 2024
GoodNight/Commands.cs
Outdated
| #region 修改豁免名单方法 | ||
| if (args.Parameters.Count >= 3 && (args.Parameters[0].ToLower() == "hm")) | ||
| { | ||
| switch (args.Parameters[2]) |
Contributor
There was a problem hiding this comment.
args.Parameters[1]
顺便ToLower一下
GoodNight/Commands.cs
Outdated
| case "update": | ||
| { | ||
| string text = args.Parameters[3]; | ||
| if (text != null && Goodnight.Config.Add(text)) |
Contributor
There was a problem hiding this comment.
用string.IsEmptyOrNull
GoodNight/Commands.cs
Outdated
| } | ||
| case "clear": | ||
| { | ||
| string text = args.Parameters[3]; |
GoodNight/Commands.cs
Outdated
| } | ||
| case "clear": | ||
| { | ||
| string text = args.Parameters[3]; |
GoodNight/Commands.cs
Outdated
| { | ||
| case "update": | ||
| { | ||
| string text = args.Parameters[3]; |
Controllerdestiny
requested changes
Jun 18, 2024
| if (args.Parameters.Count == 2) | ||
| { | ||
| NPC npc; | ||
| List<NPC> matchedNPCs = TShock.Utils.GetNPCByIdOrName(args.Parameters[1]); |
Contributor
There was a problem hiding this comment.
应该加个判断是否list为长度0
| #region 设置宵禁时间 | ||
| if (args.Parameters.Count == 3 && args.Parameters[0].ToLower() == "time") | ||
| { | ||
| if (!TimeSpan.TryParseExact(args.Parameters[2], "hh\\:mm\\:ss", CultureInfo.InvariantCulture, out TimeSpan SetTime)) |
Contributor
There was a problem hiding this comment.
我不知道指令咋设计的但这里是不是应该args.Paramters[1]来着,你验证一下看看
GoodNight/README.md
Outdated
|
|
||
| | 语法 | 别名 | 权限 | 说明 | | ||
| | -------------------------------- | :---: | :--------------: | :--------------------------------------: | | ||
|
|
Contributor
There was a problem hiding this comment.
这个列表貌似存在错误,无法正常显示
Contributor
There was a problem hiding this comment.
这个里面有个静态字段的保存配置路径了,所以保存文件和读取文件的方法是不是可以不用传值了,直接用字段就行了
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.