mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-23 00:21:26 +01:00
optimize getPermissionList
This commit is contained in:
parent
5a9b573309
commit
eea381e714
@ -6,6 +6,8 @@ package org.anjocaido.groupmanager.data;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.anjocaido.groupmanager.GroupManager;
|
import org.anjocaido.groupmanager.GroupManager;
|
||||||
import org.anjocaido.groupmanager.dataholder.WorldDataHolder;
|
import org.anjocaido.groupmanager.dataholder.WorldDataHolder;
|
||||||
import org.anjocaido.groupmanager.utils.StringPermissionComparator;
|
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
|
* You can't edit the permissions using the returned ArrayList instance
|
||||||
* @return a copy of the permission list
|
* @return a copy of the permission list
|
||||||
*/
|
*/
|
||||||
public ArrayList<String> getPermissionList() {
|
public List<String> getPermissionList() {
|
||||||
return new ArrayList<String>(permissions);
|
return Collections.unmodifiableList(permissions);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isSorted() {
|
public boolean isSorted() {
|
||||||
|
Loading…
Reference in New Issue
Block a user