Commit Graph

1286 Commits

Author SHA1 Message Date
Tim Visée
aa6d24862d Reverted extreme project code style, using default now 2015-11-23 21:25:57 +01:00
Tim Visée
6519f1d865 Set up an extreme code style test 2015-11-23 21:13:15 +01:00
ljacqu
8719cce334 Create enum for message keys in Messages 2015-11-23 21:13:12 +01:00
Tim Visée
b0cc6826b4 Include the project's code style, fixed invalid .idea directory being ignored 2015-11-23 21:06:36 +01:00
Tim Visée
a9900336ae Don't ignore the .gitignore file itself 2015-11-23 21:06:35 +01:00
Tim Visée
87566cb8ea Updated .gitignore to include project's code style settings file 2015-11-23 21:06:35 +01:00
Gabriele C
10435657c5 Fix enableBackup option 2015-11-23 20:59:25 +01:00
Gabriele C
614aa9d5e5 Fix noTeleport in the PlayerListener 2015-11-23 20:59:13 +01:00
Tim Visée
cf475932fe Added basic .editorconfig configuration 2015-11-23 20:43:25 +01:00
AuthMe-Team
9ec2d6d059 Stuff from the common floobits workspace
Author:    AuthMe-Team <AuthMeTeam@123NoEmail.com>
2015-11-23 20:23:52 +01:00
Gabriele C
69a09aec17 cleanup 2015-11-22 21:06:08 +01:00
Tim Visée
da662afcf4 Created method to get an exception stack trace as a string 2015-11-22 21:01:31 +01:00
ljacqu
215fedc585 Minor refactoring in CustomConfiguration / Messages
- CustomConfiguration should be abstract
- Reduce visibility of internal method
- Fix typo in English messages
- Remove or replace unnecessary javadoc
2015-11-22 02:02:49 +01:00
ljacqu
e456203fc6 Refactor Utils#getOnlinePlayers and add background info 2015-11-22 01:30:07 +01:00
ljacqu
fc3f685de0 Create UtilsTest
Had to create a getGameServer() method in AuthMe in order to be able to catch this call in tests and replace it with a mock implementation of the actual server. The supertype method getServer() is declared as final, which makes it impossible to mock with Mockito.

While there are frameworks that manipulate the bytecode to mock final calls, it is much easier and less risky to simply delegate the server retrieval through another method.
2015-11-21 23:09:04 +01:00
ljacqu
cd728b569e Create test for CommandManager; fix javadoc in CommandDescription 2015-11-21 22:32:16 +01:00
Tim Visée
1ba18439e9 Fixed invalid method arguments 2015-11-21 21:08:07 +01:00
Tim Visée
ada991904b Improved purgePermissions method 2015-11-21 21:07:32 +01:00
Tim Visée
e45aa88504 Fixed result not being returned 2015-11-21 21:03:50 +01:00
Tim Visée
18af8f3171 Fixed addLimboPlayer method 2015-11-21 21:02:53 +01:00
Tim Visée
0a5c081732 Added method to permissions manager to get primary group of player 2015-11-21 20:59:23 +01:00
Tim Visée
89b5444d69 Fixed addNormal method, updated it's JavaDocs 2015-11-21 20:50:12 +01:00
Tim Visée
7902cd87bb Added return statement for setGroup method, updated it's JavaDocs 2015-11-21 20:47:56 +01:00
Gabriele C
579c51f4a2 Remove the old Vault group management system. (THIS COMMIT BREAKS THE COMPILATION) 2015-11-21 20:16:07 +01:00
ljacqu
efb57989ed Start tests for email commands
- Removed randomStringGenerator from Management as it is unused
2015-11-21 19:51:49 +01:00
ljacqu
2922d04aa0 Merge branch 'unit-tests' of https://github.com/ljacqu/AuthMeReloaded into unit-tests 2015-11-21 19:39:26 +01:00
ljacqu
f06f7d8c77 Merge remote-tracking branch 'origin/unit-tests' into unit-tests
Conflicts:
	src/main/java/fr/xephi/authme/command/executable/changepassword/ChangePasswordCommand.java
	src/test/java/fr/xephi/authme/AuthMeMockUtil.java
