FabricSharedInventory

Quick rating

FabricSharedInventory

No reviews yet

Share inventory across multiple servers

Storage & Organization
Mod Loaders
Fabric
Minecraft

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

Compatibility

Supported Environments

Dev Environment
Client Unsupported
Server Required

About

Project Details

Type
Mod
License
MIT License
Latest Version
2.0.0
Authors

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

Modrinth ID

Resources

External Links

Source Issues Wiki Discord

About

Description

🎒 Shared Inventory — Cross-Server Inventory, Ender Chest & XP Sync

Share your inventory, ender chest, and experience points across multiple Fabric servers in real time.

💾 Powered by PostgreSQL — data is permanently written to disk. Even if the server crashes, your items are safe.


✨ Features

  • 🔄 Real-time sync — Changes are detected within 1 tick (50ms) and instantly saved
  • 🌐 Cross-server — Works across servers running on completely different PCs
  • 💾 Persistent storage — PostgreSQL writes to disk immediately. No data loss on power failure
  • 📴 Offline sync — Players automatically receive the latest data when logging into a server that was offline
  • 🛡️ Startup protection — Server refuses to start if the database is unreachable, with a detailed error log
  • ⚙️ Per-feature toggle — Inventory / Ender Chest / XP can each be enabled or disabled individually per server

📋 Requirements

  • Minecraft 1.20.1
  • Fabric Loader 0.15.0+
  • Fabric API
  • PostgreSQL (free, self-hosted — setup guide below)

🚀 Installation

📦 Step 1 — Install PostgreSQL (click to expand)

PostgreSQL is a free, open-source database that runs as a background service and saves data safely to disk.

Windows

  1. Download the installer from https://www.postgresql.org/download/windows/ → Click "Download the installer" → Select the latest Windows x86-64

  2. Run the installer

    • Keep all defaults
    • Set a password — you will need this later
    • Leave the port as 5432
    • After installation, PostgreSQL starts automatically as a Windows service ✅
    • pgAdmin 4 (a GUI tool) is also installed automatically
  • Open pgAdmin 4 from the Start Menu

  • In the left sidebar, click the terminal icon (PSQL Tool)

  • Enter your password to log in → you will see the postgres=# prompt

  • Run the following command:

    CREATE DATABASE sharedinventory;
    

    → If you see CREATE DATABASE, you are done! ✅

Linux (Ubuntu/Debian)

sudo apt update
sudo apt install postgresql postgresql-contrib
sudo systemctl enable postgresql
sudo systemctl start postgresql
sudo -u postgres psql -c "CREATE DATABASE sharedinventory;"
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'yourpassword';"

🗂️ Step 2 — Install the Mod (click to expand)
  1. Download shared-inventory-2.0.0.jar
  2. Place it in your server's mods/ folder
  3. Make sure Fabric API is also in your mods/ folder
  4. The PostgreSQL JDBC driver is bundled inside the mod — no extra files needed ✅

⚙️ Step 3 — Configure (click to expand)

Start the server once — the config file will be auto-generated at:

config/shared-inventory.json

Edit it with your PostgreSQL connection info:

{
  "database": {
    "host": "localhost",
    "port": 5432,
    "name": "sharedinventory",
    "user": "postgres",
    "password": "YOUR_PASSWORD_HERE"
  },
  "sync": {
    "inventory": true,
    "ender_chest": true,
    "experience": true
  },
  "behavior": {
    "save_interval_ticks": 200
  }
}

Restart the server. If you see this in the log, everything is working:

[SharedInventory] PostgreSQL connection successful!
[SharedInventory] Initialization complete! Ready to sync.

🖥️ Multi-PC Setup — Different Computers (click to expand)

If your servers run on different PCs, all of them must point to the same single PostgreSQL instance.

On the PC running PostgreSQL:

  1. Edit postgresql.conf:

    listen_addresses = '*'
    

    Location: C:\Program Files\PostgreSQL\18\data\postgresql.conf

  2. Edit pg_hba.conf and add at the bottom:

    host    all    all    0.0.0.0/0    md5
    
  3. Restart PostgreSQL and open port 5432 in your firewall

    • Windows Firewall → allow inbound on port 5432

