Commit graph

432 commits

Author SHA1 Message Date
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
454265cd6f Update player list on (un)vanish
#120
2020-02-18 17:18:17 +01:00
ffdf5a2f18 Fix custom chat PL update NPE (#124) 2020-02-17 13:02:15 +01:00
1fa2635317 Set up GitHub Releases deploy
TBMCPlugins/ChromaCore#76
2020-02-10 12:56:48 +01:00
d58a7e819a Some documentation and updates 2020-02-05 16:49:07 +01:00
26971459ac Rename 2020-02-04 17:44:59 +01:00
940b601061 Fixed custom chat player list update
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
2020-02-03 13:20:38 +01:00
bcd7f7b810
Merge pull request #123 from TBMCPlugins/dev
Fixed many issues, default config values, improvements
2020-02-01 20:15:57 +01:00
de07503bc3
Documentation, split messages that are too big
#122
Removed some default values
Disallowing MC commands that could error when not loaded (#121)
Other fixes
2020-02-01 19:10:13 +01:00
bdb7381ab4
Finished some issues
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)
2020-01-18 03:54:17 +01:00
703f1f8cd5
Finished some of the half-completed issues and others
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)
2019-12-27 23:45:49 +01:00
b481bb0aa9
Fixed join msgs, vanished players in desc. and others
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)
2019-12-27 21:14:52 +01:00
3a94b6191b
Update D4J and some bugfixes
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
2019-11-28 00:16:58 +01:00
19463963e3
Make channels default to 0, profile URL config
Fix URL not-escaping
Made the plugin only attempt to access channels that are not set to 0
#110
2019-11-16 01:52:49 +01:00
02f60c2162
Fix client ID race condition, attempt to fix URL escaping 2019-11-07 00:21:58 +01:00
30e2da094a
Merge pull request #108 from TBMCPlugins/dev
1.14 support, better error handling
2019-10-30 19:43:30 +01:00
0e4a9ff7e0
Merge branch 'master' into dev 2019-10-30 19:41:29 +01:00
9caf4c54ed
Fixed that last error
#106
2019-10-30 15:05:31 +01:00
98ee2ce771
Fixed the MassiveCore error but there's more
#106
2019-10-27 23:27:54 +01:00
73fc4aedcc
Fixed DCP inventory, have no idea about MassiveCore
Essentials error is fixed
#106
2019-10-27 02:33:13 +01:00
88c1d100e9
Using parent & hopefully fixed #109 2019-10-23 02:40:34 +02:00
f1cec2ced1
Update to Java 10/11 & fake player remove
Apparently
2019-10-20 20:50:29 +02:00
3bd7b879c4
Hopefully fixed the #106 issue
Also removed mock check a while ago
2019-09-15 03:34:02 +02:00
ef44aa8830
Fix build (Java 8) 2019-09-11 15:33:02 +02:00
acd45ce4ae
Hopefully fixed the issue of multiple ready events
#107
2019-09-11 15:30:07 +02:00
ea0ef88068
Automatically get client ID for link, improvements
Literally 2 improvements
2019-08-26 22:26:10 +02:00
e4d5dcd0a2
Update D4J & role debug refined & fixed a )
PLW tested and confirmed working
Moved a ) to fix #105
2019-08-26 00:57:16 +02:00
91f1c8c4f7
Probably fixed PLW
Mostly yesterday
2019-08-25 03:23:14 +02:00
2963990b5e
Check if Minecraft is a game role 2019-08-23 21:52:52 +02:00
c456b24333
Command handling improvement, PLW work
More correct fallback for command handling
Getting closer to finish PlayerListWatcher
2019-08-23 01:58:47 +02:00
42e91409c7
Work on 1.14 PLW support 2019-08-14 21:29:19 +02:00
e88684a564
Error handling, 1.14 vanilla command support
Error handling (not today)
Added support for vanilla commands on 1.14
2019-08-14 00:53:51 +02:00
7a9e7de138
Made player list, custom and private chat toggleable
The last parts of #51
2019-08-08 14:31:01 +02:00
480032a3d6
Fix of getInfo and role adding/removing
Fixed getInfo if the player isn't on the DC server
Fixed message after adding or removing a game role
2019-08-08 13:45:40 +02:00