Sponge fixes
This commit is contained in:
parent
d29dd35689
commit
ce3ee866ca
@ -194,8 +194,11 @@ public class LPBukkitPlugin extends JavaPlugin implements LuckPermsPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Sender> getSenders() {
|
public List<Sender> getNotifyListeners() {
|
||||||
return getServer().getOnlinePlayers().stream().map(p -> BukkitSenderFactory.get().wrap(p)).collect(Collectors.toList());
|
return getServer().getOnlinePlayers().stream()
|
||||||
|
.map(p -> BukkitSenderFactory.get().wrap(p, Collections.singleton(me.lucko.luckperms.constants.Permission.LOG_NOTIFY)))
|
||||||
|
.filter(me.lucko.luckperms.constants.Permission.LOG_NOTIFY::isAuthorized)
|
||||||
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -30,6 +30,7 @@ import me.lucko.luckperms.commands.CommandManager;
|
|||||||
import me.lucko.luckperms.commands.ConsecutiveExecutor;
|
import me.lucko.luckperms.commands.ConsecutiveExecutor;
|
||||||
import me.lucko.luckperms.commands.Sender;
|
import me.lucko.luckperms.commands.Sender;
|
||||||
import me.lucko.luckperms.constants.Message;
|
import me.lucko.luckperms.constants.Message;
|
||||||
|
import me.lucko.luckperms.constants.Permission;
|
||||||
import me.lucko.luckperms.core.LPConfiguration;
|
import me.lucko.luckperms.core.LPConfiguration;
|
||||||
import me.lucko.luckperms.core.UuidCache;
|
import me.lucko.luckperms.core.UuidCache;
|
||||||
import me.lucko.luckperms.data.Importer;
|
import me.lucko.luckperms.data.Importer;
|
||||||
@ -161,8 +162,11 @@ public class LPBungeePlugin extends Plugin implements LuckPermsPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Sender> getSenders() {
|
public List<Sender> getNotifyListeners() {
|
||||||
return getProxy().getPlayers().stream().map(p -> BungeeSenderFactory.get().wrap(p)).collect(Collectors.toList());
|
return getProxy().getPlayers().stream()
|
||||||
|
.map(p -> BungeeSenderFactory.get().wrap(p, Collections.singleton(Permission.LOG_NOTIFY)))
|
||||||
|
.filter(Permission.LOG_NOTIFY::isAuthorized)
|
||||||
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -103,7 +103,7 @@ public interface LuckPermsPlugin {
|
|||||||
/**
|
/**
|
||||||
* @return a {@link List} of senders online on the platform
|
* @return a {@link List} of senders online on the platform
|
||||||
*/
|
*/
|
||||||
List<Sender> getSenders();
|
List<Sender> getNotifyListeners();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the console sender of the instance
|
* @return the console sender of the instance
|
||||||
|
@ -47,7 +47,11 @@ public abstract class SenderFactory<T> implements Runnable {
|
|||||||
protected abstract boolean hasPermission(T t, String node);
|
protected abstract boolean hasPermission(T t, String node);
|
||||||
|
|
||||||
public final Sender wrap(T t) {
|
public final Sender wrap(T t) {
|
||||||
return new SenderImp(t);
|
return new SenderImp(t, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public final Sender wrap(T t, Set<Permission> toCheck) {
|
||||||
|
return new SenderImp(t, toCheck);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -81,15 +85,19 @@ public abstract class SenderFactory<T> implements Runnable {
|
|||||||
|
|
||||||
private final boolean console;
|
private final boolean console;
|
||||||
|
|
||||||
private SenderImp(T t) {
|
private SenderImp(T t, Set<Permission> toCheck) {
|
||||||
this.tRef = new WeakReference<>(t);
|
this.tRef = new WeakReference<>(t);
|
||||||
this.name = factory.getName(t);
|
this.name = factory.getName(t);
|
||||||
this.uuid = factory.getUuid(t);
|
this.uuid = factory.getUuid(t);
|
||||||
this.console = this.uuid.equals(Constants.getConsoleUUID()) || this.uuid.equals(Constants.getImporterUUID());
|
this.console = this.uuid.equals(Constants.getConsoleUUID()) || this.uuid.equals(Constants.getImporterUUID());
|
||||||
|
|
||||||
if (!this.console) {
|
if (!this.console) {
|
||||||
this.perms = ImmutableMap.copyOf(Arrays.stream(Permission.values())
|
if (toCheck == null || toCheck.isEmpty()) {
|
||||||
.collect(Collectors.toMap(p -> p, p -> factory.hasPermission(t, p.getNode()))));
|
this.perms = ImmutableMap.copyOf(Arrays.stream(Permission.values())
|
||||||
|
.collect(Collectors.toMap(p -> p, p -> factory.hasPermission(t, p.getNode()))));
|
||||||
|
} else {
|
||||||
|
this.perms = ImmutableMap.copyOf(toCheck.stream().collect(Collectors.toMap(p -> p, p -> factory.hasPermission(t, p.getNode()))));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,14 +26,12 @@ import me.lucko.luckperms.LuckPermsPlugin;
|
|||||||
import me.lucko.luckperms.api.event.events.LogNotifyEvent;
|
import me.lucko.luckperms.api.event.events.LogNotifyEvent;
|
||||||
import me.lucko.luckperms.commands.Sender;
|
import me.lucko.luckperms.commands.Sender;
|
||||||
import me.lucko.luckperms.constants.Message;
|
import me.lucko.luckperms.constants.Message;
|
||||||
import me.lucko.luckperms.constants.Permission;
|
|
||||||
import me.lucko.luckperms.core.PermissionHolder;
|
import me.lucko.luckperms.core.PermissionHolder;
|
||||||
import me.lucko.luckperms.groups.Group;
|
import me.lucko.luckperms.groups.Group;
|
||||||
import me.lucko.luckperms.tracks.Track;
|
import me.lucko.luckperms.tracks.Track;
|
||||||
import me.lucko.luckperms.users.User;
|
import me.lucko.luckperms.users.User;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
public class LogEntry extends me.lucko.luckperms.api.LogEntry {
|
public class LogEntry extends me.lucko.luckperms.api.LogEntry {
|
||||||
public static LogEntryBuilder build() {
|
public static LogEntryBuilder build() {
|
||||||
@ -58,9 +56,7 @@ public class LogEntry extends me.lucko.luckperms.api.LogEntry {
|
|||||||
|
|
||||||
final String msg = super.getFormatted();
|
final String msg = super.getFormatted();
|
||||||
|
|
||||||
List<Sender> senders = plugin.getSenders().stream()
|
List<Sender> senders = plugin.getNotifyListeners();
|
||||||
.filter(Permission.LOG_NOTIFY::isAuthorized)
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
senders.add(plugin.getConsoleSender());
|
senders.add(plugin.getConsoleSender());
|
||||||
|
|
||||||
if (sender == null) {
|
if (sender == null) {
|
||||||
|
@ -217,8 +217,11 @@ public class LPSpongePlugin implements LuckPermsPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Sender> getSenders() {
|
public List<Sender> getNotifyListeners() {
|
||||||
return game.getServer().getOnlinePlayers().stream().map(s -> SpongeSenderFactory.get().wrap(s)).collect(Collectors.toList());
|
return game.getServer().getOnlinePlayers().stream()
|
||||||
|
.map(s -> SpongeSenderFactory.get().wrap(s, Collections.singleton(Permission.LOG_NOTIFY)))
|
||||||
|
.filter(Permission.LOG_NOTIFY::isAuthorized)
|
||||||
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -60,9 +60,9 @@ public class LuckPermsSubject implements Subject {
|
|||||||
private final PermissionHolder holder;
|
private final PermissionHolder holder;
|
||||||
private final EnduringData enduringData;
|
private final EnduringData enduringData;
|
||||||
private final TransientData transientData;
|
private final TransientData transientData;
|
||||||
private final LuckPermsService service;
|
protected final LuckPermsService service;
|
||||||
|
|
||||||
private LuckPermsSubject(PermissionHolder holder, LuckPermsService service) {
|
LuckPermsSubject(PermissionHolder holder, LuckPermsService service) {
|
||||||
this.holder = holder;
|
this.holder = holder;
|
||||||
this.enduringData = new EnduringData(this, service, holder);
|
this.enduringData = new EnduringData(this, service, holder);
|
||||||
this.transientData = new TransientData(service, holder);
|
this.transientData = new TransientData(service, holder);
|
||||||
|
@ -0,0 +1,90 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2016 Lucko (Luck) <luck@lucko.me>
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
* SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package me.lucko.luckperms.api.sponge;
|
||||||
|
|
||||||
|
import com.google.common.base.Splitter;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.NonNull;
|
||||||
|
import me.lucko.luckperms.users.User;
|
||||||
|
import org.spongepowered.api.service.context.Context;
|
||||||
|
import org.spongepowered.api.util.Tristate;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
|
public class LuckPermsUserSubject extends LuckPermsSubject {
|
||||||
|
public static LuckPermsUserSubject wrapUser(User user, LuckPermsService service) {
|
||||||
|
return new LuckPermsUserSubject(user, service);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
private final User user;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
private final Map<String, Boolean> permissionCache = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
|
private LuckPermsUserSubject(User user, LuckPermsService service) {
|
||||||
|
super(user, service);
|
||||||
|
this.user = user;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO don't ignore context
|
||||||
|
@Override
|
||||||
|
public Tristate getPermissionValue(@NonNull Set<Context> contexts, @NonNull String permission) {
|
||||||
|
if (service.getPlugin().getConfiguration().getDebugPermissionChecks()) {
|
||||||
|
service.getPlugin().getLog().info("Checking if " + user.getName() + " has permission: " + permission);
|
||||||
|
}
|
||||||
|
|
||||||
|
permission = permission.toLowerCase();
|
||||||
|
|
||||||
|
if (permissionCache.containsKey(permission)) {
|
||||||
|
return Tristate.fromBoolean(permissionCache.get(permission));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (service.getPlugin().getConfiguration().getApplyWildcards()) {
|
||||||
|
if (permissionCache.containsKey("*")) {
|
||||||
|
return Tristate.fromBoolean(permissionCache.get("*"));
|
||||||
|
}
|
||||||
|
if (permissionCache.containsKey("'*'")) {
|
||||||
|
return Tristate.fromBoolean(permissionCache.get("'*'"));
|
||||||
|
}
|
||||||
|
|
||||||
|
String node = "";
|
||||||
|
Iterable<String> permParts = Splitter.on('.').split(permission);
|
||||||
|
for (String s : permParts) {
|
||||||
|
if (node.equals("")) {
|
||||||
|
node = s;
|
||||||
|
} else {
|
||||||
|
node = node + "." + s;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (permissionCache.containsKey(node + ".*")) {
|
||||||
|
return Tristate.fromBoolean(permissionCache.get(node + ".*"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return Tristate.UNDEFINED;
|
||||||
|
}
|
||||||
|
}
|
@ -23,11 +23,11 @@
|
|||||||
package me.lucko.luckperms.api.sponge.collections;
|
package me.lucko.luckperms.api.sponge.collections;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
import lombok.NonNull;
|
import lombok.NonNull;
|
||||||
import me.lucko.luckperms.api.sponge.LuckPermsService;
|
import me.lucko.luckperms.api.sponge.LuckPermsService;
|
||||||
import me.lucko.luckperms.api.sponge.LuckPermsSubject;
|
import me.lucko.luckperms.api.sponge.LuckPermsUserSubject;
|
||||||
import me.lucko.luckperms.api.sponge.simple.SimpleSubject;
|
import me.lucko.luckperms.api.sponge.simple.SimpleSubject;
|
||||||
import me.lucko.luckperms.core.PermissionHolder;
|
|
||||||
import me.lucko.luckperms.users.User;
|
import me.lucko.luckperms.users.User;
|
||||||
import me.lucko.luckperms.users.UserManager;
|
import me.lucko.luckperms.users.UserManager;
|
||||||
import org.spongepowered.api.service.context.Context;
|
import org.spongepowered.api.service.context.Context;
|
||||||
@ -39,6 +39,7 @@ import org.spongepowered.api.service.permission.SubjectData;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@ -46,31 +47,48 @@ public class UserCollection implements SubjectCollection {
|
|||||||
private final LuckPermsService service;
|
private final LuckPermsService service;
|
||||||
private final UserManager manager;
|
private final UserManager manager;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
private final Map<UUID, LuckPermsUserSubject> users = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getIdentifier() {
|
public String getIdentifier() {
|
||||||
return PermissionService.SUBJECTS_USER;
|
return PermissionService.SUBJECTS_USER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void load(UUID uuid) {
|
||||||
|
if (!manager.isLoaded(uuid)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
User user = manager.get(uuid);
|
||||||
|
users.put(uuid, LuckPermsUserSubject.wrapUser(user, service));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void unload(UUID uuid) {
|
||||||
|
users.remove(uuid);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Subject get(@NonNull String id) {
|
public synchronized Subject get(@NonNull String id) {
|
||||||
PermissionHolder holder = null;
|
|
||||||
try {
|
try {
|
||||||
UUID u = UUID.fromString(id);
|
UUID u = UUID.fromString(id);
|
||||||
|
if (users.containsKey(u)) {
|
||||||
|
return users.get(u);
|
||||||
|
}
|
||||||
|
|
||||||
if (manager.isLoaded(u)) {
|
if (manager.isLoaded(u)) {
|
||||||
holder = manager.get(u);
|
load(u);
|
||||||
|
return users.get(u);
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
User user = manager.get(id);
|
for (LuckPermsUserSubject subject : users.values()) {
|
||||||
if (user != null) {
|
if (subject.getUser().getName().equals(id)) {
|
||||||
holder = user;
|
return subject;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (holder != null) {
|
|
||||||
return LuckPermsSubject.wrapHolder(holder, service);
|
|
||||||
}
|
|
||||||
|
|
||||||
service.getPlugin().getLog().warn("Couldn't get subject for: " + id);
|
service.getPlugin().getLog().warn("Couldn't get subject for: " + id);
|
||||||
|
|
||||||
// What am I meant to do here? What if no user is loaded? Load it? Create it?
|
// What am I meant to do here? What if no user is loaded? Load it? Create it?
|
||||||
@ -91,9 +109,7 @@ public class UserCollection implements SubjectCollection {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Iterable<Subject> getAllSubjects() {
|
public Iterable<Subject> getAllSubjects() {
|
||||||
return manager.getAll().values().stream()
|
return users.values().stream().collect(Collectors.toList());
|
||||||
.map(u -> LuckPermsSubject.wrapHolder(u, service))
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -103,8 +119,7 @@ public class UserCollection implements SubjectCollection {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<Subject, Boolean> getAllWithPermission(@NonNull Set<Context> contexts, @NonNull String node) {
|
public Map<Subject, Boolean> getAllWithPermission(@NonNull Set<Context> contexts, @NonNull String node) {
|
||||||
return manager.getAll().values().stream()
|
return users.values().stream()
|
||||||
.map(u -> LuckPermsSubject.wrapHolder(u, service))
|
|
||||||
.filter(sub -> sub.hasPermission(contexts, node))
|
.filter(sub -> sub.hasPermission(contexts, node))
|
||||||
.collect(Collectors.toMap(sub -> sub, sub -> sub.getPermissionValue(contexts, node).asBoolean()));
|
.collect(Collectors.toMap(sub -> sub, sub -> sub.getPermissionValue(contexts, node).asBoolean()));
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,12 @@
|
|||||||
package me.lucko.luckperms.users;
|
package me.lucko.luckperms.users;
|
||||||
|
|
||||||
import me.lucko.luckperms.LPSpongePlugin;
|
import me.lucko.luckperms.LPSpongePlugin;
|
||||||
|
import me.lucko.luckperms.api.event.events.UserPermissionRefreshEvent;
|
||||||
|
import me.lucko.luckperms.api.implementation.internal.UserLink;
|
||||||
|
import me.lucko.luckperms.api.sponge.collections.UserCollection;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
class SpongeUser extends User {
|
class SpongeUser extends User {
|
||||||
@ -41,24 +46,45 @@ class SpongeUser extends User {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void refreshPermissions() {
|
public void refreshPermissions() {
|
||||||
// Do nothing. Should be grabbed from PermissionService.
|
UserCollection uc = plugin.getService().getUserSubjects();
|
||||||
/*
|
if (!uc.getUsers().containsKey(getUuid())) {
|
||||||
plugin.doSync(() -> {
|
return;
|
||||||
Optional<Player> p = plugin.getGame().getServer().getPlayer(plugin.getUuidCache().getExternalUUID(getUuid()));
|
}
|
||||||
if (!p.isPresent()) return;
|
|
||||||
|
|
||||||
final Player player = p.get();
|
// Calculate the permissions that should be applied. This is done async, who cares about how long it takes or how often it's done.
|
||||||
|
Map<String, Boolean> toApply = exportNodes(
|
||||||
|
getPlugin().getConfiguration().getServer(),
|
||||||
|
null, // TODO per world perms
|
||||||
|
null,
|
||||||
|
plugin.getConfiguration().getIncludeGlobalPerms(),
|
||||||
|
true,
|
||||||
|
Collections.emptyList()
|
||||||
|
);
|
||||||
|
|
||||||
// Clear existing permissions
|
try {
|
||||||
player.getSubjectData().clearParents();
|
Map<String, Boolean> existing = uc.getUsers().get(getUuid()).getPermissionCache();
|
||||||
player.getSubjectData().clearPermissions();
|
|
||||||
|
boolean different = false;
|
||||||
|
if (toApply.size() != existing.size()) {
|
||||||
|
different = true;
|
||||||
|
} else {
|
||||||
|
for (Map.Entry<String, Boolean> e : existing.entrySet()) {
|
||||||
|
if (toApply.containsKey(e.getKey()) && toApply.get(e.getKey()) == e.getValue()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
different = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!different) return;
|
||||||
|
|
||||||
|
existing.clear();
|
||||||
|
existing.putAll(toApply);
|
||||||
|
|
||||||
// Re-add all defined permissions for the user
|
|
||||||
final String world = player.getWorld().getName();
|
|
||||||
Map<String, Boolean> local = getLocalPermissions(getPlugin().getConfiguration().getServer(), world, null);
|
|
||||||
local.entrySet().forEach(e -> player.getSubjectData().setPermission(Collections.emptySet(), e.getKey(), Tristate.fromBoolean(e.getValue())));
|
|
||||||
plugin.getApiProvider().fireEventAsync(new UserPermissionRefreshEvent(new UserLink(this)));
|
plugin.getApiProvider().fireEventAsync(new UserPermissionRefreshEvent(new UserLink(this)));
|
||||||
});
|
} catch (Exception e) {
|
||||||
*/
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,7 @@ public class SpongeUserManager extends UserManager {
|
|||||||
public void cleanup(User user) {
|
public void cleanup(User user) {
|
||||||
if (!plugin.getGame().getServer().getPlayer(plugin.getUuidCache().getExternalUUID(user.getUuid())).isPresent()) {
|
if (!plugin.getGame().getServer().getPlayer(plugin.getUuidCache().getExternalUUID(user.getUuid())).isPresent()) {
|
||||||
unload(user);
|
unload(user);
|
||||||
|
plugin.getService().getUserSubjects().unload(user.getUuid());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,6 +39,9 @@ apply-regex=true
|
|||||||
# If set to true, LuckPerms will detect and expand shorthand node patterns.
|
# If set to true, LuckPerms will detect and expand shorthand node patterns.
|
||||||
apply-shorthand=true
|
apply-shorthand=true
|
||||||
|
|
||||||
|
# If LuckPerms should print to console every time a plugin checks if a player has a permission
|
||||||
|
debug-permission-checks=false
|
||||||
|
|
||||||
# If the plugin should send log notifications to users whenever permissions are modified.
|
# If the plugin should send log notifications to users whenever permissions are modified.
|
||||||
log-notify=true
|
log-notify=true
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user