On each Minecraft server's config:

Minecraftserver/config/shared-inventory.json

Set host to the IP address of the PC running PostgreSQL:

"host": "PostgreSQL IP"

📊 Config Reference (click to expand)
Key Default Description
database.host localhost PostgreSQL server address
database.port 5432 PostgreSQL port
database.name sharedinventory Database name
database.user postgres Username
database.password password Password
sync.inventory true Sync main inventory
sync.ender_chest true Sync ender chest
sync.experience true Sync experience (level & XP bar)
behavior.save_interval_ticks 200 Periodic save interval (20 ticks = 1 sec)

Changes are detected every tick. save_interval_ticks only controls the forced periodic save for players with no recent changes.


❗ Troubleshooting (click to expand)

Server won't start — "Cannot connect to PostgreSQL"

  • Check that PostgreSQL is running
    • Windows: services.mscpostgresql-x64-18 should show "Running"
    • Linux: sudo systemctl status postgresql
    • Check the password in config/shared-inventory.json
    • Make sure the database sharedinventory has been created

Password authentication failed

  • The password field in your config does not match your PostgreSQL password
  • Open config/shared-inventory.json and correct the password field

📄 License — MIT




🎒 Shared Inventory — 複数サーバー間インベントリ・エンダーチェスト・経験値リアルタイム同期

複数のFabricサーバー間で、インベントリ・エンダーチェスト・経験値をリアルタイムに共有します。

💾 PostgreSQL を使用しているため、データはディスクに永続保存されます。サーバーがクラッシュしてもアイテムは失われません。


✨ 特徴

  • 🔄 リアルタイム同期 — 変化を1tick(50ms)以内に検出し、即座にDBへ保存
  • 🌐 クロスサーバー対応 — 別々のPCで動作している複数サーバー間でも同期可能
  • 💾 永続ストレージ — PostgreSQL は書き込みを即座にディスクに記録。突然の電源断でもデータは安全
  • 📴 オフライン同期 — サーバーがオフラインだった間の変化も、次回ログイン時に自動で最新データを適用
  • 🛡️ 起動時保護 — DBへの接続に失敗した場合、サーバーの起動を拒否して詳細なエラーをログに出力
  • ⚙️ 機能ごとのON/OFF — インベントリ・エンダーチェスト・経験値をサーバーごとに個別に有効/無効化可能

📋 動作要件

  • Minecraft 1.20.1
  • Fabric Loader 0.15.0+
  • Fabric API
  • PostgreSQL(無料・自己ホスト型DB、下記セットアップ参照)

🚀 導入方法

📦 STEP 1 — PostgreSQL のインストール(クリックで展開)

PostgreSQL は無料のオープンソースDBです。バックグラウンドサービスとして動作し、データをディスクに安全に保管します。

Windows の場合

  1. インストーラーをダウンロード https://www.postgresql.org/download/windows/「Download the installer」 → 最新版の Windows x86-64 を選択

  2. インストーラーを実行

    • 全ての項目はデフォルトのままでOK
    • パスワードは必ず設定する(後でコンフィグに入力します)
    • ポートは 5432 のまま
    • インストール完了後、PostgreSQL はWindowsサービスとして自動起動します ✅
    • pgAdmin 4(GUI管理ツール)も同時に自動インストールされます
  • スタートメニューから pgAdmin 4 を起動

  • 左側のサイドバーにあるターミナルアイコン(PSQL Tool)をクリック

  • パスワードを入力してログイン → postgres=# が表示される

  • 以下を入力して Enter を押す

    CREATE DATABASE sharedinventory;
    

    CREATE DATABASE と表示されれば成功 ✅

Linux(Ubuntu/Debian)の場合

# インストール
sudo apt update
sudo apt install postgresql postgresql-contrib

