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
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
The problem was that for some reason I created a field that was already present in the parent class and it just happened to be pretty much never used before the PL update
Also updated EssentialsX dependency
Fixed join messages appearing in addition to custom ones (#119)
For real this time
Not saying the game role color is the default one (#118)
Fixed role listing (#80)
Processing custom emotes (#48)
Made role listing fancier (#80)
Trying to reload config before reset (#113)
Allowing /discord reset if the login fails, clarified how to get a token (#111)
Update D4J
Fixed join messages appearing when they shouldn't (#119)
Only showing players who can see the channel (#91)
Fixed vanished players appearing in the channel descriptions (#120)
The update fixes the numerous errors about a missing status constant
Remove test check (#114)
Improvements and checking for admin permission (#115)
It also checks for channel perms now
Some things may not be implemented yet
Also added a wrapper around the vanilla cmd listener so Mockito doesn't complain about the missing class
Msg reset fixed (#101)
But only for commands, because that's how it works now apparently
#16
Also might have made it 1.14 ready, though I switched the dependency back to 1.12
Oh it's 1.12.2...
Also removed debug messages
The Minecraft chat didn't run if the command channel was different
The debug command didn't run if the mod role didn't exist
Added mcchat login/logout messages
Only printing timings messages if debug is on
Fixed#93
F i x e d
Fixed command handled status
Fixed debug command
Fixed error reporting limit
Fixed Discord YEEHAW
Clean install works pretty well
Automatically setting first server as main server
Removed devServer variable, getting the guild from the channels
Disabling each component that doesn't have its channel(s)/role(s) set correctly (unless it's not required)
Removed redundant variable from the FunModule
Correctly handling missing channel settings in some places
Checking any role position for game roles, not just "ChromaBot"
The bot is playing Minecraft now
Always giving permission for commands for now
In encounter order:
Lowercasing message first character on the sender
Command sender fixes
Mention deleting fixed if there is no space
Added error handler to the message receive event
Converted role command
Calling the command preprocess event
Added to FunModule (/list, full house)
Made whitelisted commands and other stuff configurable
Game role module
Name change
#51
Fixed occasional ConcurrentModificationException with the custom chat loading
Waiting much less on MC command responses (0.2s instead of 0.5s)
Made the #bot channel configurable
Linking the #bot channel everywhere it's mentioned
#51