#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)
This commit is contained in:
ljacqu
2016-06-12 21:59:26 +02:00
parent 67c72dc46d
commit 89bbfc48ee
16 changed files with 508 additions and 243 deletions
@@ -2,6 +2,7 @@ package fr.xephi.authme.process;
import fr.xephi.authme.output.MessageKey;
import fr.xephi.authme.output.Messages;
import fr.xephi.authme.permission.AuthGroupHandler;
import fr.xephi.authme.permission.AuthGroupType;
import fr.xephi.authme.permission.PermissionNode;
import fr.xephi.authme.permission.PermissionsManager;
@@ -30,6 +31,9 @@ public class ProcessService {
@Inject
private PermissionsManager permissionsManager;
@Inject
private AuthGroupHandler authGroupHandler;
/**
* Retrieve a property's value.
*
@@ -104,7 +108,7 @@ public class ProcessService {
}
public boolean setGroup(Player player, AuthGroupType group) {
return permissionsManager.setGroup(player, group);
return authGroupHandler.setGroup(player, group);
}
}