Download Public Ender Chest — Minecraft Mods — MetaMods
Public Ender Chest

Public Ender Chest

Active

Downloads

3

Last update

4 months ago

Versions

1.21 — 1.21.8
Server
Fabric
Game mechanics
Storage
Utils

Public Ender Chest

This server-side Fabric Minecraft mod with flexible configuration adds a shared storage accessible through Ender Chest blocks. The mod includes a built-in logging system for server administrators to track all changes in this public inventory, as well as other useful configuration features.

Accessing the Public Ender Chest

Players can open the shared inventory by crouching and right-clicking on an Ender Chest block. Alternatively, they can hold an Ender Chest item in their hand and right-click to open it.

Usage of the shared storage can be toggled using the command /publicenderchest usePublicInventory [true|false] so it doesn't interfere with placing blocks on an Ender Chest.

When hovering the cursor over an item stack in the public inventory, information is displayed about which player placed that item and how long ago it happened.

Server operators can also open the public Ender Chest using the command /publicenderchest openPublicEnderChestInventory.

Configuration

The mod's configuration file is located at /config/publicenderchest.toml. Here you can configure:

  • Player Blacklist: Enabling and using a list of players who are denied access to the public Ender Chest
  • Dimension Blacklist: Prohibiting the use of the public Ender Chest in specific dimensions
  • Database Cleanup: Setting up the deletion of records based on their age in days

Server operators bypass both blacklists. Commands are available for editing settings (except the blacklists themselves) via /publicenderchest config. The configuration can be reloaded using /publicenderchest config reload.

Logging System

The built-in logging system allows administrators to track all player interactions with the public Ender Chest. Logs display the operation time, player name, number of items added or removed, and the item stack itself.

To query data from the database, use the command:

/publicenderchest database query [before|after] <days> <hours> <minutes> <seconds> <playerName>

The parameters for days, hours, minutes, and seconds determine the time search range depending on the selected time search type:

  • Before: Returns all records from the beginning until the current time minus the specified period. For example, /publicenderchest database query before 0 1 0 0 will show all logs from the beginning until one hour ago
  • After: Returns records between the current time and the current time minus the specified period. For example, /publicenderchest database query after 1 0 0 0 will show logs from the last 24 hours

It's recommended to use after queries as they require processing significantly fewer records compared to before, which scans all records from the beginning to the specified time.

The optional playerName parameter allows searching for actions by a specific player. The returned logs will correspond to actions by players with the given name, regardless of their UUID.

When executing a query, logs are displayed in chat with pagination:

  • Hover over the player's name to see their full UUID. Click on the name to copy the UUID to clipboard
  • Hover over the item identifier to see complete item stack information

At the bottom of the log list, there are << and >> icons to navigate to the previous or next page.

There's also a database cleanup command:

/publicenderchest database purge

It deletes log records older than the time specified in the purge_older_than_x_days configuration setting. You can use:

/publicenderchest database purge <entriesOlderThanDays>

to clean up records by specifying the number of days in the command instead of the configuration value. The database is also automatically cleaned up when the server shuts down. All database-related commands are only available to operators.

Optional Client-Side Functionality

The mod can be installed on the client. This allows opening the public Ender Chest by right-clicking on an Ender Chest item in the inventory while holding the Ctrl or Alt keys.

Additionally, installing the mod on the client ensures proper synchronization of item stack information between the server and client, enabling correct operation with mods like Item Scroller and reducing item flickering when quickly moving items between inventories.

Support

If you want to report a bug or suggest an improvement, you can do so through the mod's issue tracking system.

Credits

  • Thanks to Kioku for the mod's icon and banner.
Project members
ArkoSammy12

ArkoSammy12

Developer

swanslab

swanslab

Developer

Created: 27 Jul 2024

ID: 48869