mirror of
https://github.com/ColdeZhang/Dominion.git
synced 2024-12-24 12:08:52 +08:00
实现了对权限列表的排序
This commit is contained in:
parent
6666fb6131
commit
a34cc43cbf
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>cn.lunadeer</groupId>
|
||||
<artifactId>Dominion</artifactId>
|
||||
<version>1.30.7-beta</version>
|
||||
<version>1.30.8-beta</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Dominion</name>
|
||||
|
@ -6,8 +6,10 @@ import cn.lunadeer.minecraftpluginutils.XLogger;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.Collator;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
public enum Flag {
|
||||
@ -125,6 +127,8 @@ public enum Flag {
|
||||
}
|
||||
flags.add(flag);
|
||||
}
|
||||
Comparator<Object> comparator = Collator.getInstance(java.util.Locale.CHINA);
|
||||
flags.sort((o1, o2) -> comparator.compare(o1.getDisplayName(), o2.getDisplayName()));
|
||||
return flags;
|
||||
}
|
||||
|
||||
@ -144,6 +148,8 @@ public enum Flag {
|
||||
}
|
||||
flags.add(flag);
|
||||
}
|
||||
Comparator<Object> comparator = Collator.getInstance(java.util.Locale.CHINA);
|
||||
flags.sort((o1, o2) -> comparator.compare(o1.getDisplayName(), o2.getDisplayName()));
|
||||
return flags;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user