定制 ninjaknights/camerautils 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ninjaknights/camerautils

最新稳定版本:0.0.2

Composer 安装命令:

composer require ninjaknights/camerautils

包简介

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

README 文档

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

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 10
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 10
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2025-11-16