// Path: src/main/java/com/sekwah/advancedportals/bukkit/api/portaldata/PortalArg.java
// public class PortalArg {
// 
//     public final String argName;
//     public final String value;
// 
//     public PortalArg(String argName, String value/*, int type*/) {
//         this.argName = argName;
//         this.value = value;
//         // may be used if values need to be 100% not string
//         //this.type = type;
//     }
// 
// }


import com.sekwah.advancedportals.bukkit.api.portaldata.PortalArg;
import org.bukkit.Location;
import org.bukkit.Material;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;

    // TODO think of relaying out the data input to a more logical format.
    public AdvancedPortal(String portalName, Material trigger, String destination, Location pos1, Location pos2, PortalArg... portalArgs) {
        this(portalName, trigger, pos1, pos2, pos2.getWorld().getName(), portalArgs);
        this.destiation = destination;
    }

    public AdvancedPortal(String portalName, Material trigger, Location pos1, Location pos2, PortalArg... portalArgs) {
        this(portalName, trigger, pos1, pos2, pos2.getWorld().getName(), portalArgs);
    }

    public AdvancedPortal(String portalName, Material trigger, String destination, Location pos1, Location pos2, String worldName, PortalArg... portalArgs) {
        this(portalName, trigger, pos1, pos2, worldName, portalArgs);
        this.destiation = destination;
    }

    public AdvancedPortal(String portalName, Material trigger, Location pos1, Location pos2, String worldName, PortalArg... portalArgs) {
        this(portalName, new HashSet<>(Collections.singletonList(trigger)), pos1, pos2, worldName, portalArgs);
    }

    public AdvancedPortal(String portalName, Set<Material> triggers, Location pos1, Location pos2, String worldName, PortalArg... portalArgs) {
        this.portalName = portalName;
        this.triggers = triggers;
        this.pos1 = pos1;
        this.pos2 = pos2;
        this.worldName = worldName;
        this.portalArgs = portalArgs;
    }

    public String getArg(String arg) {
// Path: src/main/java/com/sekwah/advancedportals/bukkit/api/portaldata/PortalArg.java
// public class PortalArg {
// 
//     public final String argName;
//     public final String value;
// 
//     public PortalArg(String argName, String value/*, int type*/) {
//         this.argName = argName;
//         this.value = value;
//         // may be used if values need to be 100% not string
//         //this.type = type;
//     }
// 
// }


// Path: src/main/java/com/sekwah/advancedportals/bukkit/portals/AdvancedPortal.java
import com.sekwah.advancedportals.bukkit.api.portaldata.PortalArg;
import org.bukkit.Location;
import org.bukkit.Material;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;


    // TODO think of relaying out the data input to a more logical format.
    public AdvancedPortal(String portalName, Material trigger, String destination, Location pos1, Location pos2, PortalArg... portalArgs) {
        this(portalName, trigger, pos1, pos2, pos2.getWorld().getName(), portalArgs);
        this.destiation = destination;
    }

    public AdvancedPortal(String portalName, Material trigger, Location pos1, Location pos2, PortalArg... portalArgs) {
        this(portalName, trigger, pos1, pos2, pos2.getWorld().getName(), portalArgs);
    }

    public AdvancedPortal(String portalName, Material trigger, String destination, Location pos1, Location pos2, String worldName, PortalArg... portalArgs) {
        this(portalName, trigger, pos1, pos2, worldName, portalArgs);
        this.destiation = destination;
    }

    public AdvancedPortal(String portalName, Material trigger, Location pos1, Location pos2, String worldName, PortalArg... portalArgs) {
        this(portalName, new HashSet<>(Collections.singletonList(trigger)), pos1, pos2, worldName, portalArgs);
    }

    public AdvancedPortal(String portalName, Set<Material> triggers, Location pos1, Location pos2, String worldName, PortalArg... portalArgs) {
        this.portalName = portalName;
        this.triggers = triggers;
        this.pos1 = pos1;
        this.pos2 = pos2;
        this.worldName = worldName;
        this.portalArgs = portalArgs;
    }

    public String getArg(String arg) {
        for (PortalArg portalArg : this.portalArgs) {