Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/).

## [Unreleased]

## [2.2.0] - 2026-11-20

### Added

- Added optional Bedrock detection through Geyser-Spigot or Floodgate, including support for linked accounts.
- Bedrock players can hold a SmartPacker and use it on a block to open a native form for inventory packing, chest packing, and toggling auto mode. A chest-style menu provides the same actions if the form is unavailable.
- Bedrock chest packing requires the player to open the chest by using the SmartPacker on it after selecting **Pack Chest**.
- The Bedrock exclusion menu has an Edit Mode control for next-run skips and permanent exclusions. Both actions use the same click or tap.

### Fixed

- `/pack` autocomplete suggests subcommands based on the player's permissions and the server's settings on both Java and Bedrock.
- Exclusion chat messages report only the final changes when edits are applied. Canceled edits produce no item change messages.
- SmartPacker lore shows the carrying player's controls and auto-mode status. Auto-mode controls and hints are hidden when the server disables auto-pack or uses cooldown mode.
- Java players can now use shift-right-click on the SmartPacker to turn auto mode on or off.

---

## [2.1.0] - 2026-10-27
Expand Down
124 changes: 80 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,11 @@ SmartPack packs configured inventory materials into compact storage forms, such
- Optional Smart Packer cooldown mode with live tooltip updates and a ready ActionBar notice.
- Chest inventory packing through `/pack chest` or the Smart Packer item.
- Per-player material exclusions through `/pack exclude`.
- Bedrock SmartPacker actions and exclusion controls for servers using Geyser.
- Configurable crafting-table requirements.
- Reversible-recipe warnings and optional strict disabling.
- Inventory-full feedback with extra-slot estimates.

## Documentation

The full setup and usage guide lives in the GitHub Wiki:

