Implement FightServerPortal command
Dieser Commit ist enthalten in:
Ursprung
08fecc3333
Commit
fe6e963d4c
@ -9,10 +9,7 @@ import com.sk89q.worldedit.regions.RegionSelector;
|
|||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
import de.steamwar.command.TypeMapper;
|
import de.steamwar.command.TypeMapper;
|
||||||
import de.steamwar.lobby.LobbySystem;
|
import de.steamwar.lobby.LobbySystem;
|
||||||
import de.steamwar.lobby.portal.CommandPortal;
|
import de.steamwar.lobby.portal.*;
|
||||||
import de.steamwar.lobby.portal.FightserverPortal;
|
|
||||||
import de.steamwar.lobby.portal.Portal;
|
|
||||||
import de.steamwar.lobby.portal.TeleportPortal;
|
|
||||||
import de.steamwar.sql.SteamwarUser;
|
import de.steamwar.sql.SteamwarUser;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@ -88,6 +85,17 @@ public class PortalCommand extends SWCommand {
|
|||||||
new Portal(portalName, tuple.k, tuple.v, portal -> new TeleportPortal(portal, portalDestination));
|
new Portal(portalName, tuple.k, tuple.v, portal -> new TeleportPortal(portal, portalDestination));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Register({"create", "stack"})
|
||||||
|
public void portalAddStack(Player player, String portalName, String portalDestination, String... command) {
|
||||||
|
if (noPermissions(player)) return;
|
||||||
|
Tuple<Location, Location> tuple = getSelection(player);
|
||||||
|
if (tuple == null) {
|
||||||
|
LobbySystem.MESSAGE.send("PORTAL_NO_WORLDEDIT_SELECTION", player);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
new Portal(portalName, tuple.k, tuple.v, portal -> new StackPortal(portal, portalDestination, String.join(" ", command)));
|
||||||
|
}
|
||||||
|
|
||||||
@Register("remove")
|
@Register("remove")
|
||||||
public void portalRemove(Player player, Portal portal) {
|
public void portalRemove(Player player, Portal portal) {
|
||||||
if (noPermissions(player)) return;
|
if (noPermissions(player)) return;
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren