Commit graph

412 commits

Author SHA1 Message Date
ad3bd451ba
Save all of the config comments and include in JAR 2021-04-06 02:25:23 +02:00
470212411d
Successfully made an unnecessary subproject work 2021-04-05 18:57:40 +02:00
860dd66431
Add task to read source files 2021-04-05 02:45:28 +02:00
efa1dcfc8f
Convert to SBT project (manually), including shading 2021-04-04 00:32:27 +02:00
1b1a592a1e
It compiles! Remove LPInjector for now
The IDE and the Scala compiler don't agree on what is or isn't needed
2021-03-09 23:55:02 +01:00
a84cd4e8e3
Fix all Scala errors! 2021-03-09 03:41:04 +01:00
a0a7f756c4
Implicit classes for conversion, more fixing
Added 'extension methods' to convert to Scala-friendly formats easily
2021-03-09 02:47:11 +01:00
7296ebd2f8
Tailrec announcer method, fix some compile issues 2021-03-06 01:27:21 +01:00
d416eef144
Make some small functions 2021-03-02 01:40:58 +01:00
fce6b91b97
Use Scala version of Reactor & data types 2021-03-02 01:18:20 +01:00
c57ac26b2d
All classes converted that I wanted 2021-03-01 02:07:40 +01:00
9f47509dcb
Converted mcchat classes to Scala 2021-02-26 02:27:59 +01:00
428361c46c
Convert some more classes to Scala
Actually, a lot of them
2021-02-25 01:44:43 +01:00
261725dc0f
Convert some classes to Scala
Because why not
Except... It doesn't work. Yet.
2021-02-15 22:24:14 +01:00
b18f6beba9
Add more relocations to fix compatibility issues 2021-02-09 23:00:40 +01:00
28cff3ed43
Fix mcchat crash on config issue 2020-11-01 13:54:07 +01:00
491b5e4ee9
Fix commands not working in some cases
#98
Also unregistering DC commands
Also removed the command string from the unknown command message
2020-10-30 23:50:08 +01:00
64994ee44e
Fix some things, disable some modules by default 2020-10-30 00:56:08 +01:00
e57974ebcd
Remove debug msg and set version 2020-10-28 00:32:59 +01:00
324f5e756c
Detect restarts by reading *everything* logged
The server uses sout to print the message we're interested in...
Hopefully a check like this won't put any significant load on the server
2020-10-27 15:02:42 +01:00
2b549227a6
Aw man 2020-10-26 23:05:03 +01:00
61986c9b51
Fix server start message not being displayed 2020-10-26 22:56:13 +01:00
4d234cf832
Fix vanish player count and no crash on fast disable
#130
2020-10-26 21:16:08 +01:00
7866ddbe06
Config conversion 2020-10-26 20:01:00 +01:00
fdcab1acb2
Fix LPInjector and player data stuff 2020-10-25 21:49:09 +01:00
40fe1093e0
Player data things, LPInjector update start 2020-10-25 01:59:10 +02:00
a27a262858
LPInjector and mcchat fixes
Fixed LPInjector registering to the Core
Stop MCChatListener from having multiple active instances
MinecraftChatModule.state instead of all the flags
Showing MinecraftChatModule enable/disable on Discord
/discord reset --> restart
Wait for each shutdown message to send on shutdown (although it hasn't really been an issue so far)
This means using Mono<?> in a lot of places
Also added a contract (IntelliJ) to warn if not subscribed
Faking getOnlinePlayers() is unnecessary and causes too much trouble
Today's work
2020-10-10 00:29:21 +02:00
ccc15aa048
Log exceptions using the plugin/component logger
And fix LPInjector loading multiple times / once
2020-10-09 00:10:36 +02:00
891be91d69
Fix some mcchat and a reset issue
Using ConcurrentHashMaps (#62)
Add custom /list to hide vanished players (#120)
Fixed /discord reset for non-Paper servers (#103)
2020-10-08 00:02:49 +02:00
56d13ebf9f
Update to Discord4J v3.1.1
It wasn't as complicated as I expected
2020-10-07 22:27:20 +02:00
7cebb74835
Switch back to mocking
The ByteBuddy solution complains about adding/removing fields
But making a delegating mock maker is easy enough
2020-10-07 20:09:35 +02:00
3f2fa286fb
Attempt to use ByteBuddy directly for ServerWatcher 2020-10-07 00:52:59 +02:00
beae6e6ce0
Config and such 2020-09-12 01:54:45 +02:00
cd2132ba45
Fix ServerWatcher, mcchat works 2020-09-11 22:27:22 +02:00
666f05ff12
Attempts at mocking the server, fixes 2020-09-11 01:20:12 +02:00
d784d8b1e2
Fix /mcchat not using the configured prefix 2020-09-07 01:09:39 +02:00
3ee1eb3dec
An even smaller fix could go an even longer way 2020-08-31 23:55:46 +02:00
80a0312b1f
Role color config, removed role debug, role fixes 2020-08-30 02:23:21 +02:00
6bf91afab9
Fixes, fix vanilla command handling on 1.16
And on unsupported versions too
2020-07-31 01:43:02 +02:00
6b60135867
NorbiPeti has completed the challenge [Bullseye]
Using the custom event to detect player /stop as now restarts can come from there too (btw it defaults to stop unless a command is ran)
Added support for advancements in 1.16:
- Now each player gets effectively a reference to the player list for advancements, and since I simply call the method on the original object, it will pass that on, instead of my mock
- I tried calling the method that sends the reference on the mock in that case, but that just results in Mockito's version being called which means infinite recursion or something like that (I didn't get a StackOverflowError actually but the server didn't respond)
- I tried implementing the method myself but actually I never tested it because at that point I was convinced I can call the original the right way
- I had an educated guess that the mock is a subclass of the original class, so I just need to call super.method() right?
- But how do you call that reflectively? Apparently Method.invoke() will always respect overriden methods; but thanks to StackOverflow I found out about MethodHandles, and it has the perfect thing I need, findSpecial / unreflectSpecial
- Only problem is, kind of like how you can only use super.method() inside the class, you can only use the 'special' methods inside the class... So how could I make it run inside the mocked class? I have no idea since I can only supply an Answer object which has no connection to it, but apparently all the lookup() method actually does is call a constructor with the caller's class - so let's call the constructor! Which is, of course private
- So now I have a reflection call creating a Lookup object which can get a handle to the method without checking any overrides and then using that handle to call the original method with the 'this' parameter being the mock
#128
2020-07-30 01:54:58 +02:00
50500e87b9
Component logging and toggle for vanilla cmds
Config option to enable or disable vanilla command support in mcchat
2020-06-30 00:47:46 +02:00
ce71ff2dd6
Add support for 1.16, mostly 2020-06-27 03:02:32 +02:00
4ecd32f0ad
Update D4J and fix LuckPerms support 2020-05-27 15:45:14 +02:00
a9c71a3384
Possibly fix the Minecraft role bug
So it seems like there is a Minecraft role in another server as well
#95
2020-04-08 11:52:21 +02:00
cce7f59f4a
Fix issue with VanillaCommandListener on <1.15 2020-04-08 00:13:19 +02:00
b484fe6f64
Fix vanish player update
There's still no message on vanish so it can be figured out from the chat history
2020-03-20 02:02:37 +01:00
50cc0c8e61
Use reflection for VanillaCommandListener
Moved error handling to the wrapper
Fixed commands on Discord getting executed even if the preprocess event got cancelled
2020-03-15 23:55:02 +01:00
1b747ab99f
Use command channels and fix dependencies 2020-03-15 03:10:27 +01:00
45a1ba4fe1 Refactor DC->MC into more methods, remove channel handling
The permCheck won't be used for chat commands, needs fixing
2020-03-11 12:35:23 +01:00
037ec3b9dd Use VCL14 for 1.15, player sender mock
Using VanillaCommandListener14 for 1.15 as well
Using a mock for the DiscordPlayerSender too, to reduce the amount of code
Made the mocks stub-only, which should lower memory usage
2020-03-11 12:00:20 +01:00