diff options
author | ElgarL <ElgarL@palmergames.com> | 2011-11-04 17:51:29 +0000 |
---|---|---|
committer | ElgarL <ElgarL@palmergames.com> | 2011-11-04 17:51:29 +0000 |
commit | 4ac5551c6bc97794389026259614303d7d8da662 (patch) | |
tree | e00af27ae5f0146f5436be5399389684ae97c973 /EssentialsGroupManager/src | |
parent | 52c2110a2b7e8be079588e5abe2bd7b1a89546ef (diff) | |
download | Essentials-4ac5551c6bc97794389026259614303d7d8da662.tar Essentials-4ac5551c6bc97794389026259614303d7d8da662.tar.gz Essentials-4ac5551c6bc97794389026259614303d7d8da662.tar.lz Essentials-4ac5551c6bc97794389026259614303d7d8da662.tar.xz Essentials-4ac5551c6bc97794389026259614303d7d8da662.zip |
Notification of being moved to the default group only happens if it's a
demotion/promotion (not on join).
Diffstat (limited to 'EssentialsGroupManager/src')
-rw-r--r-- | EssentialsGroupManager/src/Changelog.txt | 3 | ||||
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/data/User.java | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt index 5262c7018..d71bc135a 100644 --- a/EssentialsGroupManager/src/Changelog.txt +++ b/EssentialsGroupManager/src/Changelog.txt @@ -69,4 +69,5 @@ v 1.5: If the files have been altered (on disc) it will reload, so long as the in-memory data hasn't changed.
If the files on Disc have changed AND there have been changes to it's in-memory data it will show a warning.
You then MUST issue a '/mansave force' to overwrite the disc files, or a '/manload' to overwrite the memory data.
- - Fix for an error in checkFullUserPermission caused by players disconnecting mid perms update.
\ No newline at end of file + - Fix for an error in checkFullUserPermission caused by players disconnecting mid perms update.
+ - Notification of being moved to the default group only happens if it's a demotion/promotion (not on join).
\ No newline at end of file diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/User.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/User.java index bcfa8e01b..85b69f101 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/User.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/User.java @@ -117,13 +117,18 @@ public class User extends DataUnit implements Cloneable { getDataSource().addGroup(group); } group = getDataSource().getGroup(group.getName()); + // Do we notify of the group change? + String defaultGroupName = getDataSource().getDefaultGroup().getName(); + // if we are not in the default group + // or we are in the default group and the move is to a different group. + boolean notify = (this.group != defaultGroupName) || ((this.group == defaultGroupName) && (group.getName() != defaultGroupName)) ; this.group = group.getName(); flagAsChanged(); if (GroupManager.isLoaded()) { if (GroupManager.BukkitPermissions.player_join = false) GroupManager.BukkitPermissions.updateAllPlayers(); - GroupManager.notify(this.getName(), String.format(" moved to the group %s.", group.getName())); + if (notify) GroupManager.notify(this.getName(), String.format(" moved to the group %s.", group.getName())); } } |