Player position triggering teleports

Posted by jSherz on Game Development See other posts from Game Development or by jSherz
Published on 2012-08-12T21:59:26Z Indexed on 2012/09/12 3:49 UTC
Read the original article Hit count: 161

Filed under:
|
|

I'm developing a Minecraft plugin (bukkit) in which a server admin can create 'portals' - a small region that will teleport any players who enter it. I have the teleportation sorted and I know how I could define areas that the player's position could be tested against.

This would involve an ArrayList containing the zones and then hooking the PlayerMoveEvent so that the ArrayList is searched each time for a matching portal region.

Although this method would work, I doubt that it would be very efficient when 100+ players are all moving around at the same time. Is there a better way of checking a player position against a set of 'zones' / regions?

© Game Development or respective owner

Related posts about java

Related posts about minecraft