Added permissions manager to main class, along with a setup and get method
This commit is contained in:
parent
f17f1fe5fb
commit
82e65250b8
@ -12,6 +12,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import fr.xephi.authme.listener.*;
|
import fr.xephi.authme.listener.*;
|
||||||
|
import fr.xephi.authme.permission.PermissionsManager;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
@ -76,6 +77,7 @@ public class AuthMe extends JavaPlugin {
|
|||||||
|
|
||||||
// TODO: Move this to a better place! -- timvisee
|
// TODO: Move this to a better place! -- timvisee
|
||||||
private CommandHandler commandHandler = null;
|
private CommandHandler commandHandler = null;
|
||||||
|
private PermissionsManager permsMan = null;
|
||||||
|
|
||||||
public Management management;
|
public Management management;
|
||||||
public NewAPI api;
|
public NewAPI api;
|
||||||
@ -140,6 +142,9 @@ public class AuthMe extends JavaPlugin {
|
|||||||
authmeLogger = Logger.getLogger("AuthMe");
|
authmeLogger = Logger.getLogger("AuthMe");
|
||||||
plugin = this;
|
plugin = this;
|
||||||
|
|
||||||
|
// Set up the permissions manager
|
||||||
|
setupPermissionsManager();
|
||||||
|
|
||||||
// Set up and initialize the command handler
|
// Set up and initialize the command handler
|
||||||
this.commandHandler = new CommandHandler(false);
|
this.commandHandler = new CommandHandler(false);
|
||||||
this.commandHandler.init();
|
this.commandHandler.init();
|
||||||
@ -449,6 +454,23 @@ public class AuthMe extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set up the permissions manager.
|
||||||
|
*/
|
||||||
|
public void setupPermissionsManager() {
|
||||||
|
this.permsMan = new PermissionsManager(Bukkit.getServer(), this, this.authmeLogger);
|
||||||
|
this.permsMan.setup();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the permissions manager instance.
|
||||||
|
*
|
||||||
|
* @return Permissions Manager instance.
|
||||||
|
*/
|
||||||
|
public PermissionsManager getPermissionsManager() {
|
||||||
|
return this.permsMan;
|
||||||
|
}
|
||||||
|
|
||||||
// Set the console filter to remove the passwords
|
// Set the console filter to remove the passwords
|
||||||
private void setLog4JFilter() {
|
private void setLog4JFilter() {
|
||||||
Bukkit.getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
|
Bukkit.getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user