Class PortalCreationHelper
java.lang.Object
org.sgrewritten.stargate.util.portal.PortalCreationHelper
A helper class for creating new portals
-
Method Summary
Modifier and TypeMethodDescriptionstatic RealPortal
createPortal
(Network network, String name, String destination, String targetServer, Set<PortalFlag> flags, GateAPI gate, UUID ownerUUID, StargateAPI stargateAPI, String metaData) Creates a new portal of the correct typestatic RealPortal
createPortal
(Network network, PortalData portalData, Gate gate, StargateAPI stargateAPI) Creates a new portal of the correct type
-
Method Details
-
createPortal
public static RealPortal createPortal(Network network, String name, String destination, String targetServer, Set<PortalFlag> flags, GateAPI gate, UUID ownerUUID, StargateAPI stargateAPI, String metaData) throws TranslatableException Creates a new portal of the correct type- Parameters:
network
-The network the portal belongs to
name
-The name of the portal
destination
-The destination of the portal
targetServer
-The portal's target server (if bungee)
flags
-The flags enabled for the portal
gate
-The gate belonging to the portal
ownerUUID
-The UUID of the portal's owner
- Returns:
A new portal
- Throws:
TranslatableException
-If the portal's name is invalid
-
createPortal
public static RealPortal createPortal(Network network, PortalData portalData, Gate gate, StargateAPI stargateAPI) throws TranslatableException Creates a new portal of the correct type- Parameters:
network
-The network the portal belongs to
portalData
-Data of the portal
gate
-The gate belonging to the portal
- Returns:
A new portal
- Throws:
TranslatableException
-If the portal's name is invalid
-