@Karlatemp 感谢,已解决
Celorig 发布的帖子
-
JSimpleCommand的参数似乎无法被/help正确显示参数名
public class Roll extends JSimpleCommand { public static final Roll INSTANCE = new Roll(); private Roll() { super(Plugin.INSTANCE, "roll"); setDescription("roll点数"); } int number = 0; Random r = new Random(); @Handler public void handle(MemberCommandSenderOnMessage sender,int range,String string){ if(range>0&&range<=32768) { number = r.nextInt(range+1); sender.sendMessage(string + "是 " + number + "/" + range); }else{ sender.sendMessage("点数超出范围!请输入1-32768之间的整数"); } } }
代码如上,但实际使用时不管是参数不足还是输入/help查询指令,都会显示:
或者
比较想知道如何才能让它正确显示参数名?