# 自動起動の設定
sudo systemctl enable postgresql
sudo systemctl start postgresql

# データベースの作成
sudo -u postgres psql -c "CREATE DATABASE sharedinventory;"

# パスワードの設定(yourpassword を変更してください)
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'yourpassword';"

🗂️ STEP 2 — Mod のインストール(クリックで展開)
  1. shared-inventory-2.0.0.jar をダウンロード
  2. サーバーの mods/ フォルダに入れる
  3. Fabric APImods/ フォルダに入っていることを確認
  4. PostgreSQL の JDBC ドライバは Mod内にバンドル済み のため、追加ファイルは不要 ✅

⚙️ STEP 3 — コンフィグの設定(クリックで展開)

サーバーを一度起動すると、以下のパスにコンフィグファイルが自動生成されます:

config/shared-inventory.json

テキストエディタで開き、PostgreSQLの接続情報を入力します:

{
  "database": {
    "host": "localhost",
    "port": 5432,
    "name": "sharedinventory",
    "user": "postgres",
    "password": "STEP1で設定したパスワード"
  },
  "sync": {
    "inventory": true,
    "ender_chest": true,
    "experience": true
  },
  "behavior": {
    "save_interval_ticks": 200
  }
}

保存してサーバーを再起動します。ログに以下が表示されれば成功です:

[SharedInventory] PostgreSQL への接続成功!
[SharedInventory] 初期化完了! 同期の準備ができました。

🖥️ 複数PCでサーバーを動かす場合の追加設定(クリックで展開)

異なるPCでサーバーを動かす場合、すべてのサーバーが同じ1台のPostgreSQLを参照するよう設定します。

PostgreSQL がインストールされているPC側の設定:

  1. postgresql.conf を編集:

    listen_addresses = '*'
    

    ファイルの場所(Windows): C:\Program Files\PostgreSQL\18\data\postgresql.conf ファイルの場所(Linux): /etc/postgresql/*/main/postgresql.conf

  2. pg_hba.conf の末尾に以下を追加:

    host    all    all    0.0.0.0/0    md5
    
  3. PostgreSQL を再起動し、ファイアウォールでポート 5432 を開放

    • Windows: Windowsファイアウォール → ポート5432を受信許可

各Minecraftサーバーのコンフィグ:

Minecraftserver/config/shared-inventory.json

host を PostgreSQL が動いているPCのIPアドレスに変更:

"host": "PostgreSQL IP"

📊 コンフィグ項目一覧(クリックで展開)
項目 デフォルト値 説明
database.host localhost PostgreSQLサーバーのアドレス
database.port 5432 ポート番号
database.name sharedinventory データベース名
database.user postgres ユーザー名
database.password password パスワード
sync.inventory true メインインベントリの同期
sync.ender_chest true エンダーチェストの同期
sync.experience true 経験値(レベル・XPバー)の同期
behavior.save_interval_ticks 200 定期保存の間隔(20tick = 1秒)

変化の検出は毎tick行われます。save_interval_ticks は変化がなかった場合の強制保存間隔です。


❗ トラブルシューティング(クリックで展開)

「PostgreSQL に接続できません」と出てサーバーが起動しない

  • PostgreSQL が起動しているか確認
    • Windows: services.mscpostgresql-x64-18 が「実行中」か確認
    • Linux: sudo systemctl status postgresql
    • config/shared-inventory.json のパスワードを確認
    • データベース sharedinventory が作成されているか確認

「パスワード認証に失敗しました」というエラーが出る

  • config/shared-inventory.jsonpassword が間違っています
  • PostgreSQL のインストール時に設定したパスワードを正確に入力してください

📄 ライセンス — MIT

Screenshots

Gallery

This project has no gallery images yet.

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

<1,000
Downloads
Last Updated
CurseForge
Created
Last synced
When ModDex last fetched this project from CurseForge or Modrinth. Every project is re-checked on a schedule, and any project that ships a new file is synced automatically within hours of the release.
New file updates sync automatically
How syncing works