diff options
author | Chris Ward <chris@chrisgward.com> | 2013-01-10 04:57:10 +1100 |
---|---|---|
committer | Chris Ward <chris@chrisgward.com> | 2013-01-10 04:57:10 +1100 |
commit | 79004c7098f96247f798d9f04d26cb0d9594d65d (patch) | |
tree | 427858cc3e03dc749d2c04dc745c695691a72815 /EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder | |
parent | 2988db08cabac2848c85dec26aa53dcb033b41fb (diff) | |
parent | f25693026905df423b8e92f9cb252a292c50fcab (diff) | |
download | Essentials-79004c7098f96247f798d9f04d26cb0d9594d65d.tar Essentials-79004c7098f96247f798d9f04d26cb0d9594d65d.tar.gz Essentials-79004c7098f96247f798d9f04d26cb0d9594d65d.tar.lz Essentials-79004c7098f96247f798d9f04d26cb0d9594d65d.tar.xz Essentials-79004c7098f96247f798d9f04d26cb0d9594d65d.zip |
Merge branch 'groupmanager' into 2.9
Diffstat (limited to 'EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder')
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java index 263ad0cce..04efd384e 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java @@ -28,7 +28,6 @@ import org.anjocaido.groupmanager.events.GMGroupEvent; import org.anjocaido.groupmanager.events.GMSystemEvent; import org.anjocaido.groupmanager.events.GMUserEvent; import org.anjocaido.groupmanager.events.GMUserEvent.Action; -import org.anjocaido.groupmanager.events.GroupManagerEventHandler; import org.anjocaido.groupmanager.permissions.AnjoPermissionsHandler; import org.bukkit.Server; import org.bukkit.plugin.Plugin; @@ -137,7 +136,7 @@ public class WorldDataHolder { getUsers().put(theUser.getName().toLowerCase(), theUser); setUsersChanged(true); if (GroupManager.isLoaded()) - GroupManagerEventHandler.callEvent(theUser, Action.USER_ADDED); + GroupManager.getGMEventHandler().callEvent(theUser, Action.USER_ADDED); } /** @@ -152,7 +151,7 @@ public class WorldDataHolder { getUsers().remove(userName.toLowerCase()); setUsersChanged(true); if (GroupManager.isLoaded()) - GroupManagerEventHandler.callEvent(userName, GMUserEvent.Action.USER_REMOVED); + GroupManager.getGMEventHandler().callEvent(userName, GMUserEvent.Action.USER_REMOVED); return true; } return false; @@ -181,7 +180,7 @@ public class WorldDataHolder { groups.setDefaultGroup(getGroup(group.getName())); setGroupsChanged(true); if (GroupManager.isLoaded()) - GroupManagerEventHandler.callEvent(GMSystemEvent.Action.DEFAULT_GROUP_CHANGED); + GroupManager.getGMEventHandler().callEvent(GMSystemEvent.Action.DEFAULT_GROUP_CHANGED); } /** @@ -232,7 +231,7 @@ public class WorldDataHolder { if (groupToAdd.getName().toLowerCase().startsWith("g:")) { GroupManager.getGlobalGroups().addGroup(groupToAdd); - GroupManagerEventHandler.callEvent(groupToAdd, GMGroupEvent.Action.GROUP_ADDED); + GroupManager.getGMEventHandler().callEvent(groupToAdd, GMGroupEvent.Action.GROUP_ADDED); return; } @@ -243,7 +242,7 @@ public class WorldDataHolder { getGroups().put(groupToAdd.getName().toLowerCase(), groupToAdd); setGroupsChanged(true); if (GroupManager.isLoaded()) - GroupManagerEventHandler.callEvent(groupToAdd, GMGroupEvent.Action.GROUP_ADDED); + GroupManager.getGMEventHandler().callEvent(groupToAdd, GMGroupEvent.Action.GROUP_ADDED); } /** @@ -266,7 +265,7 @@ public class WorldDataHolder { getGroups().remove(groupName.toLowerCase()); setGroupsChanged(true); if (GroupManager.isLoaded()) - GroupManagerEventHandler.callEvent(groupName.toLowerCase(), GMGroupEvent.Action.GROUP_REMOVED); + GroupManager.getGMEventHandler().callEvent(groupName.toLowerCase(), GMGroupEvent.Action.GROUP_REMOVED); return true; } return false; @@ -374,7 +373,7 @@ public class WorldDataHolder { Logger.getLogger(WorldDataHolder.class.getName()).log(Level.WARNING, null, ex); } GroupManager.setLoaded(true); - GroupManagerEventHandler.callEvent(GMSystemEvent.Action.RELOADED); + GroupManager.getGMEventHandler().callEvent(GMSystemEvent.Action.RELOADED); } /** @@ -406,7 +405,7 @@ public class WorldDataHolder { Logger.getLogger(WorldDataHolder.class.getName()).log(Level.WARNING, null, ex); } GroupManager.setLoaded(true); - GroupManagerEventHandler.callEvent(GMSystemEvent.Action.RELOADED); + GroupManager.getGMEventHandler().callEvent(GMSystemEvent.Action.RELOADED); } public void loadGroups(File groupsFile) { @@ -1002,7 +1001,7 @@ public class WorldDataHolder { ph.removeGroupsChangedFlag(); if (GroupManager.isLoaded()) - GroupManagerEventHandler.callEvent(GMSystemEvent.Action.SAVED); + GroupManager.getGMEventHandler().callEvent(GMSystemEvent.Action.SAVED); /* * FileWriter tx = null; try { tx = new FileWriter(groupsFile, false); @@ -1081,7 +1080,7 @@ public class WorldDataHolder { ph.removeUsersChangedFlag(); if (GroupManager.isLoaded()) - GroupManagerEventHandler.callEvent(GMSystemEvent.Action.SAVED); + GroupManager.getGMEventHandler().callEvent(GMSystemEvent.Action.SAVED); /* * FileWriter tx = null; try { tx = new FileWriter(usersFile, false); |