summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager
diff options
context:
space:
mode:
authorElgarL <ElgarL@palmergames.com>2011-11-24 16:34:05 +0000
committerElgarL <ElgarL@palmergames.com>2011-11-24 16:34:05 +0000
commiteea381e7143aac4b2a0dd63878bce769078e3bed (patch)
tree8736c7999e3bd337b756c9759117cd434a6c69bb /EssentialsGroupManager
parent5a9b573309fc36073660220c48fdfa172734e9c4 (diff)
downloadEssentials-eea381e7143aac4b2a0dd63878bce769078e3bed.tar
Essentials-eea381e7143aac4b2a0dd63878bce769078e3bed.tar.gz
Essentials-eea381e7143aac4b2a0dd63878bce769078e3bed.tar.lz
Essentials-eea381e7143aac4b2a0dd63878bce769078e3bed.tar.xz
Essentials-eea381e7143aac4b2a0dd63878bce769078e3bed.zip
optimize getPermissionList
Diffstat (limited to 'EssentialsGroupManager')
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/data/DataUnit.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/DataUnit.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/DataUnit.java
index 25546a0ea..a35b5aeee 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/DataUnit.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/DataUnit.java
@@ -6,6 +6,8 @@ package org.anjocaido.groupmanager.data;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.List;
+
import org.anjocaido.groupmanager.GroupManager;
import org.anjocaido.groupmanager.dataholder.WorldDataHolder;
import org.anjocaido.groupmanager.utils.StringPermissionComparator;
@@ -133,8 +135,8 @@ public abstract class DataUnit {
* You can't edit the permissions using the returned ArrayList instance
* @return a copy of the permission list
*/
- public ArrayList<String> getPermissionList() {
- return new ArrayList<String>(permissions);
+ public List<String> getPermissionList() {
+ return Collections.unmodifiableList(permissions);
}
public boolean isSorted() {