mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Strip some junk out of IPlayer
these methods have better pathways through Server directly. Also, setBanned() does not allow customising the reason for banning or the duration, nor does isBanned() account for IP bans because the code is so old ... better to force dependence on a central code path to avoid these inconsistencies. I want to do the same thing for OP, but that's a separate problem due to its effects on the permission system.
This commit is contained in:
@ -597,7 +597,10 @@ This version features substantial changes to the network system, improving coher
|
||||
- `Player->updatePing()`: moved to `NetworkSession`
|
||||
- `Player->dataPacket()`: replaced by `NetworkSession->sendDataPacket()`
|
||||
- `Player->sendDataPacket()`: replaced by `NetworkSession->sendDataPacket()`
|
||||
|
||||
- `IPlayer->isWhitelisted()`: use `Server->isWhitelisted()` instead
|
||||
- `IPlayer->setWhitelisted()`: use `Server->setWhitelisted()` instead
|
||||
- `IPlayer->isBanned()`: this was unreliable because it only checked name bans and didn't account for plugin custom ban systems. Use `Server->getNameBans()->isBanned()` and `Server->getIPBans()->isBanned()` instead.
|
||||
- `IPlayer->setBanned()`: use `Server` APIs instead
|
||||
|
||||
### Plugin
|
||||
- API version checks are now more strict. It is no longer legal to declare multiple minimum versions on the same major version. Doing so will now cause the plugin to fail to load with the message `Multiple minimum API versions found for some major versions`.
|
||||
|
Reference in New Issue
Block a user