mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-28 05:35:26 +01:00
Fix sponge tab complete, fix bungee listeners & change some messages
This commit is contained in:
parent
bfe0126816
commit
31cef46b56
@ -39,7 +39,8 @@ import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
class BungeeListener extends AbstractListener implements Listener {
|
||||
@SuppressWarnings("WeakerAccess")
|
||||
public class BungeeListener extends AbstractListener implements Listener {
|
||||
private static final TextComponent WARN_MESSAGE = new TextComponent(Message.LOADING_ERROR.toString());
|
||||
private final LPBungeePlugin plugin;
|
||||
|
||||
|
@ -121,25 +121,24 @@ public enum Message {
|
||||
|
||||
UPDATE_TASK_RUN("&bRunning update task for all online users.", true),
|
||||
INFO(
|
||||
PREFIX + "&6Running &bLuckPerms v%s&6." + "\n" +
|
||||
PREFIX + "&eAuthor: &6Luck" + "\n" +
|
||||
PREFIX + "&eStorage Method: &6%s" + "\n" +
|
||||
PREFIX + "&eServer Name: &6%s" + "\n" +
|
||||
PREFIX + "&eDefault Group: &6%s" + "\n" +
|
||||
PREFIX + "&eSync Interval: &6%s minutes" + "\n" +
|
||||
PREFIX + "&eInclude Global Perms: &6%s" + "\n" +
|
||||
PREFIX + "&eOnline Mode: &6%s" + "\n" +
|
||||
PREFIX + "&eApply Wildcards: &6%s" + "\n" +
|
||||
PREFIX + "&eApply Regex: &6%s" + "\n" +
|
||||
PREFIX + "&eApply Shorthand: &6%s",
|
||||
PREFIX + "&6Running &bLuckPerms v%s&6 by &bLuck&6." + "\n" +
|
||||
PREFIX + "&f-> &eStorage Method: &6%s" + "\n" +
|
||||
PREFIX + "&f-> &eServer Name: &6%s" + "\n" +
|
||||
PREFIX + "&f-> &eDefault Group: &6%s" + "\n" +
|
||||
PREFIX + "&f-> &eSync Interval: &6%s minutes" + "\n" +
|
||||
PREFIX + "&f-> &eInclude Global Perms: &6%s" + "\n" +
|
||||
PREFIX + "&f-> &eOnline Mode: &6%s" + "\n" +
|
||||
PREFIX + "&f-> &eApply Wildcards: &6%s" + "\n" +
|
||||
PREFIX + "&f-> &eApply Regex: &6%s" + "\n" +
|
||||
PREFIX + "&f-> &eApply Shorthand: &6%s",
|
||||
false
|
||||
),
|
||||
DEBUG(
|
||||
PREFIX + "&d&l> &dDebug Info" + "\n" +
|
||||
PREFIX + "&eOnline Players: &6%s" + "\n" +
|
||||
PREFIX + "&eLoaded Users: &6%s" + "\n" +
|
||||
PREFIX + "&eLoaded Groups: &6%s" + "\n" +
|
||||
PREFIX + "&eLoaded Tracks: &6%s",
|
||||
PREFIX + "&f> &eOnline Players: &6%s" + "\n" +
|
||||
PREFIX + "&f> &eLoaded Users: &6%s" + "\n" +
|
||||
PREFIX + "&f> &eLoaded Groups: &6%s" + "\n" +
|
||||
PREFIX + "&f> &eLoaded Tracks: &6%s",
|
||||
false
|
||||
),
|
||||
|
||||
|
@ -31,6 +31,7 @@ import org.spongepowered.api.command.CommandResult;
|
||||
import org.spongepowered.api.command.CommandSource;
|
||||
import org.spongepowered.api.text.Text;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
@ -49,8 +50,12 @@ class SpongeCommand extends CommandManager implements CommandCallable {
|
||||
|
||||
@Override
|
||||
public List<String> getSuggestions(CommandSource source, String s) throws CommandException {
|
||||
// TODO: fix this so it actually works
|
||||
return onTabComplete(SpongeSenderFactory.get().wrap(source), Arrays.asList(Patterns.SPACE.split(s)));
|
||||
List<String> args = new ArrayList<>(Arrays.asList(Patterns.SPACE.split(s)));
|
||||
if (s.endsWith(" ")) {
|
||||
args.add("");
|
||||
}
|
||||
|
||||
return onTabComplete(SpongeSenderFactory.get().wrap(source), args);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user