Commit graph

430 commits

Author SHA1 Message Date
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
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
d58a7e819a Some documentation and updates 2020-02-05 16:49:07 +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
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
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
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
7db3b17090
Made DCP version-independent & msg reset
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)
2019-07-22 22:35:15 +02:00
5a5f653b86
Added DC user mention tabcomplete...
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...
2019-07-08 02:00:08 +02:00
4082c2abbf
Fixes, error handling
Sync events
Vanilla command error handling
(Older changes ^)
Fixed exception Coder pinging
2019-06-30 22:05:33 +02:00
0e24344efd
PLW error handling 2019-06-09 23:33:23 +02:00
27ddad537f
Only one ready event allowed 2019-06-08 22:44:03 +02:00
34e3bb0ead
Debug cmd fix, mcchat fix, config error fix
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
2019-06-06 19:40:15 +02:00
9edfcf6a3d
Main server fix, clean test OK
WTF ID fixed
2019-06-05 00:29:34 +02:00
939c6f4970
Server ready fix & main server fix attempt 2019-06-01 02:27:40 +02:00
5472929113
Added, 5xFixed
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
2019-05-31 00:38:28 +02:00
545b8130e0
Added timings and a line that solves everything
cb.setStoreService(new JdkStoreService());
2019-05-30 18:45:44 +02:00
bf538d9bd0
LP injecting, fake player fixes
#96
LuckPerms
Added support for excluding plugins from certain events from code
Also might have fixed some message timeouts by relocating netty
2019-05-25 01:48:06 +02:00
2bdba0af22
Calling login events
#96 isn't fixed by this
2019-05-20 23:35:22 +02:00
ac61225730
Update, bot cmd fix, debugging 2019-05-20 21:51:28 +02:00
9e8f988ea6
Renaming config methods to match keys 2019-05-20 13:07:20 +02:00
b396ec47b4
Some fixes, some debugging
#93
2019-05-11 00:15:50 +02:00
beab400873
Some debugging, some fixes
#93
2019-05-10 21:39:25 +02:00
f266924a9a More reacts 2019-05-06 15:47:01 +02:00
b68456e6f4
Even more fixes
Actually made the channel data return a Mono and used that
Used the read only config stuff
#93
2019-05-04 03:11:03 +02:00
4881f6bdd2
Some more fixes
Made the channel data return a Mono and used that
#93
2019-05-01 00:50:24 +02:00
eeb1955ebe
Bunch of fixes
#93
2019-04-25 19:52:43 +02:00
e2e8a58c4e
It compiles!
And I thought this is gonna be easy
#93
2019-04-25 02:50:55 +02:00
2500572e0d Even more refactoring 2019-04-24 17:50:13 +02:00
59066ce09a Refactoring... 2019-04-24 16:50:00 +02:00
038cb98f1a Refactoring & made mcchat teleport config 2019-04-24 13:29:52 +02:00
95af050517 The refactoring continues 2019-04-17 17:54:08 +02:00
12ca6fbfb5 More converting 2019-04-17 16:51:42 +02:00
d8d75c063b Started converting to new D4J
#93
2019-04-17 13:52:01 +02:00
55c61cef98 New command sys for /discord & inv link 2019-04-15 15:36:48 +02:00
Irinyi Kabinet Felhasználó
c8680ae92c Merge branch 'master' into dev 2019-04-15 14:51:45 +02:00
d2aea8559a Server ready conf, doc 2019-04-10 13:50:26 +02:00
8e2538e553
Ignore case for role command 2019-04-05 17:26:10 +02:00
22bdc3fa62
YEEHAW fix, reload command 2019-03-16 14:49:27 +01:00
2b4034b05f
NPE and 2 cmd fix 2019-03-14 16:40:58 +01:00
b39a571246
Made excluded plugins configurable
Using configable mod role in debug command
Also moved the AnnouncerModule
2019-03-09 23:09:27 +01:00
cadb53d886
Made the plugin work cleanly (#51)
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
2019-03-09 02:07:56 +01:00
14c42614d8
#bot mention ch null handling, limiting tries
Won't try to get channels forever, since they may be set incorrectly
2019-03-02 19:04:38 +01:00
0f1f7b4ead
Better handling of missing token
Also moved the token's location
2019-03-01 18:01:32 +01:00
ca5fb90774
Command system fixes
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
2019-02-23 00:33:10 +01:00
325b094bf7
Converted all commands
Well, haven't finished the role command
2019-02-22 00:44:13 +01:00
0c9da49add
Brtoggle & cmd fix
#89
Channelcon
Attempted to support chat rooms in custom chat
2019-02-17 02:26:14 +01:00
0cbc22eb72
Added support for broadcast toggles
#89
2019-02-16 14:08:37 +01:00
5a9986de4f
Command stuff fixed
Replies sanitized, userinfo converted
Manually removing spaces
Tested
2019-02-16 00:39:48 +01:00
13b168d238 Made all channels configurable
Removed Vault repo, was unused and errors now
Removed all channel fields from main class
2019-02-13 15:21:57 +01:00
9ba57fd989
Actually using the cmd sys, logger stuff
Some of the new files are a couple days old
Using the plugin's logger almost everywhere
2019-02-12 22:40:09 +01:00
d08d32f73f
Started using new command system for DC cmds
Some of the new files are a couple days old
2019-02-09 00:24:42 +01:00
abd4050786
Server start/stop msg + announcer fix
Announcer data migration fix (which won't be needed because I'm gonna copy the new config over)
The server start/stop messages show up again
2019-01-30 23:41:52 +01:00
2659170c4d
Modules, fixes, pins
Keeping 40 pinned messages instead of 10
GameRoleModule fixes
AnnouncerModule
Other fixes
#51
2019-01-30 01:09:18 +01:00
7c15495fab
Using modules more & calling preprocess event
Calling the command preprocess event
Added to FunModule (/list, full house)
Made whitelisted commands and other stuff configurable
Game role module
Name change
#51
2019-01-28 23:21:17 +01:00
5c7100bb69
Added check for mcchat on shutdown
It'll only log fake players out that aren't actually on the server
2019-01-20 00:43:47 +01:00
baa9cb65c8
API changes 2019-01-12 01:29:34 +01:00
93af5f66d2
Fixes and improvements (config)
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
2019-01-10 01:45:45 +01:00
f13c8321cd
Slight API change 2018-12-27 01:16:55 +01:00
1911672b10
Christmas hotfix 2018-12-26 01:35:36 +01:00
68e69782ee
Well, not everything
Fixed some private mcchat issues
Fixed #85
2018-12-23 23:50:13 +01:00