- [SmartPack Wiki](https://github.com/Crosis47/SmartPack/wiki)
- [Installation](https://github.com/Crosis47/SmartPack/wiki/Installation)
- [Commands and Permissions](https://github.com/Crosis47/SmartPack/wiki/Commands-and-Permissions)
- [Configuration](https://github.com/Crosis47/SmartPack/wiki/Configuration)
- [Chest Packing](https://github.com/Crosis47/SmartPack/wiki/Chest-Packing)
- [Recipe Configuration](https://github.com/Crosis47/SmartPack/wiki/Recipe-Configuration)
- [Troubleshooting](https://github.com/Crosis47/SmartPack/wiki/Troubleshooting)

## Requirements

- Target compatibility: Paper 1.21.11 through 26.3 (one plugin JAR)
Expand All @@ -51,12 +40,77 @@ minimum server API, not the newest supported server. SmartPack uses public
Bukkit/Paper APIs and does not depend on Minecraft internals or remapping.
Versions below 1.21.11 are not supported.

Validation for 2.1.0: compilation passed against the 1.21.11, 26.1.2, and 26.3
APIs, with Java 21 bytecode verified. The identical 26.3-built JAR passed the
server compatibility probe on Paper 1.21.11 (build 131), 26.1.2 (build 53), and
26.3 (build 227), running locally with JDK 26. CI additionally targets the
Java 21/25 runtimes listed below. Player-driven interactions still need the
in-game checks described below.
## Install

1. Download the SmartPack JAR from [GitHub Releases](https://github.com/Crosis47/SmartPack/releases) and put it in your Paper server's `plugins/` directory.
2. Start the server once to generate `plugins/SmartPack/config.yml`.
3. Run `/pack` to pack inventory materials, or `/pack exclude` to choose materials to skip. If `/pack` asks for a crafting table, stand near one and try again.
4. After changing the config, run `/pack reload` with `smartpack.reload` permission.

### Bedrock setup

SmartPack detects Bedrock sessions through Geyser-Spigot or Floodgate on the
Paper server, including linked accounts. If Geyser runs on a proxy, install
Floodgate on the Paper backend and configure
[Floodgate data forwarding](https://geysermc.org/wiki/floodgate/api/#using-the-api-on-backend-servers).

## Commands

| Command | What it does | Permission |
| --- | --- | --- |
| `/pack` | Pack configured inventory materials | `smartpack.use` |
| `/pack chest` | Pack the chest you are looking at in command mode | `smartpack.chest` |
| `/pack exclude` | Choose materials to skip | `smartpack.use` |
| `/pack auto` | Toggle automatic packing in command mode | `smartpack.auto` |
| `/pack reload` | Reload the config | `smartpack.reload` |

All `/pack` subcommands require `smartpack.use`. Type `/pack` followed by a
space to see the subcommands available to you. On Bedrock, command suggestions
must be enabled in Geyser.

### SmartPacker on Java and Bedrock

With `activation.mode: SMART_PACKER_ITEM`, Java players right-click the
SmartPacker in their inventory to pack, or shift-right-click to toggle auto mode.
Right-clicking it while a chest is open packs that chest.

Detected Bedrock players hold the SmartPacker and use it on a block to open its
action form. Select **Pack Inventory**, **Pack Chest**, or **Enable Auto** /
**Disable Auto**. After selecting **Pack Chest**, use the held SmartPacker on a
chest within 15 seconds. SmartPack packs the chest only if it opens for you.
If the server cannot send a form, the chest-style menu provides the same actions.

The Bedrock form and the item lore show whether auto mode is enabled for your
account. The form only offers the action if you have `smartpack.auto` and the
server allows auto-pack. In cooldown mode, the item shows the cooldown in place
of auto-mode instructions.

### Exclusions on Java and Bedrock

Open `/pack exclude`. Java players left-click materials for next-run skips and
right-click for permanent exclusions. Their menu has no mode button.

On Bedrock, use **Edit Mode** in the bottom row to switch between **Next Run
Only** and **Permanent**, then click or tap the materials you want to change.
The menu opens in Next Run Only mode. Your selected mode stays active as you
change pages.

Permanent exclusions survive server restarts. **Apply Changes** or closing the
menu keeps edits; **Cancel Changes** restores the settings from when it opened.
Item-change messages appear when edits are applied, reporting only the final
changes. Editing the menu is silent, and canceled edits are not announced.

## Documentation

The full setup and usage guide lives in the GitHub Wiki:

- [SmartPack Wiki](https://github.com/Crosis47/SmartPack/wiki)
- [Installation](https://github.com/Crosis47/SmartPack/wiki/Installation)
- [Commands and Permissions](https://github.com/Crosis47/SmartPack/wiki/Commands-and-Permissions)
- [Configuration](https://github.com/Crosis47/SmartPack/wiki/Configuration)
- [Chest Packing](https://github.com/Crosis47/SmartPack/wiki/Chest-Packing)
- [Recipe Configuration](https://github.com/Crosis47/SmartPack/wiki/Recipe-Configuration)
- [Troubleshooting](https://github.com/Crosis47/SmartPack/wiki/Troubleshooting)

## Build

Expand Down Expand Up @@ -92,6 +146,9 @@ The Paper Compatibility workflow also runs the same 26.3-built JAR on Paper
server checks plugin startup, command registration/reload, SQLite exclusions and
auto-pack preferences, tiered chest inventory packing, full-inventory safety,
Smart Packer item metadata, recipe registration, and cooldown tooltip updates.
The probe also checks command visibility, exclusion editing, pagination, Apply
and Cancel, and the SmartPacker's auto-mode controls. Test actual Bedrock menus
and autocomplete in a Bedrock client connected through Geyser.
The server probe lives under `src/test/` and is packaged separately for CI; it
is never included in the production JAR. Console logs are retained as artifacts.

Expand All @@ -102,13 +159,9 @@ not establish runtime compatibility; the server matrix must pass as well.

## Release

GitHub Actions publishes releases automatically when a push to `master` changes
the Maven project version in `pom.xml`. Update `pom.xml` and `CHANGELOG.md`,
commit the version bump, and push:

```bash
git push origin master
```
GitHub Actions publishes a release when a version bump in `pom.xml` reaches
`master`. Include the `pom.xml` change and matching `CHANGELOG.md` entry in the
release PR.

The workflow builds with Java 25, verifies that the tag matches the Maven
version, creates `v<version>` after the build passes, and uploads
Expand All @@ -117,8 +170,8 @@ version, creates `v<version>` after the build passes, and uploads
Releases can still be created by pushing a version tag directly:

```bash
git tag v2.1.0
git push origin v2.1.0
git tag v2.2.0
git push origin v2.2.0
```

The workflow can also be run manually from the Actions tab with either `X.Y.Z`
Expand All @@ -138,23 +191,6 @@ Each build creates a historical prerelease tag named
replacing older builds. These builds are for testing and do not replace the
stable `master` version-bump release flow.

## Install

1. Place the jar in your server's `plugins/` directory.
2. Start the server once to generate `plugins/SmartPack/config.yml`.
3. Adjust the config.
4. Run `/pack reload`.

## Commands

| Command | Description |
| --- | --- |
| `/pack` | Pack configured materials |
| `/pack chest` | Pack the chest you are looking at |
| `/pack exclude` | Choose materials to skip |
| `/pack auto` | Toggle automatic packing |
| `/pack reload` | Reload the config |

## License

SmartPack is licensed under the GNU General Public License v3.0. See [License.md](License.md).
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>crosis47.minecraft</groupId>
<artifactId>smartpack</artifactId>
<version>2.1.0</version>
<version>2.2.0</version>
<packaging>jar</packaging>

<name>SmartPack</name>
Expand Down
41 changes: 28 additions & 13 deletions src/main/java/crosis47/minecraft/smartpack/SmartPack.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package crosis47.minecraft.smartpack;

import crosis47.minecraft.smartpack.commands.PackCommand;
import io.papermc.paper.plugin.lifecycle.event.types.LifecycleEvents;
import crosis47.minecraft.smartpack.storage.PlayerExclusionStore;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.format.NamedTextColor;
Expand All @@ -12,7 +13,6 @@
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.command.PluginCommand;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
Expand Down Expand Up @@ -40,7 +40,6 @@
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Locale;
import java.util.Objects;
import java.util.Set;
import java.util.UUID;
import java.util.Map;
Expand Down Expand Up @@ -83,14 +82,10 @@ public void onEnable() {
return;
}

PluginCommand packCommand = Objects.requireNonNull(
getCommand("pack"),
"Command 'pack' is missing from plugin.yml"
);

PackCommand commandHandler = new PackCommand(this);
packCommand.setExecutor(commandHandler);
packCommand.setTabCompleter(commandHandler);
getLifecycleManager().registerEventHandler(LifecycleEvents.COMMANDS, event ->
event.registrar().register(commandHandler.createCommand(),
"Pack configured materials into compact storage forms"));
getServer().getPluginManager().registerEvents(commandHandler, this);

refreshSmartPackerRecipe();
Expand Down Expand Up @@ -218,6 +213,7 @@ public void reloadPluginConfig() {
reloadPersistentAutoPackPreferencesFromStore();
refreshSmartPackerRecipe();
cleanupSmartPackerItemsForOnlinePlayers();
Bukkit.getOnlinePlayers().forEach(Player::updateCommands);
}

public boolean isPackInputDisabled(final Material material) {
Expand Down Expand Up @@ -514,6 +510,19 @@ public ItemStack createSmartPackerItem() {
}

public boolean updateSmartPackerItemLore(final ItemStack item, final long remainingCooldownTicks) {
return updateSmartPackerItemLore(item, remainingCooldownTicks, false);
}

public boolean updateSmartPackerItemLore(
final ItemStack item, final long remainingCooldownTicks, final boolean bedrock
) {
return updateSmartPackerItemLore(item, remainingCooldownTicks, bedrock,
getConfig().getBoolean("auto_pack.default_enabled", false));
}

public boolean updateSmartPackerItemLore(
final ItemStack item, final long remainingCooldownTicks, final boolean bedrock, final boolean autoPackEnabled
) {
if (item == null || item.getType() != Material.CRAFTING_TABLE) {
return false;
}
Expand All @@ -527,15 +536,21 @@ public boolean updateSmartPackerItemLore(final ItemStack item, final long remain
.decoration(TextDecoration.ITALIC, false));

List<Component> lore = new ArrayList<>();
lore.add(Component.text("Right-click to pack now.", NamedTextColor.GRAY)
lore.add(Component.text(bedrock ? "Hold and use on a block to open actions." : "Right-click to pack now.", NamedTextColor.GRAY)
.decoration(TextDecoration.ITALIC, false));
lore.add(Component.text("Open a chest to pack that chest instead.", NamedTextColor.GRAY)
lore.add(Component.text(bedrock ? "Choose Pack Chest, then use on the chest." : "Open a chest to pack that chest instead.", NamedTextColor.GRAY)
.decoration(TextDecoration.ITALIC, false));

if (isSmartPackerCooldownModeEnabled()) {
lore.add(buildSmartPackerCooldownLore(remainingCooldownTicks));
} else {
lore.add(Component.text("Auto mode: shift-right-click to enable.", NamedTextColor.GRAY)
} else if (getConfig().getBoolean("auto_pack.enabled", false)) {
lore.add(Component.text("Auto mode: ", NamedTextColor.GRAY)
.append(Component.text(autoPackEnabled ? "Enabled" : "Disabled",
autoPackEnabled ? NamedTextColor.GREEN : NamedTextColor.RED))
.decoration(TextDecoration.ITALIC, false));
lore.add(Component.text(bedrock
? "Open SmartPacker actions to change auto mode."
: "Auto mode: shift-right-click to toggle.", NamedTextColor.GRAY)
.decoration(TextDecoration.ITALIC, false));
lore.add(Component.text("Auto mode packs after item pickups.", NamedTextColor.DARK_GRAY)
.decoration(TextDecoration.ITALIC, false));
Expand Down
Loading
Loading