Skip to main content

Creating Wormholes

webapp_banner.jpg

What are Wormholes?

Wormholes are a kind of highly efficient portal-to-portal teleportation system. The portals are marked with visual effects.

Wormhole mechanics

Wormholes can do the following:

  • Go through one portal to reach the destination portal, and go from the destination portal back to the first one.
  • Play a sound when players go through them
  • Temporarily blind players while going through them to smooth the transition
  • Push players out to avoid getting caught in a teleport loop
  • Lock players out of teleportation for 5 seconds to avoid getting caught in a teleport loop
  • Automatically disable flight mode when players teleport
  • Play elaborate visual effects
  • Require permissions to use the wormhole
  • Require the use of currency to use the wormhole
  • Notify players and admins when the destination portal is not available

Creating a Wormhole

Wormholes are added as configuration files to the wormholes folder. It is possible to create subfolders, and it is recommended to do so if you are adding wormholes for specific dungeons, under the format ` ~/plugins/EliteMobs/wormholes/dungeonName/dungeonName_identifier.yml`.

Ejection

Yaw and Pitch (The last two digits in the coordinates) in the location1 and location2 will set where the players will get ejected from the wormhole when they travel through it. Let look at this example:

location1: my_world,20,10,20,180,20

With Yaw being set at 180 the player would get ejected facing North, and with Pitch being set at 20 they would also get ejected slightly upwards. If you wish the player to remain in the same block as the wormhole when being ejected, then it is a good idea to set the Pitch to negative to make sure the players do not slide off from the block.

Wormhole Config

The following is an example of a valid Wormhole config:

isEnabled: true
location1: em_primis,1288.5,19,452.5,135,-23
location2: em_primis,1288.5,-39,451.5,180,-1

isEnabled

Sets if the wormhole is enabled.

KeyValuesDefault
isEnabledBooleantrue
Example
isEnabled: true

location1

Specifies the first location for the wormhole.

KeyValuesDefault
location1Stringnone
Example
location1: world_one,50,100,50,0,0

location2

Specifies the second location for the wormhole.

KeyValuesDefault
location2Stringnone
Example
location2: world_two,100,33,100,0,0

location1Text

Sets the display text of the first location.

KeyValuesDefault
location1TextStringnone
Example
location1Text: Awesome Wormhole In World One

create_wormhole_location1text.jpg


location2Text

Sets the display text of the second location.

KeyValuesDefault
location2TextStringnone
Example
location2Text: Awesome Wormhole In World Two

create_wormhole_location2text.jpg


permission

Sets the permission required to use the wormhole.

KeyValuesDefault
permissionStringnone
Example
permission: elitemobs.mypermission

coinCost

Sets the base cost, in elite coins, of using the wormhole. The actual cost may be higher based on the player's guild rank bonus multiplier.

KeyValuesDefault
coinCostDoublenone
Example
coinCost: 2.5

style

Sets the visual shape of the wormhole.

The particles that make up these shapes can cause lag in certain clients. To turn particles off go into Wormholes.yml and set noParticlesMode to true.

KeyValuesDefault
styleNONE / CRYSTAL / ICOSAHEDRON / CUBECUBE
Example
style: CRYSTAL

create_wormhole_style.jpg


particleColor

Sets the color of the particles used in the style setting.

KeyValuesDefault
particleColor0x followed by a hexcode0x800080
Example
particleColor: 0x9f5cdd

create_wormhole_particlecolor.jpg


blindPlayer

Sets if the portal blinds the player for a smoother teleport.

KeyValuesDefault
blindPlayerBooleanfalse
Example
blindPlayer: true

create_wormhole_blind.jpg


sizeMultiplier

Multiplies the size of the portal and the shape set by style. The sizeMultiplier also affects the activation radius - players must be within 1.5 × sizeMultiplier blocks of the wormhole to trigger teleportation.

KeyValuesDefault
sizeMultiplierMultiplier1
Example
sizeMultiplier: 3

Keep in mind that you will have to adjust the Y coordinates of the wormhole after applying the size multiplier.

create_wormhole_size.jpg


Wormhole Config Example

In this example we will make a simple wormhole that takes us from one world into another. Do not forget that wormholes can also just teleport players to a different location in the same world.

isEnabled: true #We enable the worm by setting this value to true
location1: my_world,1.5,11.0,1.5,108.0,5.0 #this is where the wormhole will appear in my_world
location2: my_other_world,766.5,29.0,517.5,-136.0,5.0 #this is where the wormhole will appear in my_other_world
location1Text: "&aGo to My World" #makes a nice display text above wormhole location1
location2Text: "&aGo to My Other World" #makes a nice display text above wormhole location2
permission: eliteperm.coolplayers #only players with this permission will be able to use the wormhole, both for location1 and location2
coinCost: 2 #the players will need to pay 12 elite coins to be able to use the worm hole
style: CRYSTAL #this wormhole will be in the shape of a crystal
particleColor: 0x00ff00 #this will set the wormhole particles to green
blindPlayer: true #the wormhole teleport will blind the player for a short duration to make the transition less jarring
sizeMultiplier: 1.0 #sets how big the shape of the wormhole should be

Performance Issues

The wormhole particles can cause client performance issues for players that are running bedrock. You can configure particle performance in ~plugins\EliteMobs\Wormholes.yml:

  • reducedParticlesMode: true (default) - Reduces particle density by 50% for better performance, especially recommended for servers with Bedrock clients
  • noParticlesMode: true - Completely disables all wormhole particles

Note: Wormholes only render for players within 30 blocks to optimize server performance.