Comments (6)
Using PlayerMoveEvent isn't the main problem. The problem is that you are unnecessarily querying whether a player is registered, while that can be cached (at least for this session) in PlayerMoveEvent.
from serverauth.
Yes, you're right! Authenticated users are stored in an array in memory. Accessing it only, instead of doing also Disk I/O or database queries is 99% faster. Then, registration check in each event is useless because if the user is authenticated automatically it's also registered
from serverauth.
@legoboy0215 About the PlayerMoveEvent why should I make a task instead of using PlayerMoveEvent?
from serverauth.
Check PM forums. @PEMapModder wrote a detailed post about this, with performance concerns. I'll try to make a PR, but I haven't got time yet :)
from serverauth.
@legoboy0215 I wrote that when you asked which one was better, and you might not be running the handler per tick. But the difference isn't really that big in this case ;)
from serverauth.
Fixed in v2.12
from serverauth.
Related Issues (20)
- MySQL Table HOT 4
- Timeout doesn't works proper with pmmp
- Feature request: allow move but dont allow get out of the hub
- Server Restart HOT 10
- Mysql
- /unregister name not work after php7 update
- Turkish Language HOT 5
- error HOT 1
- Request: Could you bring out ServerAuth for Nukkit? HOT 1
- error with PocketMine-Steadfast
- my server lags on /register HOT 5
- Plugin Fails to Start Under API 3.0.0 HOT 1
- Drop item bug HOT 1
- Error whit database..
- The console don't read the plugin HOT 1
- add the functions HOT 1
- /Register HOT 1
- ServerAuth v3.0 To-Do HOT 3
- Is there any ways contact with you? HOT 1
- SQL bug
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serverauth.