CameraAPI
Please note that this plugin is extremely experimental and should be used with caution. It definitely requires improvements or a new and intuitive way of moving the player's character/camera. If you have any thoughts/suggestions please get in touch.
I'm currently working on updating CameraAPI
About
The cameraAPI plugin is just a small plugin which teleports a player ever second to the new location in the path created by using separate locations as way points. It's very clean and doesn't lag too much. Sometimes on big servers the camera might start to seem 'jumpy' but there isn't really anything to be done about that right now.
Commands
You can use this plugin by using the following commands:
- /camera - Displays the help page
- /camera help - Also displays the help page
- /camera list - Lists all of the saved camera paths
- /camera plan - Start planning a camera route
- /camera setpoint - Set a point in the camera route
- /camera cancel - Cancel the planning of your current route
- /camera undo - Undos your last point add
- /camera create <route> - Create your planned path
- /camera play <route> <seconds> - Play a camera route in a specific amount of seconds
- /camera interrupt - If you're playing a route, this interrupts the camera sequence
permissions:
- cameraapi.help
- cameraapi.list
- cameraapi.plan
- cameraapi.setpoint
- cameraapi.cancel
- cameraapi.undo
- cameraapi.create
- cameraapi.delete
- cameraapi.play
- cameraapi.interrupt
You can use these permissions for time-saving purposes:
- cameraapi.use
- Gives you access to cameraapi.help
- Gives you access to cameraapi.list
- Gives you access to cameraapi.play
- Gives you access to cameraapi.interrupt
- cameraapi.*
- Gives you access to every permission node
Developer API
If you're a developer you can use this plugin in your plugins. Here is an example of how you would use it:
// First we get the API instance CameraAPI api = CameraAPI.getInstance(); // Player Player player = (Player) Bukkit.getOfflinePlayer("player"); // Start the travel, (player, <seconds>, locations...) api.travel(player, 15, loc1, loc2, loc3 etc...); // End the travel api.stopTravel(player); //You can use the api to check if someone is currently travelling if(api.isTravelling(player)) { //You can get all of the players currently travelling by using the following line of code Set<Player> travellers = api.getTravellers(); //You can use the api to save. The arguments are (name, locations...) api.savePath("name_of_the_route", loc1, loc2, loc3, loc4); //Load the location points of a path route api.loadPath("name_of_the_route"); //Returns a Location[] object //Delete a specific path route api.deletePath("name_of_the_route"); //Get all of the saved path routes api.getPathRoutes(); //Returns a String[] object
It is possible to check when a point has been hit or when a travel has ended by using the two events listen below. Now please bear in mind that these events are fairly new and the functionality of these events will be extended further as the development of the API progresses.
@EventHandler public void onTravelEnd(TravelEndEvent event) { //Get the player Player player = event.getPlayer(); } @EventHandler public void onTravelPointHit(TravelPointHitEvent event) { //Get the player Player player = event.getPlayer(); //Get the location of the point hit Location location = event.getLocation() }
Source
You can view the source code on github here.
Credit
This plugin was originally inspired by the CameraStudio plugin. However I've revamped it to be much more cleaner, a little simpler and works a lot nicer. My goal was to make a developer friendly version of CameraStudio. I've had permission from the developers of the CameraStudio plugin to revamp it and upload it here.