2015-11-21 19:36:48 +01:00
Tim Visée
579b7e7b97 Improved some grammar and variable names 2015-11-21 19:24:25 +01:00
Tim Visée
a176aba350 Fixed horrible typo, implemented dynamic plugin name 2015-11-21 19:22:23 +01:00
Tim Visée
30b4cfe44e Added notice to legacy permissions instance in main class 2015-11-21 19:18:56 +01:00
ljacqu
b3d0a71dec Merge ListUtil into StringUtil; refactor HelpSyntaxHelper + create test
The HelpSyntaxHelper had suppressed warnings for string concatenation within StringBuilder - the point of the StringBuilder is that it is faster when you use it to concatenate many elements. If you still use string concatenation with + within these calls it beats the purpose.
2015-11-21 17:19:11 +01:00
ljacqu
a3f24bcb9a Create test for HelpSyntaxHelperTest 2015-11-21 17:18:58 +01:00
ljacqu
58dc15123c Add tests for LogoutCommand and RegisterCommand. Add more generic mockUtil 2015-11-21 17:18:45 +01:00
ljacqu
4e8614fdf7 Add test for LoginCommand; create AuthMe mock test util
Had to create a getter for the Management instance in the AuthMe class for mocking, but fields should generally not be accessed globally. Hopefully soon we will be able to make the field private.
2015-11-21 17:18:28 +01:00
ljacqu
d81ef3168e Command refactor - remove unused fields, reduce variable "scope"
Minor refactorings in the command section for familiarization.

1. Removed suppressWarning("Deprecated") - the method is deprecated for a reason and we should be made aware of that.
2. Removed same javadoc on ExecutableCommand implementation that just had the same as the interface (this is just clutter; @Override signals that it's an implementing class and a developer can view the superclass javadoc)
3. In places where the AuthMe instance was retrieved at the top but used at the very bottom, moved it to the bottom to reduce its "scope"
2015-11-21 17:18:14 +01:00
Tim Visée
8387924c64 Merge pull request #68 from ljacqu/master
Revert certain JavaDoc changes
2015-11-21 16:57:17 +01:00
Tim Visée
8181bda762 Minor update to hasGroupSupport method in permissions manager 2015-11-21 16:26:05 +01:00
Tim Visée
bb22daab33 Added some missing support for Nijikokun's Permissions in permissions manager 2015-11-21 16:21:38 +01:00
Tim Visée
6dc4066563 Added group support check to setGroups method in Utils class 2015-11-21 16:08:41 +01:00
Tim Visée
eaba2765fa Created hasGroupSupport method in permissions manager 2015-11-21 16:07:02 +01:00
Tim Visée
69d6518b30 Improved setGroup method in Utils class, to replace legacy permissions code 2015-11-21 16:03:00 +01:00
Tim Visée
973c683c90 Minor fix for PermissionsBukkit support in permissions manager 2015-11-21 15:47:59 +01:00
Tim Visée
cfaece3eae Simplefied some code 2015-11-21 15:46:10 +01:00
Tim Visée
f8cf9e2e48 Created inGroup method in permissions manager 2015-11-21 15:44:57 +01:00
Tim Visée
a05a97a0a6 Fixed setGroup method in permissions manager 2015-11-21 15:38:20 +01:00
Tim Visée
1091db0e15 Created removeAllGroups method in permissions manager 2015-11-21 15:34:38 +01:00
Tim Visée
f7f455a56a Created setGroups method in permissions manager 2015-11-21 15:24:53 +01:00
Tim Visée
a84e219899 Fixed minor Essentials Group Manager issue in addGroup method of permissions manager 2015-11-21 15:18:01 +01:00
Tim Visée
462a2e9878 Created removeGroups method in permissions manager 2015-11-21 15:16:19 +01:00
Tim Visée
bcf4eeab00 Created removeGroup method in permissions manager 2015-11-21 15:15:04 +01:00