diff --git a/sdcf4j-core/src/main/java/de/btobastian/sdcf4j/CommandHandler.java b/sdcf4j-core/src/main/java/de/btobastian/sdcf4j/CommandHandler.java index 6202433..07a5c14 100644 --- a/sdcf4j-core/src/main/java/de/btobastian/sdcf4j/CommandHandler.java +++ b/sdcf4j-core/src/main/java/de/btobastian/sdcf4j/CommandHandler.java @@ -20,6 +20,7 @@ import java.lang.reflect.Method; import java.util.ArrayList; +import java.util.Collections; import java.util.HashMap; import java.util.List; @@ -96,6 +97,16 @@ public boolean hasPermission(String userId, String permission) { return false; } + /** + * Gets a list with all commands in the order they were registered. + * This is useful for automatic help commands. + * + * @return A list with all commands the the order they were registered. + */ + public List getCommands() { + return Collections.unmodifiableList(commandList); + } + /** * Checks if you are allowed to do something with the given permission. *