Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pmmp/sessionsdemo
Demo plugin showing how to manage plugin player data at runtime (without custom Player classes)
https://github.com/pmmp/sessionsdemo
pocketmine-example-code pocketmine-plugin
Last synced: about 1 month ago
JSON representation
Demo plugin showing how to manage plugin player data at runtime (without custom Player classes)
- Host: GitHub
- URL: https://github.com/pmmp/sessionsdemo
- Owner: pmmp
- License: unlicense
- Created: 2022-11-15T21:23:25.000Z (almost 2 years ago)
- Default Branch: stable
- Last Pushed: 2023-06-02T00:48:12.000Z (over 1 year ago)
- Last Synced: 2024-09-26T10:00:11.682Z (about 2 months ago)
- Topics: pocketmine-example-code, pocketmine-plugin
- Language: PHP
- Homepage:
- Size: 8.79 KB
- Stars: 19
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SessionsDemo
Demo plugin showing how to manage plugin player data at runtime (without custom Player classes)
## Background
For far too long I've sat back and watched people misuse `PlayerCreationEvent` for things it wasn't designed for, such as:- Tracking extra data on the player (e.g. kill count)
- Adding extra API methods to the playerCustom player classes are one of the worst possible solutions to this problem, so this plugin aims to show a way to track plugin-player data in a way that is:
- Extremely simple
- Easy to read and write
- Multiple-plugin friendly (no more fighting for your player class to be registered)
- Almost impossible to break## Can I copy this code?
I hope someone does. If it stops one person from abusing `PlayerCreationEvent`...