Hi.. I want to make portals, and those with same material structure are linked. So if i made 2 portals out of sponge, those will be linked. No matter which world they are in.. Any help/start out? ps: Yes, I know java and the bukkit API xD -Raino
Portals are easy to make, just check the loction of the player with the playermove event (and check on which block they stand...) Linking is the difficult i think, but maybe you can do it so: Get the second portal, get the location of a block in that portal, and teleport them to that block. And if you want frequencies for your portals, use signs, and if the 2 line is equal to the second line on that other portal, then they are linked with each other
You would have to store the portals in your plugin, because looking for the portal in all worlds would take way to long. i would do that with a event to check if portals are created or destroyed and then put them (or remove) in an List.
I know how I would store them, and the teleporting. I need to get WHEN they build a portal, and set the inside with still water
I would use the blockplace and blockdestroy event. then i would look if the block is part of a portal and when it is i would use the world setBlock method to fill the space in the portal.
You have a structure like this: #### #++# #++# #++# #### Then you would check if the block is one of the # blocks and is it is you would destroy the portal. To create it i would use the block that creates the portal (maybe fire) and check if the portal around is compleed.
It should "light" itself when its recognised as a portal, but the checking is the part i need help on..