Improve Menu Type example
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- java
- Domain
- documentation
Research direction
Locate the Menu Type example containing the Map<Player,InventoryView> and read its existing PlayerQuitEvent handler. Update the example to use player IDs as requested, then consider adding an InventoryClickEvent example for preventing shulker boxes in the stash. Done means the example reflects the requested key type and the documentation clearly demonstrates the relevant event handling.
Written by the indexing model from the issue text.
Description
The example contains a Map<Player,InventoryView>, and even has a comment (shown below) explaining that using Player objects as keys and values is bad design, so could it just be changed to use player ids?
// A map to store all inventory views in. Generally it is not recommended
// to use Player objects as keys or values, but in this case it is acceptable
// because the inventory view is also bound to a player object, meaning we
// couldn't reuse it after a player rejoins anyways.
Also, could there be an example for listening to an InventoryClickEvent? It's not that necessary, since the same sort of logic is displayed in the PlayerQuitEvent handler. If it were to be added, it could prevent you from putting shulker boxes in your stash.
- Dominant language
- MDX
- Stars
- 73
- Forks
- 280
- Avg merge
- 16h 42m
- Merged PRs (30d)
- 5
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PaperMC/docs
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
-
good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
dev guide project: Paper
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
certification
Difficulty 1/5 Under an hour Newbie friendliness 80/100
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
bisq-network/support#2181 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
tutorial updates Open
Difficulty 1/5 Under an hour Newbie friendliness 80/100
sveltejs/svelte.dev#2241 ·