03.04.2016, 16:18
@Su37Erich: You should check if the player is online, but as dusk already said, most of the functions already do a check. Your timer needs a reference, by the way, because it will be destroyed if you don't assign it to a variable.
I added a .getOrigin() method for the CommandEntry class which allows you to check for the origin of a CommandEntry (http://ci.gtaun.net/job/shoebill-common/156/). Here is an example (keep in mind that you need to do this for all CommandGroups if you want to get all commands from a specific class):
I added a .getOrigin() method for the CommandEntry class which allows you to check for the origin of a CommandEntry (http://ci.gtaun.net/job/shoebill-common/156/). Here is an example (keep in mind that you need to do this for all CommandGroups if you want to get all commands from a specific class):
PHP код:
commandManager.getCommandEntries().forEach(commandEntry -> {
if(commandEntry.getOrigin() == PlayerCommands.class) {
System.out.println("Command " + commandEntry.getCommand() + " is of origin PlayerCommands.");
}
});