mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-08-26 07:22:56 +02:00
- Fix for an infinite loop bug with the new Bukkit Perms during a new
user creation.
This commit is contained in:
parent
e3756623a1
commit
2e1c880502
|
@ -7,4 +7,5 @@ v 1.1:
|
|||
- GroupManager will now attempt to select the default world when using commands instead of failing and telling you to use '/manselect <world>'.
|
||||
- Invalid groups assigned to players in users.yml will no longer cause a crash. GM will now set them to the default group instead.
|
||||
- Fix for Users.yml containing only 'users:' causing a crash.
|
||||
- GroupManager will now generate a fresh Users and Groups yml if either file is empty.
|
||||
- GroupManager will now generate a fresh Users and Groups yml if either file is empty.
|
||||
- Fix for an infinite loop bug with the new Bukkit Perms during a new user creation.
|
|
@ -104,7 +104,7 @@ public class User extends DataUnit implements Cloneable {
|
|||
public void setGroup(String group) {
|
||||
this.group = group;
|
||||
flagAsChanged();
|
||||
if (GroupManager.isLoaded)
|
||||
if ((GroupManager.isLoaded) && (GroupManager.BukkitPermissions.player_join = false))
|
||||
GroupManager.BukkitPermissions.updateAllPlayers();
|
||||
}
|
||||
|
||||
|
@ -118,7 +118,7 @@ public class User extends DataUnit implements Cloneable {
|
|||
group = getDataSource().getGroup(group.getName());
|
||||
this.group = group.getName();
|
||||
flagAsChanged();
|
||||
if (GroupManager.isLoaded)
|
||||
if ((GroupManager.isLoaded) && (GroupManager.BukkitPermissions.player_join = false))
|
||||
GroupManager.BukkitPermissions.updateAllPlayers();
|
||||
}
|
||||
|
||||
|
@ -133,7 +133,7 @@ public class User extends DataUnit implements Cloneable {
|
|||
removeSubGroup(subGroup);
|
||||
subGroups.add(subGroup.getName());
|
||||
flagAsChanged();
|
||||
if (GroupManager.isLoaded)
|
||||
if ((GroupManager.isLoaded) && (GroupManager.BukkitPermissions.player_join = false))
|
||||
GroupManager.BukkitPermissions.updateAllPlayers();
|
||||
}
|
||||
|
||||
|
@ -153,7 +153,7 @@ public class User extends DataUnit implements Cloneable {
|
|||
try {
|
||||
if (subGroups.remove(subGroup.getName())) {
|
||||
flagAsChanged();
|
||||
if (GroupManager.isLoaded)
|
||||
if ((GroupManager.isLoaded) && (GroupManager.BukkitPermissions.player_join = false))
|
||||
GroupManager.BukkitPermissions.updateAllPlayers();
|
||||
return true;
|
||||
}
|
||||
|
@ -197,7 +197,7 @@ public class User extends DataUnit implements Cloneable {
|
|||
variables.addVar(key, temp.getVarObject(key));
|
||||
}
|
||||
flagAsChanged();
|
||||
if (GroupManager.isLoaded)
|
||||
if ((GroupManager.isLoaded) && (GroupManager.BukkitPermissions.player_join = false))
|
||||
GroupManager.BukkitPermissions.updateAllPlayers();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,6 +56,7 @@ public class BukkitPermissions {
|
|||
protected Plugin plugin;
|
||||
protected boolean dumpAllPermissions = true;
|
||||
protected boolean dumpMatchedPermissions = true;
|
||||
public boolean player_join = false;
|
||||
|
||||
public BukkitPermissions(Plugin plugin) {
|
||||
this.plugin = plugin;
|
||||
|
@ -142,7 +143,14 @@ public class BukkitPermissions {
|
|||
|
||||
@Override
|
||||
public void onPlayerJoin(PlayerJoinEvent event) {
|
||||
updatePermissions(event.getPlayer());
|
||||
player_join = true;
|
||||
Player player = event.getPlayer();
|
||||
//force GM to create the player if they are not already listed.
|
||||
if (GroupManager.getWorldsHolder().getWorldData(player.getWorld().getName()).getUser(player.getName()) != null) {
|
||||
player_join = false;
|
||||
updatePermissions(event.getPlayer());
|
||||
} else
|
||||
player_join = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue
Block a user