Skip to content

Ender chest items are lost when permission-based rows are reduced #1773

Description

@GoodrichDev

Spark link

n/a

Expected behavior

When ender_chest.six_rows and permission-based ender chest rows are enabled, removing a player’s higher row permission should only hide those rows from access. Items stored in the now-hidden slots should remain saved and become available again if the player regains the required permission.

Observed/Actual behavior

If a player has purpur.enderchest.rows.six, stores items in rows 4-6, then later loses that permission, those items can be lost on the next login/save.

The ender chest container reports its size based on the player’s current row permission, and the load/save logic also uses that reported size. When the player’s permission is reduced, slots above the new allowed size are skipped during load/save and are omitted from saved EnderItems.

Steps/models to reproduce

  • /lp user USER permission set purpur.enderchest.rows.six true
  • Fill up Ender Chest
  • /lp user USER permission set purpur.enderchest.rows.five true
  • /lp user USER permission set purpur.enderchest.rows.six false
  • Logout and back in (refresh perms)
  • /lp user USER permission set purpur.enderchest.rows.six true
  • Logout and back in (refresh perms)
  • Missing items from last row

Purpur version

Purpur Build 2568

Agreements

  • I am running the latest version of Purpur available from https://purpurmc.org/downloads.
  • I have searched for and ensured there isn't already an open issue regarding this.
  • I ticked all the boxes without actually reading them
  • My version of Minecraft is supported by Purpur.

Other

Originally reported in: CraftCanvasMC/Canvas#200
Fixed in: CraftCanvasMC/Canvas#201

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions