Commit Graph
100 Commits
Author SHA1 Message Date
ljacqu ff2f8a63bb Fix bugs in purge classes, cleanup
- OfflinePlayer objects were never mapped to names
- Essentials purge was run even if setting was disabled
- Console user saw messages twice
- Misc: trivial field reorderings, change DefaultPermission to be null safe
- Permissions: do not expose PermissionHandler just to get its type
2016-06-19 17:56:50 +02:00
ljacqu a0abe3d19d Minor householding
- Remove getter for NewSetting
- Reduce visibility of classes used by DelayedRunner
2016-06-19 16:13:00 +02:00
ljacqu d35005167e Merge branch 'master' of https://github.com/AuthMe-Team/AuthMeReloaded into 674-purge-process-refactor 2016-06-19 16:02:08 +02:00
ljacqu e38c1ea447 Merge branch '777-Fast-Join-Handler' of https://github.com/AuthMe-Team/AuthMeReloaded 2016-06-19 15:51:40 +02:00
ljacqu fb5e7d40c6 Change delayed injection to only change behavior of its own elements
- Introduce new BeforeInjecting annotation to not modify the (expected) order of annotations that do not belong to us
  - Avoids using hacky way of first initializing field to an Answer that will delegate on demand to the proper class...
- Remove PostConstruct support for Mockito's InjectMocks: we should not change the established behavior of external elements
2016-06-18 15:31:11 +02:00
ljacqu a1c62e7c04 Create delayed injection test runner
- Test runner supporting new "DelayedInjection" annotation: such fields are only initialized with instantiation right before the first time they're used in tests, allowing to set up mock behavior beforehand
2016-06-18 13:19:07 +02:00
ljacqu cd1acfde1b #674 Create tests for purge commands and purge service 2016-06-18 11:13:17 +02:00
ljacqu 3629c51fc1 #674 PurgeService: Always register if purging, reduce code duplication
- Rename autoPurging to isPurging: we should always register if a purge task is in progress (regardless if autopurge or not) and deny any new requests
- Reduce the same logic being coded multiple times by calling through the methods
- DataSource: remove purgeBanned in favor of purgeRecords, both do exactly the same thing
2016-06-16 22:52:11 +02:00
ljacqu 94451647f3 #674 #656 Delete DataManager
- Replaced with PurgeService
2016-06-16 22:06:49 +02:00
ljacqu 2ac89f5938 Apply minor changes to PurgeService
- Remove various imports / unused fields
- Make CacheDataSource call source for purging on DB
- Minor: SQLite - place creation of PreparedStatement outside of loop
- Make specific purge actions called from task package-private (clearer from the outside which methods can be called from the outside)
2016-06-16 21:04:12 +02:00
ljacquandGitHub 2c4d1b54cf Remove solved todo message 2016-06-16 08:03:48 +02:00
ljacqu acd4a772e8 Minor householding in tests
- Add missing test for injector
- Remove redundant Mock fields
2016-06-15 21:24:57 +02:00
ljacqu ac484345a2 Change password task to async process
- Perform async change password task just like other async processes: via Management
- Remove legacy setting
- Remove now unused service getter (#736)
2016-06-15 20:56:34 +02:00
ljacqu 15886fb517 #723 Let LimboPlayer task manager decide which message key to use
- Pass boolean (is registered) value and determine internally which message key (email registration vs. regular) to use in the message task
2016-06-15 20:37:00 +02:00
ljacqu 5cbb83e153 Code householding, add tests to TempbanManager
- Delegate event firing to BukkitService
- Write tests for IP banning function
- Update comments on tempban properties in config.yml
2016-06-14 21:52:43 +02:00
ljacqu 3411450ff1 #760 Fix single session feature
- Move the check from PlayerLoginEvent to AsyncPlayerPreLoginEvent. Single session can only be implemented with PreLoginEvent; it is already to late to check this in the PlayerLoginEvent. Ergo, we cannot offer this for CraftBukkit.
- Remove interactions with LimboCache - no interactions with LimboCache expected until after OnJoinVerification checks. (Thanks sgdc3!)
2016-06-14 21:03:32 +02:00
ljacqu 043ee90254 #423 Make seeownaccounts / seeotheraccounts messages translatable 2016-06-13 21:45:21 +02:00
ljacqu 221ce13176 #423 Display first name gray also 2016-06-13 20:46:17 +02:00
ljacqu d5ce172e14 #729 Make FirstSpawn event synchronous 2016-06-13 19:19:37 +02:00
ljacqu 98bbf51594 Update dependency graph 2016-06-12 22:31:11 +02:00
ljacqu 450c80f63c #720 Update Hungarian messages
kindly submitted by @rErEaT
2016-06-12 22:10:30 +02:00
ljacqu 89bbfc48ee #723 Create provider for TimeoutTask and MessageTask, remove LimboCache#getInstance
- Create class to handle the creation of "LimboPlayer tasks" (adds encapsulation, reduces duplication)
- Move group setting into its own class because (mutual dependency between LimboCache and PermissionsManager otherwise)
2016-06-12 22:00:05 +02:00
ljacqu 69100daba5 Get jar files via URI objects in tests to prevent issue with spaces 2016-06-12 20:54:39 +02:00
ljacqu d6e1fd5ceb Use injection in and for LimboCache, migrate some legacy settings, remove setGroup from Utils
- New injector method allows to retrieve services if they've already been instantiated -> useful for onDisable() which might be run after aborted initialization
- Deprecate various methods that need to be removed
2016-06-12 16:14:34 +02:00
ljacqu 5ef62784b5 #729 Use world from LimboPlayer for "spawn after login" feat., simplify teleport event constructors 2016-06-12 14:10:38 +02:00
ljacqu 3cdec91255 Do not teleport unregistered player if registration is optional 2016-06-12 12:48:32 +02:00
ljacqu 68d5145cd7 #729 Refactor spawn handling into separate service (work in progress) 2016-06-12 12:46:03 +02:00
ljacqu 4d75542594 Remove unused fields instead of suppressing warnings 2016-06-11 19:05:10 +02:00
ljacqu 2e269b6f5e Add missing unit tests for commands 2016-06-05 13:21:05 +02:00
ljacqu 3753a0ef96 #565 Allow to skip extended encryption methods
- Set system property via surefire plugin and create profile that modifies the property
- Check for the new property in AbstractEncryptionMethodTest and shorten/skip the tests when necessary
2016-06-05 00:29:31 +02:00
ljacqu 4fe26f08d4 #612 Check if plugin is permission system within method itself
- Iterate over all values within the method
- Bug fix: change method to use pluginName field, and not name
2016-06-04 22:40:30 +02:00
ljacqu 2a4bb483a3 #727 finalization - minor javadoc changes 2016-06-04 21:57:31 +02:00
ljacqu 91111ca476 #727 Remove CommandService being passed as parameter to other methods
- No longer need to pass as param to other methods since CommandService is now an injected field
2016-06-04 21:16:58 +02:00
ljacqu 26ac466035 #727 Instantiate ExecutableCommand objects in CommandHandler
- Change CommandDescription to contain a reference to ExecutableCommand class only
- Instantiate the actual ExecutableCommand objects in CommandHandler
2016-06-04 21:13:38 +02:00
ljacqu c6778b566d #727 Remove CommandService from ExecutableCommand interface
(work in progress)
- Inject CommandService like other classes instead of passing it as method parameter
- Not solved: cyclic dependency CommandInitializer > ExecutableCommand > CommandService > CommandInitializer...
2016-06-04 11:02:15 +02:00
ljacqu 40ce01f65e #601 Increase captcha count on login start
- Increase login count at start of the login process (as done previously) and not only when login has failed AND player is still online
- Add missing javadoc to CaptchaManager
2016-06-04 10:44:34 +02:00
ljacqu 12703d1613 #601 Integrate plugin manager
- Encapsulate captcha functionality into a class instead of two public fields on the AuthMe main class(!)
   - Let CaptchaManager worry about whether it is enabled or not -> no need to check on the outside
- Implement full reloading support to enable/disable captchas + parameters
- Add unit tests
2016-06-03 22:47:17 +02:00
ljacqu 1f2a823f99 Add tests for PluginHooks - Multiverse interactions 2016-06-03 13:36:33 +02:00
ljacqu e8717ba076 Update verification notes in messages files + add entry for #743 invalid chars in password 2016-06-03 12:52:47 +02:00
ljacqu 55f7e8097a #743 Add proper error message for "invalid chars in password"
- Change password validation to return a ValidationResult object for passing message arguments
- Remove wrapping methods in ProcessService and CommandService and use ValidationService directly
2016-06-03 12:51:49 +02:00
ljacqu 6d2597a980 #739 Fix command unit tests; adjust default handling
(cherry picked from commit 61c119b)
2016-06-02 23:12:01 +02:00
ljacqu 9b5009eb8c #742 Create test that plugin.yml corresponds to command definitions
- Create test
- Fix definitions to correspond
2016-06-02 15:49:21 +02:00
ljacqu e75cff5fb8 Remove static injections in ListenerService
- Get other classes via Inject annotation
- Remove no longer needed Utils methods (relates to #736)
- Create tests for ListenerService and AuthMeBlockListener
- Performance improvement: keep unrestricted names as Set instead of List for faster contains() method
2016-06-02 12:46:54 +02:00
ljacqu 408e8dd0dd #739 Create unit tests for PermissionsManager#hasPermission 2016-06-02 00:03:02 +02:00
ljacqu 7fd1ac0856 Merge branch '314-permissions-manager-refactor' of https://github.com/AuthMe-Team/AuthMeReloaded 2016-06-01 23:39:14 +02:00
ljacqu 38db2ef0bd Minor code householding
- Add removed property to migration service
- Log exception with appropriate logger method
2016-06-01 23:24:48 +02:00
ljacqu 95343e366b #314 Evaluate default permission on enum, remove default from handler interface
- Evaluate permission for DefaultPermission on the enum itself
- Remove boolean default from PermissionHandler for hasPermission()
- Remove some unused / intermediary hasPermission() flavors in PermissionsManager
2016-06-01 21:56:57 +02:00
ljacqu e59bbbf10e #738 Add check that shooter is of type Player in ProjectileLaunchEvent
- Use reflection the opposite way: if it is an old version (getShooter() returns LivingEntity), use reflection; otherwise, call the method directly
- Add missing instanceof Player check
2016-06-01 14:06:36 +02:00
ljacqu 0977558924 #736 Remove use of service getters and deprecate them 2016-05-31 11:14:03 +02:00
ljacqu 30b72bec4c #604 Fix HelpProvider tests 2016-05-30 23:49:59 +02:00
ljacqu 4db5062935 Merge branch 'playerjoin-listener-cleanup' of https://github.com/AuthMe-Team/AuthMeReloaded 2016-05-30 21:13:36 +02:00
ljacqu 18ff5d5331 Remove todo comment associated to #602 2016-05-30 20:02:07 +02:00
ljacqu f5b4071abf Merge branch 'master' of https://github.com/AuthMe-Team/AuthMeReloaded into playerjoin-listener-cleanup 2016-05-30 17:53:42 +02:00
ljacqu cc67624a46 Throwing snowball still possible when unlogged 2016-05-30 17:09:10 +02:00
ljacqu 9b1ee86b2f Trivial code householding
- Replace `if (!x) ... else ...` with `if(x) ... else ...`
- Avoid throwing RuntimeException; use children
2016-05-30 12:18:55 +02:00
ljacqu 4c51b33b22 Merge branch 'master' of https://github.com/AuthMe-Team/AuthMeReloaded into playerjoin-listener-cleanup 2016-05-30 07:52:40 +02:00
ljacqu 9349993faf Merge pull request #133 from Gnat008/612-add-PermissionsSystemType-method
Add isPermissionsSystem method to PermissionsSystemType enum - fixes …
2016-05-30 07:51:14 +02:00
ljacqu 64aacb12db Unit test verifications done on joining
- Write unit tests for checks done when a player joins
- Move join event handler methods back to PlayerListener; move join check logic to new separate class
2016-05-29 15:00:16 +02:00
ljacqu 39d8a88142 Structure checks done in PlayerJoinListener as individual methods 2016-05-29 11:45:12 +02:00
ljacqu 2c92a8b52f Move logic for join events in its own listener 2016-05-28 22:32:45 +02:00
ljacqu a854d4e0e0 Register entity listener again 2016-05-28 22:29:49 +02:00
ljacqu 25f5fdb45c Code householding (PlayerListener / Settings)
- Use field on PlayerListener for storing nickname pattern -> repeatedly parsing pattern is expensive
- Remove unused legacy setting fields
- ForceFlatToSqlite cannot be run from converter command -> remove Converter interface to create more natural method signatures
2016-05-28 22:04:55 +02:00
ljacqu eee06dad50 Dependency graph - allow to summarize dependencies by super type 2016-05-27 23:25:11 +02:00
ljacqu 107441746e Merge remote-tracking branch 'origin/master' 2016-05-27 23:05:40 +02:00
ljacqu cb10854612 Minor - fix failing build (cannot use method from Java 8) 2016-05-27 23:05:03 +02:00
ljacqu 87331d116c Revise converter architecture + add integration test for CrazyLogin converter 2016-05-27 23:00:44 +02:00
ljacqu 67511e3b45 Create task which draws AuthMe dependency graph 2016-05-25 19:24:12 +02:00
ljacqu 3643b88798 #712 Add changes to fr messages by Jeje2201 2016-05-25 17:37:15 +02:00
ljacqu 6341d00df0 Code householding - remove legacy settings and TODO messages
- Remove fields in legacy settings that are now unused
- Remove various irrelevant todo messages
- Reduce visibility on some elements
2016-05-24 18:59:01 +02:00
ljacqu e54cd526de Add verification remarks in message files
- Result from automatic task which checks message files for missing messages or tags
2016-05-24 18:37:58 +02:00
ljacqu 8de1897412 Minor - Use explicit dependencies in ProcessService
- Replace AuthMe in favor of PermissionsManager
- Create missing tests for ProcessService
2016-05-24 18:25:38 +02:00
ljacqu 30f62547d8 Merge branch 'master' of https://github.com/AuthMe-Team/AuthMeReloaded into 707-process-as-service 2016-05-23 21:41:41 +02:00
ljacqu 11350ec43a Iterate over all chat recipients 2016-05-22 10:52:34 +02:00
ljacqu 53043ddc0d Create tool task that checks Mock fields of test classes 2016-05-21 11:54:54 +02:00
ljacqu c1885a381b Merge branch 'master' of https://github.com/AuthMe-Team/AuthMeReloaded into 707-process-as-service
Conflicts:
	src/main/java/fr/xephi/authme/process/join/AsynchronousJoin.java
	src/main/java/fr/xephi/authme/process/login/AsynchronousLogin.java
2016-05-20 19:48:41 +02:00
ljacqu 3f039d641a #707 Convert sync processes into services 2016-05-20 19:42:30 +02:00
ljacqu 5adf819910 Minor - remove unused services from PurgeCommand
- Found by sgdc3 in 95b65ae20a
2016-05-20 18:03:22 +02:00
ljacqu 244e1a2b7d Injector - don't use instantiation fallback if PostConstruct method is present
- Do not instantiate classes with instantiation fallback if they have a PostConstruct method - thanks @sgdc3 for the hint
- Change Injector test to check exception messages also
2016-05-20 17:57:14 +02:00
ljacqu a355c325c5 #513 Allow to run updateDocs task from command line 2016-05-20 17:15:53 +02:00
ljacqu 4d634086cd #701 Alternate accounts are shown to all players with their own name 2016-05-19 22:02:15 +02:00
ljacqu 9a72fe53b0 Minor - code householding
- Update inaccurate javadoc
- Remove unnecessary require call in PHP integration sample
2016-05-19 21:55:42 +02:00
ljacqu f014485789 Service injector - implement stricter requirements for PostConstruct methods
- Implement similar restrictions as prescribed by the PostConstruct documentation:
   - Class may have at most one method annotated with PostConstruct
   - PostConstruct method must return void
- Javadoc: replace mentions of injector construction where any injection method was meant
2016-05-19 21:50:48 +02:00
ljacqu 383820cd22 #702 Implement SHA256 php registration
- Refactor Bcrypt and Sha256 examples to use common abstract parent class
- Implement hashing logic for Sha256
2016-05-19 21:44:43 +02:00
ljacqu 14002ee75c #704 Reload settings of ConsoleLogger on /authme reload 2016-05-19 19:46:02 +02:00
ljacqu 92a8a5dd41 #704 Remove reloading from hash algorithms
- A new instance is created for every hash operation, so reloading will never happen on those classes
2016-05-18 19:09:38 +02:00
ljacqu f5c89e897f #707 Convert async processes as services
(work in progress - rough, untested changes)
2016-05-17 19:49:06 +02:00
ljacqu 3ad76b8ec5 #712 fr messages - add untranslated messages and minor fixes 2016-05-16 17:50:26 +02:00
ljacquandgames647 9f5b995217 Fix datasource resource closing tests (#1) 2016-05-12 20:15:44 +02:00
ljacqu e04f7dc711 #704 Implement reloading via injector
- Create interfaces Reloadable and SettingsDependent to recognize reloadable classes
- Iterate through instances in injector to reload
2016-05-12 19:51:10 +02:00
ljacqu 223f56425b #699 Unit test that config.yml values correspond to property defaults
- Create unit test
- Correct offending values
2016-05-09 21:15:11 +02:00
ljacqu b728b297b8 #256 Add migration for moved properties 2016-05-08 22:30:53 +02:00
ljacqu f2e49dbf1e Minor - fix compilation of task tool class list
- Set is declared as ToolTask but all elements extend from AutoToolTask, so the Set type is resolved to a too specific type
2016-05-08 21:55:08 +02:00
ljacqu 23da023d53 #513 Mark tools runnable by command line with specific interface 2016-05-08 17:22:02 +02:00
ljacqu 662f28ab4f #513 Fix class loading issue when running from mvn exec:java 2016-05-08 17:01:06 +02:00
ljacqu 8e878d6a5a Remove BukkitService from CommandService, inject where needed instead 2016-05-08 13:50:20 +02:00
ljacqu 5e5836f167 #432 Injector improvements
- Separate FieldInjection from default fallback for no-Inject public no-args constructor classes
- Make CommandInitializer a normal, instantiable service
- Add various injections instead of fetching through command service
2016-05-08 11:15:56 +02:00
ljacqu 3fe2f0b6a8 Add missing test matcher
- Mock verifications need matchers on all parameters, or on none. Test fails otherwise
2016-05-04 18:40:06 +02:00
ljacqu 67aea654cc #432 Fix broken tool tasks 2016-05-03 20:44:01 +02:00
ljacqu 3645806edc Move tools folder into test folder
- Classes still won't be present in JAR but classes will be automatically compiled by Maven inside of the test scope, facilitating the execution of tool tasks
2016-05-03 20:27:12 +02:00
ljacqu 23317caa46 Merge pull request #125 from AuthMe-Team/432-dependency-injection
432 dependency injection
2016-05-03 18:54:35 +02:00