mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-08-21 02:42:01 +00:00
Fixed silly error with isLoaded()
This commit is contained in:
parent
2db256678e
commit
62e1710607
|
@ -51,7 +51,7 @@ public class GroupManager extends JavaPlugin {
|
||||||
private WorldsHolder worldsHolder;
|
private WorldsHolder worldsHolder;
|
||||||
private boolean validateOnlinePlayer = true;
|
private boolean validateOnlinePlayer = true;
|
||||||
private boolean isReady = false;
|
private boolean isReady = false;
|
||||||
public static boolean isLoaded = false;
|
private static boolean isLoaded = false;
|
||||||
private GMConfiguration config;
|
private GMConfiguration config;
|
||||||
private GMLoggerHandler ch;
|
private GMLoggerHandler ch;
|
||||||
public static BukkitPermissions BukkitPermissions;
|
public static BukkitPermissions BukkitPermissions;
|
||||||
|
@ -103,10 +103,10 @@ public class GroupManager extends JavaPlugin {
|
||||||
* All plugins will be loaded by then
|
* All plugins will be loaded by then
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (getServer().getScheduler().scheduleSyncDelayedTask(this, new BukkitPermsUpdateTask(),1) == -1)
|
if (getServer().getScheduler().scheduleSyncDelayedTask(this, new BukkitPermsUpdateTask(),1) == -1) {
|
||||||
GroupManager.logger.severe("Could not schedule superperms Update.");
|
GroupManager.logger.severe("Could not schedule superperms Update.");
|
||||||
else
|
|
||||||
setLoaded(true);
|
setLoaded(true);
|
||||||
|
}
|
||||||
|
|
||||||
//setLoaded(true);
|
//setLoaded(true);
|
||||||
System.out.println(pdfFile.getName() + " version " + pdfFile.getVersion() + " is enabled!");
|
System.out.println(pdfFile.getName() + " version " + pdfFile.getVersion() + " is enabled!");
|
||||||
|
|
|
@ -90,7 +90,7 @@ public class Group extends DataUnit implements Cloneable {
|
||||||
inherits.add(inherit.getName().toLowerCase());
|
inherits.add(inherit.getName().toLowerCase());
|
||||||
}
|
}
|
||||||
flagAsChanged();
|
flagAsChanged();
|
||||||
if (GroupManager.isLoaded)
|
if (GroupManager.isLoaded())
|
||||||
GroupManager.BukkitPermissions.updateAllPlayers();
|
GroupManager.BukkitPermissions.updateAllPlayers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ public class Group extends DataUnit implements Cloneable {
|
||||||
variables.addVar(key, temp.getVarObject(key));
|
variables.addVar(key, temp.getVarObject(key));
|
||||||
}
|
}
|
||||||
flagAsChanged();
|
flagAsChanged();
|
||||||
if (GroupManager.isLoaded)
|
if (GroupManager.isLoaded())
|
||||||
GroupManager.BukkitPermissions.updateAllPlayers();
|
GroupManager.BukkitPermissions.updateAllPlayers();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,8 +104,9 @@ public class User extends DataUnit implements Cloneable {
|
||||||
public void setGroup(String group) {
|
public void setGroup(String group) {
|
||||||
this.group = group;
|
this.group = group;
|
||||||
flagAsChanged();
|
flagAsChanged();
|
||||||
if ((GroupManager.isLoaded) && (GroupManager.BukkitPermissions.player_join = false))
|
if (GroupManager.isLoaded())
|
||||||
GroupManager.BukkitPermissions.updateAllPlayers();
|
if(GroupManager.BukkitPermissions.player_join = false)
|
||||||
|
GroupManager.BukkitPermissions.updateAllPlayers();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -118,8 +119,9 @@ public class User extends DataUnit implements Cloneable {
|
||||||
group = getDataSource().getGroup(group.getName());
|
group = getDataSource().getGroup(group.getName());
|
||||||
this.group = group.getName();
|
this.group = group.getName();
|
||||||
flagAsChanged();
|
flagAsChanged();
|
||||||
if ((GroupManager.isLoaded) && (GroupManager.BukkitPermissions.player_join = false))
|
if (GroupManager.isLoaded())
|
||||||
GroupManager.BukkitPermissions.updateAllPlayers();
|
if (GroupManager.BukkitPermissions.player_join = false)
|
||||||
|
GroupManager.BukkitPermissions.updateAllPlayers();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addSubGroup(Group subGroup) {
|
public void addSubGroup(Group subGroup) {
|
||||||
|
@ -133,7 +135,8 @@ public class User extends DataUnit implements Cloneable {
|
||||||
removeSubGroup(subGroup);
|
removeSubGroup(subGroup);
|
||||||
subGroups.add(subGroup.getName());
|
subGroups.add(subGroup.getName());
|
||||||
flagAsChanged();
|
flagAsChanged();
|
||||||
if ((GroupManager.isLoaded) && (GroupManager.BukkitPermissions.player_join = false))
|
if (GroupManager.isLoaded())
|
||||||
|
if (GroupManager.BukkitPermissions.player_join = false)
|
||||||
GroupManager.BukkitPermissions.updateAllPlayers();
|
GroupManager.BukkitPermissions.updateAllPlayers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,8 +156,9 @@ public class User extends DataUnit implements Cloneable {
|
||||||
try {
|
try {
|
||||||
if (subGroups.remove(subGroup.getName())) {
|
if (subGroups.remove(subGroup.getName())) {
|
||||||
flagAsChanged();
|
flagAsChanged();
|
||||||
if ((GroupManager.isLoaded) && (GroupManager.BukkitPermissions.player_join = false))
|
if (GroupManager.isLoaded())
|
||||||
GroupManager.BukkitPermissions.updateAllPlayers();
|
if (GroupManager.BukkitPermissions.player_join = false)
|
||||||
|
GroupManager.BukkitPermissions.updateAllPlayers();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -197,7 +201,8 @@ public class User extends DataUnit implements Cloneable {
|
||||||
variables.addVar(key, temp.getVarObject(key));
|
variables.addVar(key, temp.getVarObject(key));
|
||||||
}
|
}
|
||||||
flagAsChanged();
|
flagAsChanged();
|
||||||
if ((GroupManager.isLoaded) && (GroupManager.BukkitPermissions.player_join = false))
|
if (GroupManager.isLoaded())
|
||||||
GroupManager.BukkitPermissions.updateAllPlayers();
|
if (GroupManager.BukkitPermissions.player_join = false)
|
||||||
|
GroupManager.BukkitPermissions.updateAllPlayers();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
|
|
||||||
package org.anjocaido.groupmanager.permissions;
|
package org.anjocaido.groupmanager.permissions;
|
||||||
|
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
import java.io.StringWriter;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
@ -255,7 +257,7 @@ public class BukkitPermissions {
|
||||||
public void onPluginEnable(PluginEnableEvent event) {
|
public void onPluginEnable(PluginEnableEvent event) {
|
||||||
if (!GroupManager.isLoaded())
|
if (!GroupManager.isLoaded())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
collectPermissions();
|
collectPermissions();
|
||||||
updateAllPlayers();
|
updateAllPlayers();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue