06.04.2016, 19:38
Thanks for your answer, I'll be trying to find out what's happening.
Furthermore, I have tried to change the default message but I can't figure how, here is what I tried:
Another try:
But I always get something like this:
java.lang.AbstractMethodError: dev.acesamp.EventManager$$Lambda$1548/21424390.get(Lnet/gtaun/shoebill/object/Player;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/StringLjava/lang/String;
Furthermore, I have tried to change the default message but I can't figure how, here is what I tried:
Код:
public final PlayerCommandManager.UsageMessageSupplier CMESSAGE = (player, prefix, command) -> { StringBuilder stringBuilder = new StringBuilder("» Correct usage: " + prefix + command.getCommand()); if(command.getParameters().length > 0) { for(int i = 0; i < command.getParameters().length; i++) { stringBuilder.append(" <").append(command.getParameters()[i].name()).append(">"); } } if(command.getHelpMessage() != null) stringBuilder.append(" - ").append(command.getHelpMessage()); return stringBuilder.toString(); };
Код:
commandManager.setUsageMessageSupplier(CMESSAGE);
Код:
commandManager.setUsageMessageSupplier((player, prefix, command) -> { StringBuilder stringBuilder = new StringBuilder("» Correct usage: " + prefix + command.getCommand()); if(command.getParameters().length > 0) { for(int i = 0; i < command.getParameters().length; i++) { stringBuilder.append(" <").append(command.getParameters()[i].name()).append(">"); } } if(command.getHelpMessage() != null) stringBuilder.append(" - ").append(command.getHelpMessage()); return stringBuilder.toString(); });
java.lang.AbstractMethodError: dev.acesamp.EventManager$$Lambda$1548/21424390.get(Lnet/gtaun/shoebill/object/Player;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/StringLjava/lang/String;