mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2025-01-29 19:51:40 +01:00
Slightly change plugin prefix
This commit is contained in:
parent
a3e6628e11
commit
86eeeb5b94
@ -60,6 +60,7 @@ import me.lucko.luckperms.common.commands.user.UserParentCommand;
|
||||
import me.lucko.luckperms.common.locale.LocaleManager;
|
||||
import me.lucko.luckperms.common.locale.message.Message;
|
||||
import me.lucko.luckperms.common.model.Group;
|
||||
import me.lucko.luckperms.common.plugin.AbstractLuckPermsPlugin;
|
||||
import me.lucko.luckperms.common.plugin.LuckPermsPlugin;
|
||||
import me.lucko.luckperms.common.sender.Sender;
|
||||
import me.lucko.luckperms.common.util.ImmutableCollectors;
|
||||
@ -158,7 +159,7 @@ public class CommandManager {
|
||||
|
||||
// Handle no arguments
|
||||
if (arguments.isEmpty() || (arguments.size() == 1 && arguments.get(0).trim().isEmpty())) {
|
||||
Message.BLANK.send(sender, "&2Running &bLuckPerms v" + this.plugin.getBootstrap().getVersion() + "&2.");
|
||||
Message.BLANK.send(sender, "&2Running &b" + AbstractLuckPermsPlugin.getPluginName() + " v" + this.plugin.getBootstrap().getVersion() + "&2.");
|
||||
if (hasPermissionForAny(sender)) {
|
||||
Message.VIEW_AVAILABLE_COMMANDS_PROMPT.send(sender, label);
|
||||
return CommandResult.SUCCESS;
|
||||
@ -230,7 +231,7 @@ public class CommandManager {
|
||||
}
|
||||
|
||||
private void sendCommandUsage(Sender sender, String label) {
|
||||
Message.BLANK.send(sender, "&2Running &bLuckPerms v" + this.plugin.getBootstrap().getVersion() + "&2.");
|
||||
Message.BLANK.send(sender, "&2Running &b" + AbstractLuckPermsPlugin.getPluginName() + " v" + this.plugin.getBootstrap().getVersion() + "&2.");
|
||||
this.mainCommands.values().stream()
|
||||
.filter(Command::shouldDisplay)
|
||||
.filter(c -> c.isAuthorized(sender))
|
||||
|
@ -33,6 +33,7 @@ import me.lucko.luckperms.common.locale.LocaleManager;
|
||||
import me.lucko.luckperms.common.locale.command.CommandSpec;
|
||||
import me.lucko.luckperms.common.locale.message.Message;
|
||||
import me.lucko.luckperms.common.messaging.InternalMessagingService;
|
||||
import me.lucko.luckperms.common.plugin.AbstractLuckPermsPlugin;
|
||||
import me.lucko.luckperms.common.plugin.LuckPermsPlugin;
|
||||
import me.lucko.luckperms.common.sender.Sender;
|
||||
import me.lucko.luckperms.common.util.DurationFormatter;
|
||||
@ -56,7 +57,8 @@ public class InfoCommand extends SingleCommand {
|
||||
public CommandResult execute(LuckPermsPlugin plugin, Sender sender, List<String> args, String label) {
|
||||
Map<String, String> storageMeta = plugin.getStorage().getMeta();
|
||||
|
||||
Message.INFO_TOP.send(sender,
|
||||
Message.INFO_HEADER.send(sender,
|
||||
AbstractLuckPermsPlugin.getPluginName(),
|
||||
plugin.getBootstrap().getVersion(),
|
||||
plugin.getBootstrap().getType().getFriendlyName(),
|
||||
plugin.getBootstrap().getServerBrand(),
|
||||
|
@ -45,7 +45,7 @@ public enum Message {
|
||||
/*
|
||||
* General & Commands
|
||||
*/
|
||||
PREFIX("&7&l[&b&lL&3&lP&7&l] ", false),
|
||||
PREFIX("&7[&b&lL&3&lP&7] ", false),
|
||||
|
||||
VIEW_AVAILABLE_COMMANDS_PROMPT("&3Use &a/{} help &3to view available commands.", true),
|
||||
NO_PERMISSION_FOR_SUBCOMMANDS("&3You do not have permission to use any sub commands.", true),
|
||||
@ -206,8 +206,8 @@ public enum Message {
|
||||
UPDATE_TASK_PUSH_FAILURE("&cError whilst pushing changes to other servers.", true),
|
||||
UPDATE_TASK_PUSH_FAILURE_NOT_SETUP("&cError whilst pushing changes to other servers. &7(a messaging service has not been configured)", true),
|
||||
RELOAD_CONFIG_SUCCESS("&aThe configuration file was reloaded. &7(some options will only apply after the server has restarted)", true),
|
||||
INFO_TOP(
|
||||
"{PREFIX}&2Running &bLuckPerms v{}&2 by &bLuck&2." + "\n" +
|
||||
INFO_HEADER(
|
||||
"{PREFIX}&2Running &b{} v{}&2 by &bLuck&2." + "\n" +
|
||||
"{PREFIX}&f- &3Platform: &f{}" + "\n" +
|
||||
"{PREFIX}&f- &3Server Brand: &f{}" + "\n" +
|
||||
"{PREFIX}&f- &3Server Version:" + "\n" +
|
||||
|
@ -61,6 +61,8 @@ import okhttp3.OkHttpClient;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
import java.time.Month;
|
||||
import java.util.EnumSet;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
@ -365,8 +367,16 @@ public abstract class AbstractLuckPermsPlugin implements LuckPermsPlugin {
|
||||
|
||||
private void displayBanner(Sender sender) {
|
||||
sender.sendMessage(Message.colorize("&b &3 __ "));
|
||||
sender.sendMessage(Message.colorize("&b | &3|__) " + "&2LuckPerms &bv" + getBootstrap().getVersion()));
|
||||
sender.sendMessage(Message.colorize("&b | &3|__) " + "&2" + getPluginName() + " &bv" + getBootstrap().getVersion()));
|
||||
sender.sendMessage(Message.colorize("&b |___ &3| " + "&8Running on " + getBootstrap().getType().getFriendlyName() + " - " + getBootstrap().getServerBrand()));
|
||||
sender.sendMessage("");
|
||||
}
|
||||
|
||||
public static String getPluginName() {
|
||||
LocalDate date = LocalDate.now();
|
||||
if (date.getMonth() == Month.APRIL && date.getDayOfMonth() == 1) {
|
||||
return "LuckyPerms";
|
||||
}
|
||||
return "LuckPerms";
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user