Commit graph

569 commits

Author SHA1 Message Date
84062fee7c
Command system fixes based on TEEESTS
- Fixed unregistering commands
- Fixed command registration
- Fixed command argument handling
- Fixed command handling async task not implemented
2023-07-21 22:29:47 +02:00
f05305cb0a
Add command test and fix command path handling
- It feels so good to be able to debug this code
2023-07-21 01:01:32 +02:00
29f7883f9b
Fix number conversion in configs
- java.lang.Integer could not be cast to java.lang.Long and it was so confusing for so long
- Int::class.java is int.class instead of Integer.class like I thought
2023-07-20 01:45:52 +02:00
822b2a5a67
Switch to Paper and fix some things 2023-07-01 20:09:29 +02:00
05fe1c261c
Fix Scala compiler freaking out on ListConfigData
- Moved the custom list's class to the top level
2023-06-30 03:18:07 +02:00
ddd24a73f6
Fix player config stuff and test event stuff
- The chat tests work!
2023-06-27 01:31:55 +02:00
4f0e05892a
Fix test issues and command issues
- Fixed test config loading (it loaded it twice, probably would've on a regular server too)
- Fixed missing permission plugin when testing
- Fixed command node casting errors
- Fixed event handler lists not being JVM static
2023-06-27 01:07:22 +02:00
529fef1c5f
Fix config lateinit errors and fix testing 2023-06-26 23:03:19 +02:00
5e39b6ef57
Rename .java to .kt 2023-06-26 23:03:17 +02:00
58729ab885
Config delegation & reload improvements
- Added a class and an interface to make using list config data easier
- Made everything config-related reusable and reloadable because delegated properties don't update automatically when reassigned
- This also means that the original ConfigData instance should also properly update now when reloading, although now we return the delegate
2023-06-18 20:16:12 +02:00
a26c16565f
Add support for delegating config properties
- Changed the return value of all getData() methods to allow using the result for property delegation
- This allows using the config properties like any other property in Kotlin
- Also delegating the underlying ConfigData object to the delegate (heh) so that the result can still be used from Java normally
- It does require one notable change though: using the IConfigData interface *everywhere*
- One problematic part for this is ListConfigData, as a much more elaborate IConfigData<ListConfigData<T>.List> needs to be used for list configs
- Also using the display name for MC users heh
2023-06-12 22:56:39 +02:00
cd108dc787
Implement channel handling for Chroma users
- This allows properly implementing Minecraft chat for Discord users instead of creating fake CommandSenders
- Channel access needs to be implemented on all platforms - this could allow automatically managing who has access to a Discord channel for example
- In the future custom commands could be supported without having to connect accounts
- Also any information can be retrieved about the user when they chat, not just their name
2023-06-09 00:11:53 +02:00
291fc068fd
Only use Chroma users for chat messages
- Don't use Command2Sender for getting Chroma users
- The CommandSender interface is a Minecraft-specific concept and using Command2Sender just adds unnecessary complexity
- Added convenience methods for getting TBMC players and the console
2023-05-23 00:49:52 +02:00
b57420c72a
Command sender and config improvements
- Use Command2Sender for getting Chroma users
- Throw exception if a proper converter doesn't exist
- Make ConfigData non-nullable altogether, but allow for nullable type + documentation
- Converter stuff is older, config stuff is from earlier today
- Command2 stuff isn't really worked out yet
2023-05-14 03:03:51 +02:00
aabc2cd48c
Remove ComponentData, convert two components
- The new way of replacing configs doesn't actually support having ConfigData fields as they can become obsolete
- Fixed KDoc formatting (new lines)
2023-05-05 02:48:06 +02:00
e610dbc0f6
Rename .java to .kt 2023-05-05 02:48:01 +02:00
6c70e8707d
Fix config/plugin lateinit error, convert API, color codes
- The MainPlugin.instance field wasn't initialized when the MainPlugin was being initialized (config), so delayed the config saving until it's actually running
- Also added library to support Kotlin coroutines in Bukkit but not using it yet
2023-05-03 00:26:24 +02:00
d4aeb198a8
Rename .java to .kt 2023-05-03 00:26:20 +02:00
260a67506a
Fixes for Java/Scala compatibility bugs 2023-04-25 23:58:57 +02:00
5e1f378ec7
It compiles! Finished MC tab completion
- Custom tab complete methods are now case-sensitive
- Custom tab complete methods are also not supported for now
2023-04-21 04:05:04 +02:00
ee7e531dc0
Rename .java to .kt 2023-04-21 04:04:57 +02:00
17758bb54e
Using ChatColors and convert remresidents command that we don't need anymore 2023-04-19 02:55:41 +02:00
6d0d9adef5
Rename .java to .kt 2023-04-19 02:55:38 +02:00
8616ecbefc
Fixed getSubcommands() and other command fixes
- Command2MC tab completion still awaits - but then that might be all that's left before testing
2023-04-18 01:52:40 +02:00
30a2fe0b68
Finished Kotlin conversion, Command2MC stuff remains 2023-04-17 21:04:00 +02:00
1d88d3e859
Rename .java to .kt 2023-04-17 21:03:57 +02:00
42fd0dfeac
Player, config and player data improvements 2023-04-17 03:11:36 +02:00
8104b1a8d4
Rename .java to .kt 2023-04-17 03:11:33 +02:00
39424fa92b
Fix and improve user class, convert player class
And other stuff
Reworked ChromaGamerBase.connectWith()
Converted other stuff too
2023-04-16 03:18:03 +02:00
113d975986
Rename .java to .kt 2023-04-16 03:18:00 +02:00
4ed001cb54
More conversions, user classes, some configs
Removed writePluginList config option
2023-04-14 03:07:25 +02:00
85efc873d6
Rename .java to .kt 2023-04-14 03:07:22 +02:00
56d1f0c2a2
A bunch of changes and improvements - and Kotlin
- Tried to reduce usage of MainPlugin.Instance, ended up refactoring more Component/ButtonPlugin things
- Config fixes, among other things
2023-04-14 00:48:18 +02:00
d6fba6a495
Rename .java to .kt 2023-04-14 00:48:14 +02:00
7b7ad18818 Config improvements
- Added component wrapper to ensure null safety
- Plugin/config properties can no longer be null
2023-04-05 15:19:28 +02:00
8d8708d14b Improved config handling, updated read-only and list configs
- The read-only configs are no longer using a separate class, it seems
unnecessary
- The list configs got refactored so that the entire list doesn't get
recreated each time it changes
- Also added support for getters/setters for the list config, just to be
consistent
2023-04-05 15:19:28 +02:00
99958e74f9 Rename .java to .kt 2023-04-05 15:19:28 +02:00
4e617fdbc9 Continued implementing support for annotations, finished permission check 2023-04-05 15:19:27 +02:00
af7d097f9b Separated MC-specific command metadata
Implementing permission handling for MC
2023-04-05 15:19:27 +02:00
be5f9ded60 Converted ConfigData and started others
- Bumped Spigot version to 1.18.1, so we get config comment support natively
- Made getters perform a basic casting by default, this was done by the
ConfigData code before
2023-04-05 15:19:27 +02:00
89b7246f4f Rename .java to .kt 2023-04-05 15:19:27 +02:00
ca00422ce8 Start converting more config stuff and add TODOs 2023-04-05 15:19:27 +02:00
482df40992 Convert config stuff and fix issues 2023-04-05 15:19:26 +02:00
65be3b2df9 Rename .java to .kt 2023-04-05 15:19:26 +02:00
8cf01f1137 Converted and reworked command builder, node, data 2023-04-05 15:19:26 +02:00
00852dd868 Rename .java to .kt 2023-04-05 15:19:26 +02:00
a5099a65d1 Convert some more code to Kotlin
Basically done with converting Command2
Also moved the Minecraft part of the param converter to Command2MC, although the user object getter should be made more generic
2023-04-05 15:19:26 +02:00
0bf1f9789b Convert some code to Kotlin
Why not
Lombok didn't work and I had other frustations with Java streams
Removed some unnecessary tab complete code
2023-04-05 15:19:25 +02:00
9a859de583 Rename .java to .kt 2023-04-05 15:19:25 +02:00
db08d9baee Added documentation and refactored commands.yml handling
- Added command argument help manager to read the arguments
- MC tab completion still needs to be fixed
2023-04-05 15:19:25 +02:00