-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
♻️ 针对/ping重叠问题引入ExtensiveLiterCommandNode,用以特判管理指令树权限
- Loading branch information
1 parent
0fdd10d
commit ee4be2b
Showing
3 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
src/main/java/club/mcams/carpet/commands/commandNodes/ExtensiveLiteralArgumentBuilder.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package club.mcams.carpet.commands.commandNodes; | ||
|
||
public class ExtensiveLiteralArgumentBuilder { | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/club/mcams/carpet/commands/commandNodes/ExtensiveLiteralCommandNode.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package club.mcams.carpet.commands.commandNodes; | ||
|
||
import com.mojang.brigadier.Command; | ||
import com.mojang.brigadier.RedirectModifier; | ||
import com.mojang.brigadier.tree.CommandNode; | ||
import com.mojang.brigadier.tree.LiteralCommandNode; | ||
|
||
import java.util.function.Predicate; | ||
|
||
public class ExtensiveLiteralCommandNode<S> extends LiteralCommandNode<S> { | ||
private final Predicate<S> command_requirement; | ||
|
||
public ExtensiveLiteralCommandNode(String literal, Command<S> command, Predicate<S> requirement, CommandNode<S> redirect, RedirectModifier<S> modifier, boolean forks) { | ||
super(literal, command, requirement, redirect, modifier, forks); | ||
} | ||
} |
This file contains 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