@EventHandler(priority = EventPriority.LOWEST)
public void onCommandPreprocess(PlayerCommandPreprocessEvent e)
{
String cmd = e.getMessage().substring(1);
if(cmd.length() <= 0) return;
String[] unprocessedArgs = cmd.split(" ");
String label = unprocessedArgs[0];
String[] args = new String[unprocessedArgs.length - 1];
System.arraycopy(unprocessedArgs, 1, args, 0, args.length);
if(label.equalsIgnoreCase("cmapi"))
{
e.setCancelled(true);
command.onCommand(e.getPlayer(), null, label, args);
}
}
CMListener.java 文件源码
java
阅读 21
收藏 0
点赞 0
评论 0
项目:ChatMenuAPI
作者:
评论列表
文章目录