mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-24 11:38:40 +01:00
Maybe nicer looking messages
This commit is contained in:
parent
b9ee206908
commit
e72d91503c
@ -50,12 +50,14 @@ public class PermissionCalculator {
|
||||
}
|
||||
|
||||
public Tristate getPermissionValue(String permission) {
|
||||
permission = permission.toLowerCase();
|
||||
Tristate t = cache.computeIfAbsent(permission, this::lookupPermissionValue);
|
||||
|
||||
if (debug) {
|
||||
plugin.getLog().info("Checking if " + objectName + " has permission: " + permission);
|
||||
plugin.getLog().info("Checking if " + objectName + " has permission: " + permission + " - (" + t.toString() + ")");
|
||||
}
|
||||
|
||||
permission = permission.toLowerCase();
|
||||
return cache.computeIfAbsent(permission, this::lookupPermissionValue);
|
||||
return t;
|
||||
}
|
||||
|
||||
private Tristate lookupPermissionValue(String permission) {
|
||||
|
@ -179,9 +179,9 @@ public class CommandManager {
|
||||
}
|
||||
|
||||
private void sendCommandUsage(Sender sender, String label) {
|
||||
Util.sendPluginMessage(sender, "&6Running &bLuckPerms v" + plugin.getVersion() + "&6.");
|
||||
Util.sendPluginMessage(sender, "&2Running &bLuckPerms v" + plugin.getVersion() + "&2.");
|
||||
mainCommands.stream()
|
||||
.filter(c -> c.isAuthorized(sender))
|
||||
.forEach(c -> Util.sendPluginMessage(sender, "&e-> &d" + String.format(c.getUsage(), label)));
|
||||
.forEach(c -> Util.sendPluginMessage(sender, "&3> &a" + String.format(c.getUsage(), label)));
|
||||
}
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ public abstract class MainCommand<T> {
|
||||
*/
|
||||
protected void sendUsage(Sender sender, String label) {
|
||||
if (getSubCommands().isEmpty()) {
|
||||
Util.sendPluginMessage(sender, "&e-> &d" + String.format(getUsage(), label));
|
||||
Util.sendPluginMessage(sender, "&3> &a" + String.format(getUsage(), label));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -103,7 +103,7 @@ public abstract class SubCommand<T> {
|
||||
* @param sender the sender to send the usage to
|
||||
*/
|
||||
public void sendUsage(Sender sender) {
|
||||
Util.sendPluginMessage(sender, "&e-> &6" + getName() + (usage.isEmpty() ? "" : "&e - &7" + getUsage()));
|
||||
Util.sendPluginMessage(sender, "&3> &a" + getName() + (usage.isEmpty() ? "" : "&3 - &7" + getUsage()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -34,7 +34,7 @@ public enum Message {
|
||||
/*
|
||||
* General & Commands
|
||||
*/
|
||||
PREFIX("&7&l[&b&lL&a&lP&7&l] &c", false),
|
||||
PREFIX("&7&l[&b&lL&3&lP&7&l] &c", false),
|
||||
EMPTY("{0}", true),
|
||||
PLAYER_ONLINE("&aOnline", false),
|
||||
PLAYER_OFFLINE("&cOffline", false),
|
||||
@ -120,7 +120,7 @@ public enum Message {
|
||||
|
||||
UPDATE_TASK_RUN("&bRunning update task for all online users.", true),
|
||||
INFO(
|
||||
PREFIX + "&6Running &bLuckPerms v{0}&6 by &bLuck&6." + "\n" +
|
||||
PREFIX + "&2Running &bLuckPerms v{0}&2 by &bLuck&2." + "\n" +
|
||||
PREFIX + "&f-> &ePlatform: &6{1}" + "\n" +
|
||||
PREFIX + "&f-> &eStorage Method: &6{2}" + "\n" +
|
||||
PREFIX + "&f-> &eServer Name: &6{3}" + "\n" +
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Locale: en_US
|
||||
# Author: Luck
|
||||
|
||||
prefix: "&7&l[&b&lL&a&lP&7&l] &c"
|
||||
prefix: "&7&l[&b&lL&3&lP&7&l] &c"
|
||||
empty: "{0}"
|
||||
player-online: "&aOnline"
|
||||
player-offline: "&cOffline"
|
||||
@ -80,7 +80,7 @@ track-empty: "The track cannot be used as it is empty or contains only one group
|
||||
|
||||
update-task-run: "&bRunning update task for all online users."
|
||||
info: >
|
||||
{PREFIX}&6Running &bLuckPerms v{0}&6 by &bLuck&6.\n
|
||||
{PREFIX}&2Running &bLuckPerms v{0}&2 by &bLuck&2.\n
|
||||
{PREFIX}&f-> &ePlatform: &6{1}\n
|
||||
{PREFIX}&f-> &eStorage Method: &6{2}\n
|
||||
{PREFIX}&f-> &eServer Name: &6{3}\n
|
||||
|
Loading…
Reference in New Issue
Block a user