Skip to content

Commit

Permalink
feat(fabric): 群服绑定api
Browse files Browse the repository at this point in the history
  • Loading branch information
cnlimiter committed Feb 20, 2024
1 parent fa3acd8 commit f16937b
Show file tree
Hide file tree
Showing 10 changed files with 1,042 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fabric/src/main/java/cn/evole/mods/mcbot/cmds/CmdApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ public class CmdApi {
private static StringBuilder CmdMain(String cmd, boolean isOp) {
StringBuilder result = new StringBuilder();
//#if MC >= 11900
McBot.SERVER.getCommands().performPrefixedCommand(isOp ? BotCmdRun.OP : BotCmdRun.CUSTOM, cmd);//优雅
//$$ McBot.SERVER.getCommands().performPrefixedCommand(isOp ? BotCmdRun.OP : BotCmdRun.CUSTOM, cmd);//优雅
//#else
//$$ McBot.SERVER.getCommands().performCommand(isOp ? BotCmdRun.OP : BotCmdRun.CUSTOM, cmd);
McBot.SERVER.getCommands().performCommand(isOp ? BotCmdRun.OP : BotCmdRun.CUSTOM, cmd);
//#endif
for (String s : (isOp ? BotCmdRun.OP.outPut : BotCmdRun.CUSTOM.outPut)) {
result.append(s.replaceAll(\\S", "")).append("\n");
Expand Down
23 changes: 23 additions & 0 deletions fabric/src/main/java/cn/evole/mods/mcbot/data/UserBind.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package cn.evole.mods.mcbot.data;

import com.xykj.easycsv.entity.CsvProperty;
import lombok.Getter;
import lombok.Setter;

/**
* @Project: McBot-fabric
* @Author: cnlimiter
* @CreateTime: 2024/2/20 14:56
* @Description:
*/

@Getter
@Setter
public class UserBind {
@CsvProperty("学号")
private int no;
@CsvProperty("姓名")
private String name;
@CsvProperty("年龄")
private Integer age;
}
Loading

0 comments on commit f16937b

Please sign in to comment.