โ Getting the Plugin Instance
Access the main plugin instance via:๐ง Accessing Player Flight Data
To access or modify a playerโs flight data, use thePlayerDataManager:
๐ง PlayerData API
ThePlayerData class represents a playerโs flight status and timers.
๐ Getters
โ๏ธ Setters / Modifiers
๐พ Saving Data
You can manually trigger a save of the playerโs data:StorageProvider (e.g., YAML, MySQL, etc.).
๐ ๏ธ Example: Give 10 minutes of flight
๐ Example: Remove 30 seconds of flight
๐ Example: Reset Used Time
๐ก Notes
- Time is always handled in seconds.
save()should be called after making changes if you want to persist them immediately.- If the storage system supports auto-saving or event-based saving, you may not need to call
save()manually.