Skip to content

Add an amount argument to the minion give command - #3

Open
Crispi2k24 wants to merge 1 commit into
EternalCodeTeam:developfrom
Crispi2k24:feature/give-amount
Open

Crispi2k24 wants to merge 1 commit into
EternalCodeTeam:developfrom
Crispi2k24:feature/give-amount

Conversation

@Crispi2k24

@Crispi2k24 Crispi2k24 commented Sep 23, 2026 •

Copy link
Copy Markdown

What changed

/minions give <type> takes an optional amount: /minions give miner 10. The two existing forms keep working and now route through the same method with an amount of one.

MinionItemFactory#create gained an overload that takes the amount.

Why

Handing out more than one minion meant repeating the command, which is tedious when setting up a server or paying out a reward.

Minion items carry no per-item data, so they stack, and Inventory#addItem already splits an oversized stack across slots. The amount therefore belongs on the item the factory builds - the factory owns how a minion item is put together, including how many of it there are - and the command stays a single addItem call.

Testing / notes

./gradlew build passes. Verified on a Purpur 26.2 server: /minions give miner 10 gives ten across stacks, /minions give miner still gives one, /minions give still gives one of the default type, and an unknown type still reports the same message as before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant