enum names should be singular

This commit is contained in:
Luck 2016-07-12 11:32:04 +01:00
parent f803082b15
commit f35cb95001
29 changed files with 107 additions and 107 deletions

View File

@ -12,7 +12,7 @@ import me.lucko.luckperms.commands.misc.InfoCommand;
import me.lucko.luckperms.commands.misc.SyncCommand; import me.lucko.luckperms.commands.misc.SyncCommand;
import me.lucko.luckperms.commands.user.UserMainCommand; import me.lucko.luckperms.commands.user.UserMainCommand;
import me.lucko.luckperms.commands.user.subcommands.*; import me.lucko.luckperms.commands.user.subcommands.*;
import me.lucko.luckperms.constants.Messages; import me.lucko.luckperms.constants.Message;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -106,7 +106,7 @@ public class CommandManager {
} }
private void sendCommandUsage(Sender sender) { private void sendCommandUsage(Sender sender) {
Messages.INFO_BRIEF.send(sender, plugin.getVersion()); Message.INFO_BRIEF.send(sender, plugin.getVersion());
mainCommands.stream() mainCommands.stream()
.filter(c -> c.canUse(sender)) .filter(c -> c.canUse(sender))

View File

@ -3,7 +3,7 @@ package me.lucko.luckperms.commands;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Getter; import lombok.Getter;
import me.lucko.luckperms.LuckPermsPlugin; import me.lucko.luckperms.LuckPermsPlugin;
import me.lucko.luckperms.constants.Messages; import me.lucko.luckperms.constants.Message;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -34,7 +34,7 @@ public abstract class MainCommand {
} }
} else { } else {
Messages.COMMAND_NO_PERMISSION.send(sender); Message.COMMAND_NO_PERMISSION.send(sender);
} }
} }

View File

