-
Couldn't load subscription status.
- Fork 535
Closed
Description
Version: Build #2256 (Tue Jun 04)
You can "reproduce" it by
- Turn off the force register. (under # Only registered and logged in players can play.)
- Turn on the inventory protection. (ProtectInventoryBeforeLogIn: false)
- Log in with an not registered account.
Players without registration can't access their inventory. The reason for this, is that the ProtocolLib Adapter doesn't account unregistered players and force register FALSE properly.
Please check this out, since I checked into it, but i can't see where the ProtocolLib inventory protection is called, since it's not in the PlayerListener nor in the AsynchronousJoin.
if (isAuthAvailable) {
// Protect inventory
if (service.getProperty(PROTECT_INVENTORY_BEFORE_LOGIN)) {
ProtectInventoryEvent ev = bukkitService.createAndCallEvent(
isAsync -> new ProtectInventoryEvent(player, isAsync));
if (ev.isCancelled()) {
player.updateInventory();
ConsoleLogger.fine("ProtectInventoryEvent has been cancelled for " + player.getName() + "...");
}
}
This account it properly, but the event call is strange for me. It seems like the ProtocolLib inventory protection is handled independent of that.