SteamWar/BauSystem
Archiviert
13
0

updated bau toggle-commands tab completion to tab complete adequately for executing user

Dieser Commit ist enthalten in:
Zeanon 2021-04-02 17:13:27 +02:00
Ursprung 9b1f4433ca
Commit 73d492cdf0

Datei anzeigen

@ -27,7 +27,6 @@ import de.steamwar.command.TypeMapper;
import de.steamwar.sql.BauweltMember;
import de.steamwar.sql.SteamwarUser;
import java.util.stream.Collectors;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
@ -51,19 +50,25 @@ public class CommandBau extends SWCommand {
@Register("togglebuild")
public void toggleBuildCommand(Player p, SteamwarUser user) {
if (!permissionCheck(p)) return;
if (!permissionCheck(p)) {
return;
}
onToggleBD(p, user);
}
@Register("togglewe")
public void toggleWECommand(Player p, SteamwarUser user) {
if (!permissionCheck(p)) return;
if (!permissionCheck(p)) {
return;
}
onToggleWE(p, user);
}
@Register("toggleworld")
public void toggleWorldCommand(Player p, SteamwarUser user) {
if (!permissionCheck(p)) return;
if (!permissionCheck(p)) {
return;
}
onToggleWorld(p, user);
}
@ -128,9 +133,15 @@ public class CommandBau extends SWCommand {
.filter(u -> u.getUserName().equals(s))
.findFirst()
.orElse(null),
s -> BauweltMember.getMembers(BauSystem.getOwnerID())
.stream()
.map(m -> SteamwarUser.get(m.getMemberID()).getUserName())
.collect(Collectors.toList()));
(c, s) -> {
if (!(c instanceof Player)) {
return null;
}
Player p = (Player) c;
return BauweltMember.getMembers(SteamwarUser.get(p.getUniqueId()).getId())
.stream()
.map(m -> SteamwarUser.get(m.getMemberID()).getUserName())
.collect(Collectors.toList());
});
}
}