Class CustomPortal
java.lang.Object
me.xxastaspastaxx.dimensions.customportal.CustomPortal
The class that contains all the data for a new portal type
-
Constructor Summary
ConstructorDescriptionCustomPortal(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 -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
Get if the portal spawns entitiesorg.bukkit.Sound
int
getCombinedID(boolean zAxis)
Get the combined id to summon the fake blocksorg.bukkit.entity.EntityType
getEntityTransformation(org.bukkit.entity.EntityType type)
Get entitity transformatioionHashMap<org.bukkit.entity.EntityType,org.bukkit.entity.EntityType>
org.bukkit.block.data.BlockData
getInsideBlockData(boolean zAxis)
Get the BlockData to place the blockorg.bukkit.Material
org.bukkit.Material
int
int
int
int
int
int
org.bukkit.entity.EntityType
Get the next entity type to spawn from the listorg.bukkit.Material
org.bukkit.Color
The id of the portal (the file name without the .yml)int
Get a random spawn delay for the spawn taskint
int
int
org.bukkit.World
getWorld()
boolean
isAllowedWorld(org.bukkit.World world)
boolean
boolean
boolean
isPortalBlock(org.bukkit.block.Block block)
Check if the block is portal blockvoid
setInsideBlockData(org.bukkit.block.data.BlockData blockData)
Override the inside block datatryIgnite(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
-
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
The id of the portal (the file name without the .yml) -
getDisplayName
-
isEnabled
public boolean isEnabled() -
getOutsideMaterial
public org.bukkit.Material getOutsideMaterial() -
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
-
getWorld
public org.bukkit.World getWorld() -
canBuildExitPortal
public boolean canBuildExitPortal() -
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
-
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 portalitem
- the item used to ignite the portalloc
- 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
-