This CMI function allows you to create portals through which you can execute commands on the players that cross them.
Portals support specialised commands.
To create a portal, you need a wooden hoe (default selection tool), cmi.command.portals and cmi.select permission.
1. Now you select the area (like worldedit) in which you want to create the portal. The selected area is highlighted by particles.
2. Now you have to do this command: /cmi portals new [Name]. Example: /cmi portals new Test1
3. Now you have to set the destination point, where the player will be teleport.
4. Once this is done, we can customize the portal. Just write in chat /cmi portals edit Test1 and a GUI will open where we can choose:
5. Now let's see how to add commands. Click on the black wool on the bottom.
- Enable/disable the portal
- Redefine area from current selection
- Enable/disable particles
- Particle type (36 different type)
- Particle amount
- Percentage of sides shrieked particles
- Activation range of particles
- Teleport to portal location
- Teleport to portal target location
- Choose if perform commands without valid teleport location or not
- Edit portal commands
- Set teleport location
- Save changes to file
- Remove portal
6. Click on + sign to add new command, which will wait until you enter new command into chat window. Don't start with / as regular commands, simply write basic command. [playerName] variable can be used to include players who interacted name. Enter new command into chat and press enter.
7. Here it is, now who will enter in that portal will be teleported and the fly will be removed. If we want we can remove the command that gives the effect of blindness by clicking on the X.
8. Here's how a portal is saved in the Portals.yml file. I prefer to manage portal commands through the file.
- cmi effect [playerName] blindness 2 1 -s
- cmi fly [playerName] falseATTENTIONIn the config file are automatically assigned cmi effect [playerName] blindness 2 1 -s If you want to remove it, just replace it with none.
# Defines in milliseconds how often to check if player entered portal or not
# Bigger numbers can help slightly lower server load but small portals, 1 block depth without back wall can be passed throw without teleportations if player moves fast enought
# Defines in milliseconds how often to check if player entered portal range for particles to apear
# Perform commands on teleport or not
# Commands to be performed on teleport event
- cmi effect [playerName] blindness 2 1 -sEXTRA
- Portals will work over bungeecord network and you can teleport players across your servers. How to setup portal? It cant be simpler. Make portal, open portal UI, click on set location button and you will get message in chat box. Travel to desired location, same server or on bungee (both servers should have CMI) and click on that message. You are done. Thats it... Travel to location and click on chat. No commands, nothing. Just like that.
- Portal commands will work over bungee network and will be applied after player is teleported.
You can add as many commands as you want and specialised commands can be utilised.