Dieser Commit ist enthalten in:
Ursprung
742bc92f53
Commit
cc839859a8
@ -22,6 +22,7 @@ package de.steamwar.command;
|
|||||||
import de.steamwar.bungeecore.BungeeCore;
|
import de.steamwar.bungeecore.BungeeCore;
|
||||||
import de.steamwar.bungeecore.Message;
|
import de.steamwar.bungeecore.Message;
|
||||||
import de.steamwar.messages.ChatSender;
|
import de.steamwar.messages.ChatSender;
|
||||||
|
import net.md_5.bungee.BungeeCord;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
import net.md_5.bungee.api.chat.ClickEvent;
|
import net.md_5.bungee.api.chat.ClickEvent;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
@ -30,6 +31,7 @@ import net.md_5.bungee.api.plugin.TabExecutor;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
@ -61,17 +63,19 @@ public class SWCommand extends AbstractSWCommand<CommandSender> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void createAndSafeCommand(String command, String[] aliases) {
|
protected void createAndSafeCommand(String command, String[] aliases) {
|
||||||
this.command = new TabCompletableCommand(command, permission, aliases) {
|
BungeeCord.getInstance().getScheduler().schedule(BungeeCore.get(), () -> {
|
||||||
@Override
|
this.command = new TabCompletableCommand(command, permission, aliases) {
|
||||||
public void execute(CommandSender commandSender, String[] strings) {
|
@Override
|
||||||
SWCommand.this.execute(commandSender, null, strings);
|
public void execute(CommandSender commandSender, String[] strings) {
|
||||||
}
|
SWCommand.this.execute(commandSender, null, strings);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Iterable<String> onTabComplete(CommandSender commandSender, String[] strings) {
|
public Iterable<String> onTabComplete(CommandSender commandSender, String[] strings) {
|
||||||
return SWCommand.this.tabComplete(commandSender, null, strings);
|
return SWCommand.this.tabComplete(commandSender, null, strings);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
}, 100, TimeUnit.MILLISECONDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
private abstract static class TabCompletableCommand extends Command implements TabExecutor {
|
private abstract static class TabCompletableCommand extends Command implements TabExecutor {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren