mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-08-21 02:42:01 +00:00
Code tidy
This commit is contained in:
parent
08bff3ea5f
commit
2f74510cce
|
@ -50,7 +50,6 @@ import org.bukkit.plugin.java.JavaPlugin;
|
||||||
*/
|
*/
|
||||||
public class GroupManager extends JavaPlugin {
|
public class GroupManager extends JavaPlugin {
|
||||||
|
|
||||||
// private File configFile;
|
|
||||||
private File backupFolder;
|
private File backupFolder;
|
||||||
private Runnable commiter;
|
private Runnable commiter;
|
||||||
private ScheduledThreadPoolExecutor scheduler;
|
private ScheduledThreadPoolExecutor scheduler;
|
||||||
|
@ -88,15 +87,15 @@ public class GroupManager extends JavaPlugin {
|
||||||
public static final Logger logger = Logger.getLogger(GroupManager.class.getName());
|
public static final Logger logger = Logger.getLogger(GroupManager.class.getName());
|
||||||
|
|
||||||
// PERMISSIONS FOR COMMAND BEING LOADED
|
// PERMISSIONS FOR COMMAND BEING LOADED
|
||||||
OverloadedWorldHolder dataHolder = null;
|
private OverloadedWorldHolder dataHolder = null;
|
||||||
AnjoPermissionsHandler permissionHandler = null;
|
private AnjoPermissionsHandler permissionHandler = null;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDisable() {
|
public void onDisable() {
|
||||||
|
|
||||||
setLoaded(false);
|
setLoaded(false);
|
||||||
|
|
||||||
// Un-register this service.
|
// Unregister this service.
|
||||||
this.getServer().getServicesManager().unregister(this.worldsHolder);
|
this.getServer().getServicesManager().unregister(this.worldsHolder);
|
||||||
|
|
||||||
disableScheduler(); // Shutdown before we save, so it doesn't interfere.
|
disableScheduler(); // Shutdown before we save, so it doesn't interfere.
|
||||||
|
@ -123,7 +122,7 @@ public class GroupManager extends JavaPlugin {
|
||||||
GroupManager.logger.removeHandler(ch);
|
GroupManager.logger.removeHandler(ch);
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -159,9 +158,8 @@ public class GroupManager extends JavaPlugin {
|
||||||
enableScheduler();
|
enableScheduler();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Schedule a Bukiit Permissions update for 1 tick later. All
|
* Schedule a Bukkit Permissions update for 1 tick later.
|
||||||
* plugins
|
* All plugins will be loaded by then
|
||||||
* will be loaded by then
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (getServer().getScheduler().scheduleSyncDelayedTask(this, new BukkitPermsUpdateTask(), 1) == -1) {
|
if (getServer().getScheduler().scheduleSyncDelayedTask(this, new BukkitPermsUpdateTask(), 1) == -1) {
|
||||||
|
@ -243,7 +241,6 @@ public class GroupManager extends JavaPlugin {
|
||||||
|
|
||||||
private void prepareFileFields() {
|
private void prepareFileFields() {
|
||||||
|
|
||||||
// configFile = new File(this.getDataFolder(), "config.yml");
|
|
||||||
backupFolder = new File(this.getDataFolder(), "backup");
|
backupFolder = new File(this.getDataFolder(), "backup");
|
||||||
if (!backupFolder.exists()) {
|
if (!backupFolder.exists()) {
|
||||||
getBackupFolder().mkdirs();
|
getBackupFolder().mkdirs();
|
||||||
|
@ -364,7 +361,6 @@ public class GroupManager extends JavaPlugin {
|
||||||
* @param cmd
|
* @param cmd
|
||||||
* @param args
|
* @param args
|
||||||
*/
|
*/
|
||||||
//@SuppressWarnings({ "deprecation" })
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
|
public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue