mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-03 01:19:58 +01:00
Fixed an infinite loop error when using '/manudel' on a logged in
player. It caused setDefaultGroup to trigger a bukkit update when no GM User existed yet.
This commit is contained in:
parent
3708f2b3bb
commit
746eb353a2
@ -121,4 +121,5 @@ v 1.9:
|
|||||||
- Fix trying to modify an unmodifiable collection breaking superperms.
|
- Fix trying to modify an unmodifiable collection breaking superperms.
|
||||||
- Fixed subgroups (I broke earlier).
|
- Fixed subgroups (I broke earlier).
|
||||||
- Check for a null player object in the PlayerTeleportEvent.
|
- Check for a null player object in the PlayerTeleportEvent.
|
||||||
- Trap errors in fetching the mirrors map.
|
- Trap errors in fetching the mirrors map.
|
||||||
|
- Fixed an infinite loop error when using '/manudel' on a logged in player. It caused setDefaultGroup to trigger a bukkit update when no GM User existed yet.
|
@ -122,6 +122,15 @@ public class User extends DataUnit implements Cloneable {
|
|||||||
* the group to set
|
* the group to set
|
||||||
*/
|
*/
|
||||||
public void setGroup(Group group) {
|
public void setGroup(Group group) {
|
||||||
|
setGroup(group, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param group the group to set
|
||||||
|
* @param updatePerms if we are to trigger a superperms update.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setGroup(Group group, Boolean updatePerms) {
|
||||||
if (!this.getDataSource().groupExists(group.getName())) {
|
if (!this.getDataSource().groupExists(group.getName())) {
|
||||||
getDataSource().addGroup(group);
|
getDataSource().addGroup(group);
|
||||||
}
|
}
|
||||||
@ -129,7 +138,7 @@ public class User extends DataUnit implements Cloneable {
|
|||||||
String oldGroup = this.group;
|
String oldGroup = this.group;
|
||||||
this.group = group.getName();
|
this.group = group.getName();
|
||||||
flagAsChanged();
|
flagAsChanged();
|
||||||
if (GroupManager.isLoaded()) {
|
if (GroupManager.isLoaded() && (updatePerms)) {
|
||||||
if (!GroupManager.BukkitPermissions.isPlayer_join())
|
if (!GroupManager.BukkitPermissions.isPlayer_join())
|
||||||
GroupManager.BukkitPermissions.updatePlayer(getBukkitPlayer());
|
GroupManager.BukkitPermissions.updatePlayer(getBukkitPlayer());
|
||||||
|
|
||||||
|
@ -245,7 +245,7 @@ public class WorldDataHolder {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
User newUser = new User(this, userName);
|
User newUser = new User(this, userName);
|
||||||
newUser.setGroup(groups.getDefaultGroup());
|
newUser.setGroup(groups.getDefaultGroup(), false);
|
||||||
addUser(newUser);
|
addUser(newUser);
|
||||||
setUsersChanged(true);
|
setUsersChanged(true);
|
||||||
return newUser;
|
return newUser;
|
||||||
|
Loading…
Reference in New Issue
Block a user