SteamWar/BauSystem
Archiviert
13
0

Update BauSystem to new CommandFramework #217

Manuell gemergt
YoyoNow hat 63 Commits von CommandFramework nach master 2021-04-02 18:08:26 +02:00 zusammengeführt
Nur Änderungen aus Commit f00561f064 werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -24,13 +24,13 @@ import de.steamwar.bausystem.world.Welt;
import de.steamwar.command.SWCommand; import de.steamwar.command.SWCommand;
import de.steamwar.command.SWCommandUtils; import de.steamwar.command.SWCommandUtils;
import de.steamwar.command.TypeMapper; import de.steamwar.command.TypeMapper;
import de.steamwar.comms.handlers.BungeeHandler;
import de.steamwar.sql.BauweltMember; import de.steamwar.sql.BauweltMember;
import de.steamwar.sql.SteamwarUser; import de.steamwar.sql.SteamwarUser;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
public class CommandBau extends SWCommand { public class CommandBau extends SWCommand {
public CommandBau() { public CommandBau() {
@ -126,7 +126,7 @@ public class CommandBau extends SWCommand {
@ClassMapper(value = LocalPlayer.class, local = true) @ClassMapper(value = LocalPlayer.class, local = true)
private TypeMapper<LocalPlayer> mapCommandConfirmation() { private TypeMapper<LocalPlayer> mapCommandConfirmation() {
return SWCommandUtils.createMapper(LocalPlayer::new, return SWCommandUtils.createMapper(LocalPlayer::new,
s -> Bukkit.getOnlinePlayers().stream().map(Player::getName).collect(Collectors.toList())); (c, s) -> Bukkit.getOnlinePlayers().stream().map(Player::getName).filter(n -> !c.getName().equals(n)).collect(Collectors.toList()));
} }