Update /lp info output

This commit is contained in:
Luck committed 2017-07-19 22:15:12 +01:00
1 parent 400f3a9156
commit 3c44388883
28 files changed
+268 -58

No files matched your search

@@ -124,6 +124,7 @@ import java.util.stream.Collectors;
public class LPSpongePlugin implements LuckPermsPlugin {
private final Set<UUID> ignoringLogs = ConcurrentHashMap.newKeySet();
private Set<UUID> uniqueConnections = ConcurrentHashMap.newKeySet();
@Inject
private Logger logger;
@@ -147,6 +148,7 @@ public class LPSpongePlugin implements LuckPermsPlugin {
private LPTimings timings;
private boolean lateLoad = false;
private long startTime;
private LuckPermsScheduler scheduler;
private SpongeCommand commandManager;
@@ -172,6 +174,7 @@ public class LPSpongePlugin implements LuckPermsPlugin {
@Listener(order = Order.FIRST)
public void onEnable(GamePreInitializationEvent event) {
startTime = System.currentTimeMillis();
scheduler = new LPSpongeScheduler(this);
localeManager = new NoopLocaleManager();
senderFactory = new SpongeSenderFactory(this);
@@ -315,7 +318,7 @@ public class LPSpongePlugin implements LuckPermsPlugin {
scheduler.asyncRepeating(new ServiceCacheHousekeepingTask(service), 2400L);
// scheduler.asyncRepeating(() -> userManager.performCleanup(), 2400L);
getLog().info("Successfully enabled.");
getLog().info("Successfully enabled. (took " + (System.currentTimeMillis() - startTime) + "ms)");
}
@Listener(order = Order.LATE)
@@ -41,6 +41,8 @@ import me.lucko.luckperms.common.core.model.User;
import me.lucko.luckperms.sponge.calculators.DefaultsProcessor;
import me.lucko.luckperms.sponge.calculators.SpongeWildcardProcessor;
import java.util.List;
@AllArgsConstructor
public class SpongeCalculatorFactory extends AbstractCalculatorFactory {
private final LPSpongePlugin plugin;
@@ -69,4 +71,15 @@ public class SpongeCalculatorFactory extends AbstractCalculatorFactory {
return registerCalculator(new PermissionCalculator(plugin, user.getFriendlyName(), processors.build()));
}
@Override
public List<String> getActiveProcessors() {
ImmutableList.Builder<String> ret = ImmutableList.builder();
ret.add("Map");
if (plugin.getConfiguration().get(ConfigKeys.APPLY_SPONGE_IMPLICIT_WILDCARDS)) ret.add("SpongeWildcard");
if (plugin.getConfiguration().get(ConfigKeys.APPLYING_REGEX)) ret.add("Regex");
if (plugin.getConfiguration().get(ConfigKeys.APPLYING_WILDCARDS)) ret.add("Wildcards");
if (plugin.getConfiguration().get(ConfigKeys.APPLY_SPONGE_DEFAULT_SUBJECTS)) ret.add("Defaults");
return ret.build();
}
}
@@ -90,6 +90,8 @@ public class SpongeListener {
return;
}
plugin.getUniqueConnections().add(p.getUniqueId());
/* Actually process the login for the connection.
We do this here to delay the login until the data is ready.
If the login gets cancelled later on, then this will be cleaned up.