1
mirror of https://github.com/CarmJos/MoeTeleport.git synced 2024-09-19 21:35:56 +00:00

判断时添加权限节点前缀

This commit is contained in:
Carm Jos 2021-12-17 11:08:17 +08:00
parent dcc692c7b7
commit c888846531

View File

@ -44,7 +44,9 @@ public class UserManager {
Map<String, Integer> permissions = PluginConfig.PERMISSIONS.get();
int value = PluginConfig.DEFAULT_HOME.get();
for (Map.Entry<String, Integer> entry : permissions.entrySet()) {
if (entry.getValue() > value && player.hasPermission(entry.getKey())) {
if (entry.getValue() > value && player.hasPermission(
Main.getInstance().getName() + "." + entry.getKey()
)) {
value = entry.getValue();
}
}