ninjaknights/camerautils

PocketMine-MP virion designed to assist developers in creating camera-related plugins.

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 4

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/ninjaknights/camerautils

0.0.2 2025-11-23 07:50 UTC

This package is auto-updated.

Last update: 2025-11-25 16:50:27 UTC


README

CameraUtils Banner

CameraUtils is a PocketMine-MP virion designed to help developers/users use Camera Features.

GitHub stars GitHub forks
Github downloads
GitHub license GitHub issues
Microsoft Docs Packagist

๐Ÿ”Œ Installation

Add CameraUtils to your project via Composer:

composer require ninjaknights/camerautils

๐Ÿ”Œ Basic Setup

Before using the API, you must register it in your pluginโ€™s onLoad() or onEnable() method:

<?php

use ninjaknights\CameraUtils\APIRegistry;
use ninjaknights\CameraUtils\preset\PresetRegistry;
use ninjaknights\CameraUtils\CameraPlayer;

class MyPlugin extends PluginBase implements Listener{
	public function onEnable(): void {
		// Register CameraUtils API
		if(!APIRegistry::isRegistered()){
			APIRegistry::register($this);
		}
		// Register default camera presets
		PresetRegistry::registerDefaults();
		// Custom Preset should be registered along side this
		PresetRegistry::registerPreset(new MoviePreset());
		// It should be a class extending ninjaknights\CameraUtils\preset\types\CustomPreset
		// class MoviePreset extends CustomPreset{}
	}

	public function onJoin(PlayerJoinEvent $e): void {
		// Implement a single instance for the player
		// you can still use $a = (new CameraAPI($player))->play();
		// instead of the below one if you want to create temp instances of the class
		CameraPlayer::init($e->getPlayer());
		// You can then do CameraPlayer::get($player)->play();
	}
}

๐Ÿ”ง Usage & Examples

Check out our detailed examples and documentation:

  • ๐Ÿ“ Example Code: See the examples/ folder for practical implementations
  • ๐Ÿ“– Detailed Guide: USAGE.md for comprehensive documentation

๐Ÿ“ฎ Contributing

  • Found a bug or wish to suggest some changes? Open an issue
  • Want to contribute? Fork the repository and make a pull request!

๐Ÿ’ฌ Get Help & Connect to Us

Discord Website

๐Ÿ“œ License

This project is licensed under the GPL-3.0 License - see the LICENSE file for details.

Made with โค๏ธ by NinjaKnights

ยฉ 2025-2026 NinjaKnights
Website | Discord