Class CustomPortal

java.lang.Object
me.xxastaspastaxx.dimensions.customportal.CustomPortal

public class CustomPortal extends Object
The class that contains all the data for a new portal type
  • Constructor Details

    • CustomPortal

      public CustomPortal(String portalId, String displayName, boolean enabled, org.bukkit.Material outsideMaterial, AxisOrFace outsideBlockDir, org.bukkit.Material insideMaterial, org.bukkit.Material lighterMaterial, org.bukkit.Color particlesColor, org.bukkit.Sound breakSound, int minimumHeight, int maximumHeight, int maximumWidth, int minimumWidth, String worldName, boolean buildExitPortal, List<String> allowedWorldsList, int teleportDelay, boolean enableParticles, HashMap<org.bukkit.entity.EntityType,​org.bukkit.entity.EntityType> entityTransformationList, int spawnDelayMin, int spawnDelayMax, HashMap<org.bukkit.entity.EntityType,​Integer> entitySpawnList)
      Constructor of CustomPortal
      Parameters:
      portalId -
      displayName -
      enabled -
      outsideMaterial -
      outsideBlockDir -
      insideMaterial -
      lighterMaterial -
      particlesColor -
      breakSound -
      minimumHeight -
      maximumHeight -
      maximumWidth -
      minimumWidth -
      worldName -
      buildExitPortal -
      allowedWorldsList -
      teleportDelay -
      enableParticles -
      entityTransformationList -
      spawnDelayMin -
      spawnDelayMax -
      entitySpawnList -
  • Method Details

    • getPortalId

      public String getPortalId()
      The id of the portal (the file name without the .yml)
    • getDisplayName

      public String getDisplayName()
    • isEnabled

      public boolean isEnabled()
    • getOutsideMaterial

      public org.bukkit.Material getOutsideMaterial()
    • getAxisOrFace

      public AxisOrFace getAxisOrFace()
    • getInsideMaterial

      public org.bukkit.Material getInsideMaterial()
    • getCombinedID

      public int getCombinedID(boolean zAxis)
      Get the combined id to summon the fake blocks
      Parameters:
      zAxis - true to get the ids for the Z axis
    • getInsideBlockData

      public org.bukkit.block.data.BlockData getInsideBlockData(boolean zAxis)
      Get the BlockData to place the block
      Parameters:
      zAxis - true to get the blockData for the Z axis
    • getLighterMaterial

      public org.bukkit.Material getLighterMaterial()
    • getParticlesColor

      public org.bukkit.Color getParticlesColor()
    • getBreakSound

      public org.bukkit.Sound getBreakSound()
    • getMinimumHeight

      public int getMinimumHeight()
    • getMaximumHeight

      public int getMaximumHeight()
    • getMaximumWidth

      public int getMaximumWidth()
    • getMinimumWidth

      public int getMinimumWidth()
    • getWorldName

      public String getWorldName()
    • getWorld

      public org.bukkit.World getWorld()
    • canBuildExitPortal

      public boolean canBuildExitPortal()
    • getAllowWorldsList

      public List<String> getAllowWorldsList()
    • isAllowedWorld

      public boolean isAllowedWorld(org.bukkit.World world)
    • getTeleportDelay

      public int getTeleportDelay()
    • isEnableParticles

      public boolean isEnableParticles()
    • getMinSpawnTime

      public int getMinSpawnTime()
    • getMaxSpawnTime

      public int getMaxSpawnTime()
    • getEntityTransformationList

      public HashMap<org.bukkit.entity.EntityType,​org.bukkit.entity.EntityType> getEntityTransformationList()
    • getSpawnDelayMin

      public int getSpawnDelayMin()
    • getSpawnDelayMax

      public int getSpawnDelayMax()
    • getEntitySpawnList

      public HashMap<org.bukkit.entity.EntityType,​Integer> getEntitySpawnList()
    • tryIgnite

      public CompletePortal tryIgnite(org.bukkit.entity.Player player, org.bukkit.inventory.ItemStack item, org.bukkit.Location loc)
      Check if there is a portal structure at the location and ignite it
      Parameters:
      player - the player igniting the portal
      item - the item used to ignite the portal
      loc - the location of the portal
      Returns:
      null if there is no portal or the CompletePortal that was ignited
    • isPortalBlock

      public boolean isPortalBlock(org.bukkit.block.Block block)
      Check if the block is portal block
      Parameters:
      block - the block to check
      Returns:
      true if the block is accepted
    • setInsideBlockData

      public void setInsideBlockData(org.bukkit.block.data.BlockData blockData)
      Override the inside block data
      Parameters:
      blockData -
    • getNextSpawn

      public org.bukkit.entity.EntityType getNextSpawn()
      Get the next entity type to spawn from the list
    • canSpawnEntities

      public boolean canSpawnEntities()
      Get if the portal spawns entities
    • getSpawnDelay

      public int getSpawnDelay()
      Get a random spawn delay for the spawn task
    • getEntityTransformation

      public org.bukkit.entity.EntityType getEntityTransformation(org.bukkit.entity.EntityType type)
      Get entitity transformatioion
      Parameters:
      the - type of entity using the portal