mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2025-01-14 20:31:48 +01:00
Fix encapsulation & make group inheritance work properly
This commit is contained in:
parent
dc1e06ebce
commit
17883f21d6
@ -16,20 +16,14 @@ import net.md_5.bungee.api.plugin.Plugin;
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
@Getter
|
||||||
public class LPBungeePlugin extends Plugin implements LuckPermsPlugin {
|
public class LPBungeePlugin extends Plugin implements LuckPermsPlugin {
|
||||||
public static final String VERSION = "v1.0";
|
public static final String VERSION = "v1.0";
|
||||||
|
|
||||||
@Getter
|
private LPConfiguration configuration;
|
||||||
LPConfiguration configuration;
|
private UserManager userManager;
|
||||||
|
private GroupManager groupManager;
|
||||||
@Getter
|
private Datastore datastore;
|
||||||
UserManager userManager;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
GroupManager groupManager;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
Datastore datastore;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
@ -58,17 +52,6 @@ public class LPBungeePlugin extends Plugin implements LuckPermsPlugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public UserManager getUserManager() {
|
|
||||||
return userManager;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public GroupManager getGroupManager() {
|
|
||||||
return groupManager;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getVersion() {
|
public String getVersion() {
|
||||||
return VERSION;
|
return VERSION;
|
||||||
@ -85,16 +68,6 @@ public class LPBungeePlugin extends Plugin implements LuckPermsPlugin {
|
|||||||
return getProxy().getOnlineCount();
|
return getProxy().getOnlineCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public LPConfiguration getConfiguration() {
|
|
||||||
return configuration;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Datastore getDatastore() {
|
|
||||||
return datastore;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void runUpdateTask() {
|
public void runUpdateTask() {
|
||||||
new UpdateTask(this).run();
|
new UpdateTask(this).run();
|
||||||
|
@ -2,7 +2,6 @@ package me.lucko.luckperms.utils;
|
|||||||
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.NonNull;
|
|
||||||
import me.lucko.luckperms.LuckPermsPlugin;
|
import me.lucko.luckperms.LuckPermsPlugin;
|
||||||
import me.lucko.luckperms.exceptions.ObjectAlreadyHasException;
|
import me.lucko.luckperms.exceptions.ObjectAlreadyHasException;
|
||||||
import me.lucko.luckperms.exceptions.ObjectLacksPermissionException;
|
import me.lucko.luckperms.exceptions.ObjectLacksPermissionException;
|
||||||
@ -36,7 +35,6 @@ public abstract class PermissionObject {
|
|||||||
* If false, only permissions specific to the server are applied
|
* If false, only permissions specific to the server are applied
|
||||||
*/
|
*/
|
||||||
@Setter
|
@Setter
|
||||||
|
|
||||||
private boolean includeGlobalPermissions;
|
private boolean includeGlobalPermissions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -158,8 +156,10 @@ public abstract class PermissionObject {
|
|||||||
}
|
}
|
||||||
node = parts[1];
|
node = parts[1];
|
||||||
|
|
||||||
perms.put(node, getNodes().get(originalNode));
|
if (!node.matches("luckperms\\.group\\..*")) {
|
||||||
continue;
|
perms.put(node, getNodes().get(originalNode));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (node.matches("luckperms\\.group\\..*")) {
|
if (node.matches("luckperms\\.group\\..*")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user