@ -4,7 +4,7 @@ import me.lucko.luckperms.LuckPermsPlugin;
import me.lucko.luckperms.commands.MainCommand; import me.lucko.luckperms.commands.MainCommand;
import me.lucko.luckperms.commands.Sender; import me.lucko.luckperms.commands.Sender;
import me.lucko.luckperms.commands.SubCommand; import me.lucko.luckperms.commands.SubCommand;
import me.lucko.luckperms.constants.Messages; import me.lucko.luckperms.constants.Message;
import me.lucko.luckperms.constants.Permission; import me.lucko.luckperms.constants.Permission;
import java.util.ArrayList; import java.util.ArrayList;
@ -25,13 +25,13 @@ public class CreateGroupCommand extends MainCommand {
String groupName = args.get(0).toLowerCase(); String groupName = args.get(0).toLowerCase();
plugin.getDatastore().loadGroup(groupName, success -> { plugin.getDatastore().loadGroup(groupName, success -> {
if (success) { if (success) {
Messages.GROUP_ALREADY_EXISTS.send(sender); Message.GROUP_ALREADY_EXISTS.send(sender);
} else { } else {
plugin.getDatastore().createAndLoadGroup(groupName, success1 -> { plugin.getDatastore().createAndLoadGroup(groupName, success1 -> {
if (!success1) { if (!success1) {
Messages.CREATE_GROUP_ERROR.send(sender); Message.CREATE_GROUP_ERROR.send(sender);
} else { } else {
Messages.CREATE_GROUP_SUCCESS.send(sender, groupName); Message.CREATE_GROUP_SUCCESS.send(sender, groupName);
plugin.runUpdateTask(); plugin.runUpdateTask();
} }
}); });

View File

@ -4,7 +4,7 @@ import me.lucko.luckperms.LuckPermsPlugin;
import me.lucko.luckperms.commands.MainCommand; import me.lucko.luckperms.commands.MainCommand;
import me.lucko.luckperms.commands.Sender; import me.lucko.luckperms.commands.Sender;
import me.lucko.luckperms.commands.SubCommand; import me.lucko.luckperms.commands.SubCommand;
import me.lucko.luckperms.constants.Messages; import me.lucko.luckperms.constants.Message;
import me.lucko.luckperms.constants.Permission; import me.lucko.luckperms.constants.Permission;
import me.lucko.luckperms.groups.Group; import me.lucko.luckperms.groups.Group;
@ -26,24 +26,24 @@ public class DeleteGroupCommand extends MainCommand {
String groupName = args.get(0).toLowerCase(); String groupName = args.get(0).toLowerCase();
if (groupName.equalsIgnoreCase(plugin.getConfiguration().getDefaultGroupName())) { if (groupName.equalsIgnoreCase(plugin.getConfiguration().getDefaultGroupName())) {
Messages.DELETE_GROUP_ERROR_DEFAULT.send(sender); Message.DELETE_GROUP_ERROR_DEFAULT.send(sender);
return; return;
} }
plugin.getDatastore().loadGroup(groupName, success -> { plugin.getDatastore().loadGroup(groupName, success -> {
if (!success) { if (!success) {
Messages.GROUP_DOES_NOT_EXIST.send(sender); Message.GROUP_DOES_NOT_EXIST.send(sender);
} else { } else {
Group group = plugin.getGroupManager().getGroup(groupName); Group group = plugin.getGroupManager().getGroup(groupName);
if (group == null) { if (group == null) {
Messages.GROUP_LOAD_ERROR.send(sender); Message.GROUP_LOAD_ERROR.send(sender);
} else { } else {
plugin.getDatastore().deleteGroup(group, success1 -> { plugin.getDatastore().deleteGroup(group, success1 -> {
if (!success1) { if (!success1) {
Messages.DELETE_GROUP_ERROR.send(sender); Message.DELETE_GROUP_ERROR.send(sender);
} else { } else {
Messages.DELETE_GROUP_SUCCESS.send(sender, groupName); Message.DELETE_GROUP_SUCCESS.send(sender, groupName);
plugin.runUpdateTask(); plugin.runUpdateTask();
} }
}); });

View File

@ -4,7 +4,7 @@ import me.lucko.luckperms.LuckPermsPlugin;
import me.lucko.luckperms.commands.MainCommand; import me.lucko.luckperms.commands.MainCommand;
import me.lucko.luckperms.commands.Sender; import me.lucko.luckperms.commands.Sender;
import me.lucko.luckperms.commands.SubCommand; import me.lucko.luckperms.commands.SubCommand;
import me.lucko.luckperms.constants.Messages; import me.lucko.luckperms.constants.Message;
import me.lucko.luckperms.groups.Group; import me.lucko.luckperms.groups.Group;
import java.util.ArrayList; import java.util.ArrayList;
@ -29,13 +29,13 @@ public class GroupMainCommand extends MainCommand {
Optional<GroupSubCommand> o = subCommands.stream().filter(s -> s.getName().equalsIgnoreCase(args.get(1))).limit(1).findAny(); Optional<GroupSubCommand> o = subCommands.stream().filter(s -> s.getName().equalsIgnoreCase(args.get(1))).limit(1).findAny();
if (!o.isPresent()) { if (!o.isPresent()) {
Messages.COMMAND_NOT_RECOGNISED.send(sender); Message.COMMAND_NOT_RECOGNISED.send(sender);
return; return;
} }
final GroupSubCommand sub = o.get(); final GroupSubCommand sub = o.get();
if (!sub.isAuthorized(sender)) { if (!sub.isAuthorized(sender)) {
Messages.COMMAND_NO_PERMISSION.send(sender); Message.COMMAND_NO_PERMISSION.send(sender);
return; return;
} }
@ -47,13 +47,13 @@ public class GroupMainCommand extends MainCommand {
final String groupName = args.get(0).toLowerCase(); final String groupName = args.get(0).toLowerCase();
plugin.getDatastore().loadGroup(groupName, success -> { plugin.getDatastore().loadGroup(groupName, success -> {
if (!success) { if (!success) {
Messages.GROUP_NOT_FOUND.send(sender); Message.GROUP_NOT_FOUND.send(sender);
return; return;
} }
Group group = plugin.getGroupManager().getGroup(groupName); Group group = plugin.getGroupManager().getGroup(groupName);
if (group == null) { if (group == null) {
Messages.GROUP_NOT_FOUND.send(sender); Message.GROUP_NOT_FOUND.send(sender);
return; return;
} }

View File

@ -3,7 +3,7 @@ package me.lucko.luckperms.commands.group;
import me.lucko.luckperms.LuckPermsPlugin; import me.lucko.luckperms.LuckPermsPlugin;
import me.lucko.luckperms.commands.Sender; import me.lucko.luckperms.commands.Sender;
import me.lucko.luckperms.commands.SubCommand; import me.lucko.luckperms.commands.SubCommand;
import me.lucko.luckperms.constants.Messages; import me.lucko.luckperms.constants.Message;
import me.lucko.luckperms.constants.Permission; import me.lucko.luckperms.constants.Permission;
import me.lucko.luckperms.groups.Group; import me.lucko.luckperms.groups.Group;
@ -19,9 +19,9 @@ public abstract class GroupSubCommand extends SubCommand {
protected void saveGroup(Group group, Sender sender, LuckPermsPlugin plugin) { protected void saveGroup(Group group, Sender sender, LuckPermsPlugin plugin) {
plugin.getDatastore().saveGroup(group, success -> { plugin.getDatastore().saveGroup(group, success -> {
if (success) { if (success) {
Messages.GROUP_SAVE_SUCCESS.send(sender); Message.GROUP_SAVE_SUCCESS.send(sender);
} else { } else {
Messages.GROUP_SAVE_ERROR.send(sender); Message.GROUP_SAVE_ERROR.send(sender);
} }
plugin.runUpdateTask(); plugin.runUpdateTask();

View File

@ -5,7 +5,7 @@ import me.lucko.luckperms.commands.MainCommand;
import me.lucko.luckperms.commands.Sender; import me.lucko.luckperms.commands.Sender;
import me.lucko.luckperms.commands.SubCommand; import me.lucko.luckperms.commands.SubCommand;
import me.lucko.luckperms.commands.Util; import me.lucko.luckperms.commands.Util;
import me.lucko.luckperms.constants.Messages; import me.lucko.luckperms.constants.Message;
import me.lucko.luckperms.constants.Permission; import me.lucko.luckperms.constants.Permission;
import java.util.ArrayList; import java.util.ArrayList;
@ -20,9 +20,9 @@ public class ListGroupsCommand extends MainCommand {
protected void execute(LuckPermsPlugin plugin, Sender sender, List<String> args) { protected void execute(LuckPermsPlugin plugin, Sender sender, List<String> args) {
plugin.getDatastore().loadAllGroups(success -> { plugin.getDatastore().loadAllGroups(success -> {
if (!success) { if (!success) {
Messages.GROUPS_LOAD_ERROR.send(sender); Message.GROUPS_LOAD_ERROR.send(sender);
} else { } else {
Messages.GROUPS_LIST.send(sender, Util.listToCommaSep(new ArrayList<>(plugin.getGroupManager().getGroups().keySet()))); Message.GROUPS_LIST.send(sender, Util.listToCommaSep(new ArrayList<>(plugin.getGroupManager().getGroups().keySet())));
} }
}); });
} }

View File

@ -3,7 +3,7 @@ package me.lucko.luckperms.commands.group.subcommands;
import me.lucko.luckperms.LuckPermsPlugin; import me.lucko.luckperms.LuckPermsPlugin;
import me.lucko.luckperms.commands.Sender; import me.lucko.luckperms.commands.Sender;
import me.lucko.luckperms.commands.group.GroupSubCommand; import me.lucko.luckperms.commands.group.GroupSubCommand;
import me.lucko.luckperms.constants.Messages; import me.lucko.luckperms.constants.Message;
import me.lucko.luckperms.constants.Permission; import me.lucko.luckperms.constants.Permission;
import me.lucko.luckperms.groups.Group; import me.lucko.luckperms.groups.Group;
@ -17,7 +17,7 @@ public class GroupClearCommand extends GroupSubCommand {
@Override @Override
protected void execute(LuckPermsPlugin plugin, Sender sender, Group group, List<String> args) { protected void execute(LuckPermsPlugin plugin, Sender sender, Group group, List<String> args) {
group.clearNodes(); group.clearNodes();
Messages.CLEAR_SUCCESS.send(sender, group.getName()); Message.CLEAR_SUCCESS.send(sender, group.getName());
saveGroup(group, sender, plugin); saveGroup(group, sender, plugin);
} }

View File

@ -3,7 +3,7 @@ package me.lucko.luckperms.commands.group.subcommands;
import me.lucko.luckperms.LuckPermsPlugin; import me.lucko.luckperms.LuckPermsPlugin;
import me.lucko.luckperms.commands.Sender; import me.lucko.luckperms.commands.Sender;
import me.lucko.luckperms.commands.group.GroupSubCommand; import me.lucko.luckperms.commands.group.GroupSubCommand;
import me.lucko.luckperms.constants.Messages; import me.lucko.luckperms.constants.Message;
import me.lucko.luckperms.constants.Permission; import me.lucko.luckperms.constants.Permission;
import me.lucko.luckperms.groups.Group; import me.lucko.luckperms.groups.Group;
@ -16,7 +16,7 @@ public class GroupInfoCommand extends GroupSubCommand {
@Override @Override
protected void execute(LuckPermsPlugin plugin, Sender sender, Group group, List<String> args) { protected void execute(LuckPermsPlugin plugin, Sender sender, Group group, List<String> args) {
Messages.GROUP_INFO.send(sender, group.getName(), group.getNodes().keySet().size(), group.getName()); Message.GROUP_INFO.send(sender, group.getName(), group.getNodes().keySet().size(), group.getName());
} }
@Override @Override

View File

@ -4,7 +4,7 @@ import me.lucko.luckperms.LuckPermsPlugin;
import me.lucko.luckperms.commands.Sender; import me.lucko.luckperms.commands.Sender;
import me.lucko.luckperms.commands.Util; import me.lucko.luckperms.commands.Util;
import me.lucko.luckperms.commands.group.GroupSubCommand; import me.lucko.luckperms.commands.group.GroupSubCommand;
import me.lucko.luckperms.constants.Messages; import me.lucko.luckperms.constants.Message;
import me.lucko.luckperms.constants.Permission; import me.lucko.luckperms.constants.Permission;
import me.lucko.luckperms.groups.Group; import me.lucko.luckperms.groups.Group;
@ -18,7 +18,7 @@ public class GroupListNodesCommand extends GroupSubCommand {
@Override @Override
protected void execute(LuckPermsPlugin plugin, Sender sender, Group group, List<String> args) { protected void execute(LuckPermsPlugin plugin, Sender sender, Group group, List<String> args) {
Messages.LISTNODES.send(sender, group.getName(), Util.nodesToString(group.getNodes())); Message.LISTNODES.send(sender, group.getName(), Util.nodesToString(group.getNodes()));
} }
@Override @Override

View File

@ -3,7 +3,7 @@ package me.lucko.luckperms.commands.group.subcommands;
import me.lucko.luckperms.LuckPermsPlugin; import me.lucko.luckperms.LuckPermsPlugin;
import me.lucko.luckperms.commands.Sender; import me.lucko.luckperms.commands.Sender;
import me.lucko.luckperms.commands.group.GroupSubCommand; import me.lucko.luckperms.commands.group.GroupSubCommand;
import me.lucko.luckperms.constants.Messages; import me.lucko.luckperms.constants.Message;
import me.lucko.luckperms.constants.Permission; import me.lucko.luckperms.constants.Permission;
import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; import me.lucko.luckperms.exceptions.ObjectAlreadyHasException;
import me.lucko.luckperms.groups.Group; import me.lucko.luckperms.groups.Group;
@ -22,21 +22,21 @@ public class GroupSetInheritCommand extends GroupSubCommand {
plugin.getDatastore().loadGroup(groupName, success -> { plugin.getDatastore().loadGroup(groupName, success -> {
if (!success) { if (!success) {
Messages.GROUP_LOAD_ERROR.send(sender); Message.GROUP_LOAD_ERROR.send(sender);
} else { } else {
try { try {
if (args.size() == 2) { if (args.size() == 2) {
final String server = args.get(1).toLowerCase(); final String server = args.get(1).toLowerCase();
group.setPermission("group." + groupName, true, server); group.setPermission("group." + groupName, true, server);
Messages.GROUP_SETINHERIT_SERVER_SUCCESS.send(sender, group.getName(), groupName, server); Message.GROUP_SETINHERIT_SERVER_SUCCESS.send(sender, group.getName(), groupName, server);
} else { } else {
group.setPermission("group." + groupName, true); group.setPermission("group." + groupName, true);
Messages.GROUP_SETINHERIT_SUCCESS.send(sender, group.getName(), groupName); Message.GROUP_SETINHERIT_SUCCESS.send(sender, group.getName(), groupName);
} }
saveGroup(group, sender, plugin); saveGroup(group, sender, plugin);
} catch (ObjectAlreadyHasException e) { } catch (ObjectAlreadyHasException e) {
Messages.GROUP_ALREADY_INHERITS.send(sender, group.getName(), groupName); Message.GROUP_ALREADY_INHERITS.send(sender, group.getName(), groupName);
} }
} }
}); });

View File

@ -3,7 +3,7 @@ package me.lucko.luckperms.commands.group.subcommands;
import me.lucko.luckperms.LuckPermsPlugin; import me.lucko.luckperms.LuckPermsPlugin;
import me.lucko.luckperms.commands.Sender; import me.lucko.luckperms.commands.Sender;
import me.lucko.luckperms.commands.group.GroupSubCommand; import me.lucko.luckperms.commands.group.GroupSubCommand;
import me.lucko.luckperms.constants.Messages; import me.lucko.luckperms.constants.Message;
import me.lucko.luckperms.constants.Permission; import me.lucko.luckperms.constants.Permission;
import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; import me.lucko.luckperms.exceptions.ObjectAlreadyHasException;
import me.lucko.luckperms.groups.Group; import me.lucko.luckperms.groups.Group;
@ -27,7 +27,7 @@ public class GroupSetPermissionCommand extends GroupSubCommand {
} }
if (node.matches("group\\..*")) { if (node.matches("group\\..*")) {
Messages.GROUP_USE_INHERIT.send(sender); Message.GROUP_USE_INHERIT.send(sender);
return; return;
} }
@ -42,15 +42,15 @@ public class GroupSetPermissionCommand extends GroupSubCommand {
if (args.size() == 3) { if (args.size() == 3) {
final String server = args.get(2).toLowerCase(); final String server = args.get(2).toLowerCase();
group.setPermission(node, b, server); group.setPermission(node, b, server);
Messages.SETPERMISSION_SERVER_SUCCESS.send(sender, node, bool, group.getName(), server); Message.SETPERMISSION_SERVER_SUCCESS.send(sender, node, bool, group.getName(), server);
} else { } else {
group.setPermission(node, b); group.setPermission(node, b);
Messages.SETPERMISSION_SUCCESS.send(sender, node, bool, group.getName()); Message.SETPERMISSION_SUCCESS.send(sender, node, bool, group.getName());
} }
saveGroup(group, sender, plugin); saveGroup(group, sender, plugin);
} catch (ObjectAlreadyHasException e) { } catch (ObjectAlreadyHasException e) {
Messages.ALREADY_HASPERMISSION.send(sender, group.getName()); Message.ALREADY_HASPERMISSION.send(sender, group.getName());
} }
} }

View File

@ -3,7 +3,7 @@ package me.lucko.luckperms.commands.group.subcommands;
import me.lucko.luckperms.LuckPermsPlugin; import me.lucko.luckperms.LuckPermsPlugin;
import me.lucko.luckperms.commands.Sender; import me.lucko.luckperms.commands.Sender;
import me.lucko.luckperms.commands.group.GroupSubCommand; import me.lucko.luckperms.commands.group.GroupSubCommand;
import me.lucko.luckperms.constants.Messages; import me.lucko.luckperms.constants.Message;
import me.lucko.luckperms.constants.Permission; import me.lucko.luckperms.constants.Permission;
import me.lucko.luckperms.exceptions.ObjectLacksPermissionException; import me.lucko.luckperms.exceptions.ObjectLacksPermissionException;
import me.lucko.luckperms.groups.Group; import me.lucko.luckperms.groups.Group;
@ -26,7 +26,7 @@ public class GroupUnSetPermissionCommand extends GroupSubCommand {
} }
if (node.matches("group\\..*")) { if (node.matches("group\\..*")) {
Messages.GROUP_USE_UNINHERIT.send(sender); Message.GROUP_USE_UNINHERIT.send(sender);
return; return;
} }
@ -34,15 +34,15 @@ public class GroupUnSetPermissionCommand extends GroupSubCommand {
if (args.size() == 2) { if (args.size() == 2) {
final String server = args.get(1).toLowerCase(); final String server = args.get(1).toLowerCase();
group.unsetPermission(node, server); group.unsetPermission(node, server);
Messages.UNSETPERMISSION_SERVER_SUCCESS.send(sender, node, group.getName(), server); Message.UNSETPERMISSION_SERVER_SUCCESS.send(sender, node, group.getName(), server);
} else { } else {
group.unsetPermission(node); group.unsetPermission(node);
Messages.UNSETPERMISSION_SUCCESS.send(sender, node, group.getName()); Message.UNSETPERMISSION_SUCCESS.send(sender, node, group.getName());
} }
saveGroup(group, sender, plugin); saveGroup(group, sender, plugin);
} catch (ObjectLacksPermissionException e) { } catch (ObjectLacksPermissionException e) {
Messages.DOES_NOT_HAVEPERMISSION.send(sender, group.getName()); Message.DOES_NOT_HAVEPERMISSION.send(sender, group.getName());
} }
} }

View File

@ -3,7 +3,7 @@ package me.lucko.luckperms.commands.group.subcommands;
import me.lucko.luckperms.LuckPermsPlugin; import me.lucko.luckperms.LuckPermsPlugin;
import me.lucko.luckperms.commands.Sender; import me.lucko.luckperms.commands.Sender;
import me.lucko.luckperms.commands.group.GroupSubCommand; import me.lucko.luckperms.commands.group.GroupSubCommand;
import me.lucko.luckperms.constants.Messages; import me.lucko.luckperms.constants.Message;
import me.lucko.luckperms.constants.Permission; import me.lucko.luckperms.constants.Permission;
import me.lucko.luckperms.exceptions.ObjectLacksPermissionException; import me.lucko.luckperms.exceptions.ObjectLacksPermissionException;
import me.lucko.luckperms.groups.Group; import me.lucko.luckperms.groups.Group;
@ -24,15 +24,15 @@ public class GroupUnsetInheritCommand extends GroupSubCommand {
if (args.size() == 2) { if (args.size() == 2) {
final String server = args.get(1).toLowerCase(); final String server = args.get(1).toLowerCase();
group.unsetPermission("group." + groupName, server); group.unsetPermission("group." + groupName, server);
Messages.GROUP_UNSETINHERIT_SERVER_SUCCESS.send(sender, group.getName(), groupName, server); Message.GROUP_UNSETINHERIT_SERVER_SUCCESS.send(sender, group.getName(), groupName, server);
} else { } else {
group.unsetPermission("group." + groupName); group.unsetPermission("group." + groupName);
Messages.GROUP_UNSETINHERIT_SUCCESS.send(sender, group.getName(), groupName); Message.GROUP_UNSETINHERIT_SUCCESS.send(sender, group.getName(), groupName);
} }
saveGroup(group, sender, plugin); saveGroup(group, sender, plugin);
} catch (ObjectLacksPermissionException e) { } catch (ObjectLacksPermissionException e) {
Messages.GROUP_DOES_NOT_INHERIT.send(sender, group.getName(), groupName); Message.GROUP_DOES_NOT_INHERIT.send(sender, group.getName(), groupName);
} }
} }

View File

@ -4,7 +4,7 @@ import me.lucko.luckperms.LuckPermsPlugin;
import me.lucko.luckperms.commands.MainCommand; import me.lucko.luckperms.commands.MainCommand;
import me.lucko.luckperms.commands.Sender; import me.lucko.luckperms.commands.Sender;
import me.lucko.luckperms.commands.SubCommand; import me.lucko.luckperms.commands.SubCommand;
import me.lucko.luckperms.constants.Messages; import me.lucko.luckperms.constants.Message;
import me.lucko.luckperms.constants.Permission; import me.lucko.luckperms.constants.Permission;
import java.util.ArrayList; import java.util.ArrayList;
@ -17,7 +17,7 @@ public class DebugCommand extends MainCommand {
@Override @Override
protected void execute(LuckPermsPlugin plugin, Sender sender, List<String> args) { protected void execute(LuckPermsPlugin plugin, Sender sender, List<String> args) {
Messages.DEBUG.send(sender, plugin.getPlayerCount(), plugin.getUserManager().getUsers().size(), Message.DEBUG.send(sender, plugin.getPlayerCount(), plugin.getUserManager().getUsers().size(),
plugin.getGroupManager().getGroups().size() plugin.getGroupManager().getGroups().size()
); );
} }

View File

@ -4,7 +4,7 @@ import me.lucko.luckperms.LuckPermsPlugin;
import me.lucko.luckperms.commands.MainCommand; import me.lucko.luckperms.commands.MainCommand;
import me.lucko.luckperms.commands.Sender; import me.lucko.luckperms.commands.Sender;
import me.lucko.luckperms.commands.SubCommand; import me.lucko.luckperms.commands.SubCommand;
import me.lucko.luckperms.constants.Messages; import me.lucko.luckperms.constants.Message;
import me.lucko.luckperms.constants.Permission; import me.lucko.luckperms.constants.Permission;
import java.util.ArrayList; import java.util.ArrayList;
@ -17,7 +17,7 @@ public class InfoCommand extends MainCommand {
@Override @Override
protected void execute(LuckPermsPlugin plugin, Sender sender, List<String> args) { protected void execute(LuckPermsPlugin plugin, Sender sender, List<String> args) {
Messages.INFO.send(sender, plugin.getVersion(), plugin.getDatastore().getName()); Message.INFO.send(sender, plugin.getVersion(), plugin.getDatastore().getName());
} }
@Override @Override

View File

@ -4,7 +4,7 @@ import me.lucko.luckperms.LuckPermsPlugin;
import me.lucko.luckperms.commands.MainCommand; import me.lucko.luckperms.commands.MainCommand;
import me.lucko.luckperms.commands.Sender; import me.lucko.luckperms.commands.Sender;
import me.lucko.luckperms.commands.SubCommand; import me.lucko.luckperms.commands.SubCommand;
import me.lucko.luckperms.constants.Messages; import me.lucko.luckperms.constants.Message;
import me.lucko.luckperms.constants.Permission; import me.lucko.luckperms.constants.Permission;
import java.util.ArrayList; import java.util.ArrayList;
@ -17,7 +17,7 @@ public class SyncCommand extends MainCommand {
@Override @Override
protected void execute(LuckPermsPlugin plugin, Sender sender, List<String> args) { protected void execute(LuckPermsPlugin plugin, Sender sender, List<String> args) {
Messages.UPDATE_TASK_RUN.send(sender); Message.UPDATE_TASK_RUN.send(sender);
plugin.runUpdateTask(); plugin.runUpdateTask();
} }

View File

@ -5,7 +5,7 @@ import me.lucko.luckperms.commands.MainCommand;
import me.lucko.luckperms.commands.Sender; import me.lucko.luckperms.commands.Sender;
import me.lucko.luckperms.commands.SubCommand; import me.lucko.luckperms.commands.SubCommand;
import me.lucko.luckperms.commands.Util; import me.lucko.luckperms.commands.Util;
import me.lucko.luckperms.constants.Messages; import me.lucko.luckperms.constants.Message;
import me.lucko.luckperms.users.User; import me.lucko.luckperms.users.User;
import java.util.ArrayList; import java.util.ArrayList;
@ -31,13 +31,13 @@ public class UserMainCommand extends MainCommand{
Optional<UserSubCommand> o = subCommands.stream().filter(s -> s.getName().equalsIgnoreCase(args.get(1))).limit(1).findAny(); Optional<UserSubCommand> o = subCommands.stream().filter(s -> s.getName().equalsIgnoreCase(args.get(1))).limit(1).findAny();
if (!o.isPresent()) { if (!o.isPresent()) {
Messages.COMMAND_NOT_RECOGNISED.send(sender); Message.COMMAND_NOT_RECOGNISED.send(sender);
return; return;
} }
final UserSubCommand sub = o.get(); final UserSubCommand sub = o.get();
if (!sub.isAuthorized(sender)) { if (!sub.isAuthorized(sender)) {
Messages.COMMAND_NO_PERMISSION.send(sender); Message.COMMAND_NO_PERMISSION.send(sender);
return; return;
} }
@ -55,11 +55,11 @@ public class UserMainCommand extends MainCommand{
} }
if (user.length() <= 16) { if (user.length() <= 16) {
Messages.USER_ATTEMPTING_LOOKUP.send(sender); Message.USER_ATTEMPTING_LOOKUP.send(sender);
plugin.getDatastore().getUUID(user, uuid -> { plugin.getDatastore().getUUID(user, uuid -> {
if (uuid == null) { if (uuid == null) {
Messages.USER_NOT_FOUND.send(sender); Message.USER_NOT_FOUND.send(sender);
return; return;
} }
runSub(plugin, sender, uuid, sub, strippedArgs); runSub(plugin, sender, uuid, sub, strippedArgs);
@ -67,19 +67,19 @@ public class UserMainCommand extends MainCommand{
return; return;
} }
Messages.USER_INVALID_ENTRY.send(sender, user); Message.USER_INVALID_ENTRY.send(sender, user);
} }
private void runSub(LuckPermsPlugin plugin, Sender sender, UUID uuid, UserSubCommand command, List<String> strippedArgs) { private void runSub(LuckPermsPlugin plugin, Sender sender, UUID uuid, UserSubCommand command, List<String> strippedArgs) {
plugin.getDatastore().loadUser(uuid, success -> { plugin.getDatastore().loadUser(uuid, success -> {
if (!success) { if (!success) {
Messages.USER_NOT_FOUND.send(sender); Message.USER_NOT_FOUND.send(sender);
return; return;
} }
User user = plugin.getUserManager().getUser(uuid); User user = plugin.getUserManager().getUser(uuid);
if (user == null) { if (user == null) {
Messages.USER_NOT_FOUND.send(sender); Message.USER_NOT_FOUND.send(sender);
} }
if (command.isArgLengthInvalid(strippedArgs.size())) { if (command.isArgLengthInvalid(strippedArgs.size())) {

View File

@ -3,7 +3,7 @@ package me.lucko.luckperms.commands.user;
import me.lucko.luckperms.LuckPermsPlugin; import me.lucko.luckperms.LuckPermsPlugin;
import me.lucko.luckperms.commands.Sender; import me.lucko.luckperms.commands.Sender;
import me.lucko.luckperms.commands.SubCommand; import me.lucko.luckperms.commands.SubCommand;
import me.lucko.luckperms.constants.Messages; import me.lucko.luckperms.constants.Message;
import me.lucko.luckperms.constants.Permission; import me.lucko.luckperms.constants.Permission;
import me.lucko.luckperms.users.User; import me.lucko.luckperms.users.User;
@ -21,9 +21,9 @@ public abstract class UserSubCommand extends SubCommand {
plugin.getDatastore().saveUser(user, success -> { plugin.getDatastore().saveUser(user, success -> {
if (success) { if (success) {
Messages.USER_SAVE_SUCCESS.send(sender); Message.USER_SAVE_SUCCESS.send(sender);
} else { } else {
Messages.USER_SAVE_ERROR.send(sender); Message.USER_SAVE_ERROR.send(sender);
} }
}); });
} }

View File

@ -3,7 +3,7 @@ package me.lucko.luckperms.commands.user.subcommands;
import me.lucko.luckperms.LuckPermsPlugin; import me.lucko.luckperms.LuckPermsPlugin;
import me.lucko.luckperms.commands.Sender; import me.lucko.luckperms.commands.Sender;
import me.lucko.luckperms.commands.user.UserSubCommand; import me.lucko.luckperms.commands.user.UserSubCommand;
import me.lucko.luckperms.constants.Messages; import me.lucko.luckperms.constants.Message;
import me.lucko.luckperms.constants.Permission; import me.lucko.luckperms.constants.Permission;
import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; import me.lucko.luckperms.exceptions.ObjectAlreadyHasException;
import me.lucko.luckperms.groups.Group; import me.lucko.luckperms.groups.Group;
@ -22,11 +22,11 @@ public class UserAddGroupCommand extends UserSubCommand {
plugin.getDatastore().loadGroup(groupName, success -> { plugin.getDatastore().loadGroup(groupName, success -> {
if (!success) { if (!success) {
Messages.GROUP_DOES_NOT_EXIST.send(sender); Message.GROUP_DOES_NOT_EXIST.send(sender);
} else { } else {
Group group = plugin.getGroupManager().getGroup(groupName); Group group = plugin.getGroupManager().getGroup(groupName);
if (group == null) { if (group == null) {
Messages.GROUP_DOES_NOT_EXIST.send(sender); Message.GROUP_DOES_NOT_EXIST.send(sender);
return; return;
} }
@ -34,15 +34,15 @@ public class UserAddGroupCommand extends UserSubCommand {
if (args.size() == 2) { if (args.size() == 2) {
final String server = args.get(1).toLowerCase(); final String server = args.get(1).toLowerCase();
user.addGroup(group, server); user.addGroup(group, server);
Messages.USER_ADDGROUP_SERVER_SUCCESS.send(sender, user.getName(), groupName, server); Message.USER_ADDGROUP_SERVER_SUCCESS.send(sender, user.getName(), groupName, server);
} else { } else {
user.addGroup(group); user.addGroup(group);
Messages.USER_ADDGROUP_SUCCESS.send(sender, user.getName(), groupName); Message.USER_ADDGROUP_SUCCESS.send(sender, user.getName(), groupName);
} }
saveUser(user, sender, plugin); saveUser(user, sender, plugin);
} catch (ObjectAlreadyHasException e) { } catch (ObjectAlreadyHasException e) {
Messages.USER_ALREADY_MEMBER_OF.send(sender, user.getName(), group.getName()); Message.USER_ALREADY_MEMBER_OF.send(sender, user.getName(), group.getName());
} }
} }
}); });

View File

@ -3,7 +3,7 @@ package me.lucko.luckperms.commands.user.subcommands;
import me.lucko.luckperms.LuckPermsPlugin; import me.lucko.luckperms.LuckPermsPlugin;
import me.lucko.luckperms.commands.Sender; import me.lucko.luckperms.commands.Sender;
import me.lucko.luckperms.commands.user.UserSubCommand; import me.lucko.luckperms.commands.user.UserSubCommand;
import me.lucko.luckperms.constants.Messages; import me.lucko.luckperms.constants.Message;
import me.lucko.luckperms.constants.Permission; import me.lucko.luckperms.constants.Permission;
import me.lucko.luckperms.users.User; import me.lucko.luckperms.users.User;
@ -18,7 +18,7 @@ public class UserClearCommand extends UserSubCommand {
protected void execute(LuckPermsPlugin plugin, Sender sender, User user, List<String> args) { protected void execute(LuckPermsPlugin plugin, Sender sender, User user, List<String> args) {
user.clearNodes(); user.clearNodes();
plugin.getUserManager().giveDefaults(user); plugin.getUserManager().giveDefaults(user);
Messages.CLEAR_SUCCESS.send(sender, user.getName()); Message.CLEAR_SUCCESS.send(sender, user.getName());
saveUser(user, sender, plugin); saveUser(user, sender, plugin);
} }

View File

@ -3,7 +3,7 @@ package me.lucko.luckperms.commands.user.subcommands;
import me.lucko.luckperms.LuckPermsPlugin; import me.lucko.luckperms.LuckPermsPlugin;
import me.lucko.luckperms.commands.Sender; import me.lucko.luckperms.commands.Sender;
import me.lucko.luckperms.commands.user.UserSubCommand; import me.lucko.luckperms.commands.user.UserSubCommand;
import me.lucko.luckperms.constants.Messages; import me.lucko.luckperms.constants.Message;
import me.lucko.luckperms.constants.Permission; import me.lucko.luckperms.constants.Permission;
import me.lucko.luckperms.users.User; import me.lucko.luckperms.users.User;
@ -16,7 +16,7 @@ public class UserGetUUIDCommand extends UserSubCommand {
@Override @Override
protected void execute(LuckPermsPlugin plugin, Sender sender, User user, List<String> args) { protected void execute(LuckPermsPlugin plugin, Sender sender, User user, List<String> args) {
Messages.USER_GETUUID.send(sender, user.getName(), user.getUuid().toString()); Message.USER_GETUUID.send(sender, user.getName(), user.getUuid().toString());
} }
@Override @Override

View File

@ -4,7 +4,7 @@ import me.lucko.luckperms.LuckPermsPlugin;
import me.lucko.luckperms.commands.Sender; import me.lucko.luckperms.commands.Sender;
import me.lucko.luckperms.commands.Util; import me.lucko.luckperms.commands.Util;
import me.lucko.luckperms.commands.user.UserSubCommand; import me.lucko.luckperms.commands.user.UserSubCommand;
import me.lucko.luckperms.constants.Messages; import me.lucko.luckperms.constants.Message;
import me.lucko.luckperms.constants.Permission; import me.lucko.luckperms.constants.Permission;
import me.lucko.luckperms.users.User; import me.lucko.luckperms.users.User;
@ -17,7 +17,7 @@ public class UserInfoCommand extends UserSubCommand {
@Override @Override
protected void execute(LuckPermsPlugin plugin, Sender sender, User user, List<String> args) { protected void execute(LuckPermsPlugin plugin, Sender sender, User user, List<String> args) {
Messages.USER_INFO.send(sender, user.getName(), user.getUuid(), plugin.getPlayerStatus(user.getUuid()), Message.USER_INFO.send(sender, user.getName(), user.getUuid(), plugin.getPlayerStatus(user.getUuid()),
Util.listToCommaSep(user.getGroupNames()), user.getPrimaryGroup(), Util.listToCommaSep(user.getGroupNames()), user.getPrimaryGroup(),
(user.getNodes().keySet().size() - user.getGroupNames().size()), user.getName() (user.getNodes().keySet().size() - user.getGroupNames().size()), user.getName()
); );

View File

@ -4,7 +4,7 @@ import me.lucko.luckperms.LuckPermsPlugin;
import me.lucko.luckperms.commands.Sender; import me.lucko.luckperms.commands.Sender;
import me.lucko.luckperms.commands.Util; import me.lucko.luckperms.commands.Util;
import me.lucko.luckperms.commands.user.UserSubCommand; import me.lucko.luckperms.commands.user.UserSubCommand;
import me.lucko.luckperms.constants.Messages; import me.lucko.luckperms.constants.Message;
import me.lucko.luckperms.constants.Permission; import me.lucko.luckperms.constants.Permission;
import me.lucko.luckperms.users.User; import me.lucko.luckperms.users.User;
@ -17,7 +17,7 @@ public class UserListNodesCommand extends UserSubCommand {
@Override @Override
protected void execute(LuckPermsPlugin plugin, Sender sender, User user, List<String> args) { protected void execute(LuckPermsPlugin plugin, Sender sender, User user, List<String> args) {
Messages.LISTNODES.send(sender, user.getName(), Util.nodesToString(user.getNodes())); Message.LISTNODES.send(sender, user.getName(), Util.nodesToString(user.getNodes()));
} }
@Override @Override

View File

@ -3,7 +3,7 @@ package me.lucko.luckperms.commands.user.subcommands;
import me.lucko.luckperms.LuckPermsPlugin; import me.lucko.luckperms.LuckPermsPlugin;
import me.lucko.luckperms.commands.Sender; import me.lucko.luckperms.commands.Sender;
import me.lucko.luckperms.commands.user.UserSubCommand; import me.lucko.luckperms.commands.user.UserSubCommand;
import me.lucko.luckperms.constants.Messages; import me.lucko.luckperms.constants.Message;
import me.lucko.luckperms.constants.Permission; import me.lucko.luckperms.constants.Permission;
import me.lucko.luckperms.exceptions.ObjectLacksPermissionException; import me.lucko.luckperms.exceptions.ObjectLacksPermissionException;
import me.lucko.luckperms.users.User; import me.lucko.luckperms.users.User;
@ -21,7 +21,7 @@ public class UserRemoveGroupCommand extends UserSubCommand {
if ((args.size() == 1 || (args.size() == 2 && args.get(1).equalsIgnoreCase("global"))) if ((args.size() == 1 || (args.size() == 2 && args.get(1).equalsIgnoreCase("global")))
&& user.getPrimaryGroup().equalsIgnoreCase(groupName)) { && user.getPrimaryGroup().equalsIgnoreCase(groupName)) {
Messages.USER_REMOVEGROUP_ERROR_PRIMARY.send(sender); Message.USER_REMOVEGROUP_ERROR_PRIMARY.send(sender);
return; return;
} }
@ -29,15 +29,15 @@ public class UserRemoveGroupCommand extends UserSubCommand {
if (args.size() == 2) { if (args.size() == 2) {
final String server = args.get(1).toLowerCase(); final String server = args.get(1).toLowerCase();
user.unsetPermission("group." + groupName, server); user.unsetPermission("group." + groupName, server);
Messages.USER_REMOVEGROUP_SERVER_SUCCESS.send(sender, user.getName(), groupName, server); Message.USER_REMOVEGROUP_SERVER_SUCCESS.send(sender, user.getName(), groupName, server);
} else { } else {
user.unsetPermission("group." + groupName); user.unsetPermission("group." + groupName);
Messages.USER_REMOVEGROUP_SUCCESS.send(sender, user.getName(), groupName); Message.USER_REMOVEGROUP_SUCCESS.send(sender, user.getName(), groupName);
} }
saveUser(user, sender, plugin); saveUser(user, sender, plugin);
} catch (ObjectLacksPermissionException e) { } catch (ObjectLacksPermissionException e) {
Messages.USER_NOT_MEMBER_OF.send(sender, user.getName(), groupName); Message.USER_NOT_MEMBER_OF.send(sender, user.getName(), groupName);
} }
} }

View File

@ -3,7 +3,7 @@ package me.lucko.luckperms.commands.user.subcommands;
import me.lucko.luckperms.LuckPermsPlugin; import me.lucko.luckperms.LuckPermsPlugin;
import me.lucko.luckperms.commands.Sender; import me.lucko.luckperms.commands.Sender;
import me.lucko.luckperms.commands.user.UserSubCommand; import me.lucko.luckperms.commands.user.UserSubCommand;
import me.lucko.luckperms.constants.Messages; import me.lucko.luckperms.constants.Message;
import me.lucko.luckperms.constants.Permission; import me.lucko.luckperms.constants.Permission;
import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; import me.lucko.luckperms.exceptions.ObjectAlreadyHasException;
import me.lucko.luckperms.users.User; import me.lucko.luckperms.users.User;
@ -27,7 +27,7 @@ public class UserSetPermissionCommand extends UserSubCommand {
} }
if (node.matches("group\\..*")) { if (node.matches("group\\..*")) {
Messages.USER_USE_ADDGROUP.send(sender); Message.USER_USE_ADDGROUP.send(sender);
return; return;
} }
@ -42,15 +42,15 @@ public class UserSetPermissionCommand extends UserSubCommand {
if (args.size() == 3) { if (args.size() == 3) {
final String server = args.get(2).toLowerCase(); final String server = args.get(2).toLowerCase();
user.setPermission(node, b, server); user.setPermission(node, b, server);
Messages.SETPERMISSION_SERVER_SUCCESS.send(sender, node, bool, user.getName(), server); Message.SETPERMISSION_SERVER_SUCCESS.send(sender, node, bool, user.getName(), server);
} else { } else {
user.setPermission(node, b); user.setPermission(node, b);
Messages.SETPERMISSION_SUCCESS.send(sender, node, bool, user.getName()); Message.SETPERMISSION_SUCCESS.send(sender, node, bool, user.getName());
} }
saveUser(user, sender, plugin); saveUser(user, sender, plugin);
} catch (ObjectAlreadyHasException e) { } catch (ObjectAlreadyHasException e) {
Messages.ALREADY_HASPERMISSION.send(sender, user.getName()); Message.ALREADY_HASPERMISSION.send(sender, user.getName());
} }
} }

View File

@ -3,7 +3,7 @@ package me.lucko.luckperms.commands.user.subcommands;
import me.lucko.luckperms.LuckPermsPlugin; import me.lucko.luckperms.LuckPermsPlugin;
import me.lucko.luckperms.commands.Sender; import me.lucko.luckperms.commands.Sender;
import me.lucko.luckperms.commands.user.UserSubCommand; import me.lucko.luckperms.commands.user.UserSubCommand;
import me.lucko.luckperms.constants.Messages; import me.lucko.luckperms.constants.Message;
import me.lucko.luckperms.constants.Permission; import me.lucko.luckperms.constants.Permission;
import me.lucko.luckperms.groups.Group; import me.lucko.luckperms.groups.Group;
import me.lucko.luckperms.users.User; import me.lucko.luckperms.users.User;
@ -20,22 +20,22 @@ public class UserSetPrimaryGroupCommand extends UserSubCommand {
protected void execute(LuckPermsPlugin plugin, Sender sender, User user, List<String> args) { protected void execute(LuckPermsPlugin plugin, Sender sender, User user, List<String> args) {
Group group = plugin.getGroupManager().getGroup(args.get(0).toLowerCase()); Group group = plugin.getGroupManager().getGroup(args.get(0).toLowerCase());
if (group == null) { if (group == null) {
Messages.GROUP_DOES_NOT_EXIST.send(sender); Message.GROUP_DOES_NOT_EXIST.send(sender);
return; return;
} }
if (user.getPrimaryGroup().equalsIgnoreCase(group.getName())) { if (user.getPrimaryGroup().equalsIgnoreCase(group.getName())) {
Messages.USER_PRIMARYGROUP_ERROR_ALREADYHAS.send(sender); Message.USER_PRIMARYGROUP_ERROR_ALREADYHAS.send(sender);
return; return;
} }
if (!user.isInGroup(group)) { if (!user.isInGroup(group)) {
Messages.USER_PRIMARYGROUP_ERROR_NOTMEMBER.send(sender); Message.USER_PRIMARYGROUP_ERROR_NOTMEMBER.send(sender);
return; return;
} }
user.setPrimaryGroup(group.getName()); user.setPrimaryGroup(group.getName());
Messages.USER_PRIMARYGROUP_SUCCESS.send(sender, user.getName(), group.getName()); Message.USER_PRIMARYGROUP_SUCCESS.send(sender, user.getName(), group.getName());
saveUser(user, sender, plugin); saveUser(user, sender, plugin);
} }

View File

@ -3,7 +3,7 @@ package me.lucko.luckperms.commands.user.subcommands;
import me.lucko.luckperms.LuckPermsPlugin; import me.lucko.luckperms.LuckPermsPlugin;
import me.lucko.luckperms.commands.Sender; import me.lucko.luckperms.commands.Sender;
import me.lucko.luckperms.commands.user.UserSubCommand; import me.lucko.luckperms.commands.user.UserSubCommand;
import me.lucko.luckperms.constants.Messages; import me.lucko.luckperms.constants.Message;
import me.lucko.luckperms.constants.Permission; import me.lucko.luckperms.constants.Permission;
import me.lucko.luckperms.exceptions.ObjectLacksPermissionException; import me.lucko.luckperms.exceptions.ObjectLacksPermissionException;
import me.lucko.luckperms.users.User; import me.lucko.luckperms.users.User;
@ -26,7 +26,7 @@ public class UserUnSetPermissionCommand extends UserSubCommand {
} }
if (node.matches("group\\..*")) { if (node.matches("group\\..*")) {
Messages.USER_USE_REMOVEGROUP.send(sender); Message.USER_USE_REMOVEGROUP.send(sender);
return; return;
} }
@ -34,15 +34,15 @@ public class UserUnSetPermissionCommand extends UserSubCommand {
if (args.size() == 2) { if (args.size() == 2) {
final String server = args.get(1).toLowerCase(); final String server = args.get(1).toLowerCase();
user.unsetPermission(node, server); user.unsetPermission(node, server);
Messages.UNSETPERMISSION_SERVER_SUCCESS.send(sender, node, user.getName(), server); Message.UNSETPERMISSION_SERVER_SUCCESS.send(sender, node, user.getName(), server);
} else { } else {
user.unsetPermission(node); user.unsetPermission(node);
Messages.UNSETPERMISSION_SUCCESS.send(sender, node, user.getName()); Message.UNSETPERMISSION_SUCCESS.send(sender, node, user.getName());
} }
saveUser(user, sender, plugin); saveUser(user, sender, plugin);
} catch (ObjectLacksPermissionException e) { } catch (ObjectLacksPermissionException e) {
Messages.DOES_NOT_HAVEPERMISSION.send(sender, user.getName()); Message.DOES_NOT_HAVEPERMISSION.send(sender, user.getName());
} }
} }

View File

@ -6,7 +6,7 @@ import me.lucko.luckperms.commands.Util;
@SuppressWarnings("SpellCheckingInspection") @SuppressWarnings("SpellCheckingInspection")
@AllArgsConstructor @AllArgsConstructor
public enum Messages { public enum Message {
PREFIX("&7&l[&b&lL&a&lP&7&l] &c", false), PREFIX("&7&l[&b&lL&a&lP&7&l] &c", false),