13
0

Implement FightServerPortal command

Dieser Commit ist enthalten in:
yoyosource 2021-10-04 12:23:57 +02:00
Ursprung 7d56c4ff59
Commit 96e94f7d49

Datei anzeigen

@ -10,6 +10,7 @@ import de.steamwar.command.SWCommand;
import de.steamwar.command.TypeMapper;
import de.steamwar.lobby.LobbySystem;
import de.steamwar.lobby.portal.CommandPortal;
import de.steamwar.lobby.portal.FightserverPortal;
import de.steamwar.lobby.portal.Portal;
import de.steamwar.lobby.portal.TeleportPortal;
import de.steamwar.sql.SteamwarUser;
@ -66,15 +67,14 @@ public class PortalCommand extends SWCommand {
}
@Register({"create", "fightserver"})
public void portalAddFightserver(Player player, String portalName) {
public void portalAddFightserver(Player player, String portalName, String group, String target) {
if (noPermissions(player)) return;
Tuple<Location, Location> tuple = getSelection(player);
if (tuple == null) {
LobbySystem.MESSAGE.send("PORTAL_NO_WORLDEDIT_SELECTION", player);
return;
}
// TODO: implement FightserverPortal
// new Portal(portalName, tuple.k, tuple.v, portal -> new CommandPortal(portal, String.join(" ", command)));
new Portal(portalName, tuple.k, tuple.v, portal -> new FightserverPortal(portal, group, target));
}
@Register({"create", "teleport"})