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 73d492cdf0 werden angezeigt - Alle Commits anzeigen

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());
});
}
}