Skip to content

Even though, it's duplicated. Unregistered unforced players should have their Inventory shown... #1830

@Kongolan

Description

@Kongolan

Version: Build #2256 (Tue Jun 04)

You can "reproduce" it by

  1. Turn off the force register. (under # Only registered and logged in players can play.)
  2. Turn on the inventory protection. (ProtectInventoryBeforeLogIn: false)
  3. 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.

This is a duplicate of:
#1443
#1752

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions