forked from hannibal002/SkyHanni
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'beta' into backend/scoreboard-refactor
- Loading branch information
Showing
125 changed files
with
1,649 additions
and
1,227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/main/java/at/hannibal2/skyhanni/config/commands/CommandBuilder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package at.hannibal2.skyhanni.config.commands | ||
|
||
class CommandBuilder(val name: String) { | ||
var description: String = "" | ||
var category: CommandCategory = CommandCategory.MAIN | ||
var aliases: List<String> = emptyList() | ||
private var autoComplete: ((Array<String>) -> List<String>) = { listOf() } | ||
private var callback: (Array<String>) -> Unit = {} | ||
|
||
fun callback(callback: (Array<String>) -> Unit) { | ||
this.callback = callback | ||
} | ||
|
||
fun autoComplete(autoComplete: (Array<String>) -> List<String>) { | ||
this.autoComplete = autoComplete | ||
} | ||
|
||
fun toSimpleCommand() = SimpleCommand(name.lowercase(), aliases, callback, autoComplete) | ||
} | ||
|
44 changes: 44 additions & 0 deletions
44
src/main/java/at/hannibal2/skyhanni/config/commands/CommandCategory.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package at.hannibal2.skyhanni.config.commands | ||
|
||
enum class CommandCategory(val color: String, val categoryName: String, val description: String) { | ||
MAIN( | ||
"§6", | ||
"Main Command", | ||
"Most useful commands of SkyHanni", | ||
), | ||
USERS_ACTIVE( | ||
"§e", | ||
"Normal Command", | ||
"Normal Command for everyone to use", | ||
), | ||
USERS_RESET( | ||
"§e", | ||
"Normal Reset Command", | ||
"Normal Command that resents some data", | ||
), | ||
USERS_BUG_FIX( | ||
"§f", | ||
"User Bug Fix", | ||
"A Command to fix small bugs", | ||
), | ||
DEVELOPER_TEST( | ||
"§5", | ||
"Developer Test Commands", | ||
"A Command to edit/test/change some features. §cIntended for developers only!", | ||
), | ||
DEVELOPER_DEBUG( | ||
"§9", | ||
"Developer Debug Commands", | ||
"A Command to debug/read/copy/monitor features. §cIntended for developers only!", | ||
), | ||
INTERNAL( | ||
"§8", | ||
"Internal Command", | ||
"A Command that should §cnever §7be called manually!", | ||
), | ||
SHORTENED_COMMANDS( | ||
"§b", | ||
"Shortened Commands", | ||
"Commands that shorten or improve existing Hypixel commands!", | ||
) | ||
} |
Oops, something went wrong.