Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
8f737b8
Simplify menu methods, write MenuUtils, use Mockito
CosimoTiger Oct 20, 2024
4661bb8
Add future SlotPosition utility
CosimoTiger Oct 20, 2024
14430a6
Improve names, add like 3 methods
CosimoTiger Oct 27, 2024
197dac6
Compose using the Button class
CosimoTiger Dec 28, 2024
d0b8d5d
Implement PropertyIterator for the PropertyMenu
CosimoTiger Dec 29, 2024
9db690e
Add AbstractMenu.hasBukkitTask() for clarity
CosimoTiger Dec 29, 2024
eacf73e
Merge InventoryListener.java back into IMenu.java, improve docs
CosimoTiger Dec 29, 2024
05d3a3b
Move classes into sub-packages in the menu package
CosimoTiger Dec 29, 2024
5ffd4f0
Write SlotPosition tests; organize and tweak tests
CosimoTiger Dec 29, 2024
87aef7d
Document SlotPosition
CosimoTiger Dec 29, 2024
9a22bef
Rename SlotPosition to Slot
CosimoTiger Dec 29, 2024
73995e9
Merge remote-tracking branch 'origin/main' into feature/new-menus
CosimoTiger Dec 29, 2024
590533e
Add missing new lines
CosimoTiger Dec 29, 2024
f97147c
Enable concurrent tests
CosimoTiger Dec 29, 2024
a926f68
Merge remote-tracking branch 'origin/main' into feature/new-menus
CosimoTiger Dec 29, 2024
b095644
Merge remote-tracking branch 'origin/main' into feature/new-menus
CosimoTiger Dec 29, 2024
fae15a4
Write the missing documentation, add JetBrains Contract annotations
CosimoTiger Dec 29, 2024
e66b13d
Make the Slot utility a little more convenient
CosimoTiger Dec 29, 2024
063af0f
Simplify MenuUtils.getColumns implementation
CosimoTiger Dec 29, 2024
11fb114
Add Button.EMPTY constant instance
CosimoTiger Dec 29, 2024
5da6729
Rename fillRectangle to fillArea
CosimoTiger Dec 29, 2024
e39a5a3
Write more chest Menu tests
CosimoTiger Dec 29, 2024
3865994
Extend chest Menu tests to the PropertyMenu and include property setter
CosimoTiger Dec 29, 2024
0bf5303
Drop test concurrency because they're much slower with them
CosimoTiger Dec 29, 2024
4889e02
Add common chest menu constants to MenuUtils
CosimoTiger Dec 30, 2024
9de5313
Rename MAX_CHEST_COLUMNS -> CHEST_COLUMNS
CosimoTiger Dec 30, 2024
155094a
Feature usability improvements
CosimoTiger Dec 30, 2024
550d91a
Add missing documentation to MenuUtils and PropertyMenu
CosimoTiger Jan 1, 2025
ec3de3a
Add 2 tests for 2 new MenuUtils methods
CosimoTiger Jan 1, 2025
b29c6b6
Add Button support to ItemBuilder
CosimoTiger Jan 1, 2025
c51ae0f
Merge remote-tracking branch 'origin/main' into feature/new-menus
CosimoTiger Jan 2, 2025
82e3627
Drop Button composition and excess complexities
CosimoTiger Jan 5, 2025
ddc05c1
Revise the Javadoc comments
CosimoTiger Jan 5, 2025
3e29b45
Completely refactor the Slot utility for simplicity
CosimoTiger Jan 5, 2025
df1ef6a
Return int array from Function instead of IntStream for simplicity
CosimoTiger Jan 5, 2025
6eaa65c
Initialize MenuManager singleton via its setter
CosimoTiger Jan 5, 2025
a2fb8be
Add default chest menu Slot utility methods
CosimoTiger Jan 5, 2025
c637254
Add 1 more test to ChestMenuTests.java
CosimoTiger Jan 6, 2025
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
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ To use the library, a `MenuManager` needs to be instantiated, which will manage

```java
import com.cosimo.utilities.file.YamlFile;
import com.cosimo.utilities.menu.AbstractMenu;
import com.cosimo.utilities.menu.manager.MenuManager;
import org.bukkit.plugin.java.JavaPlugin;

Expand Down
12 changes: 12 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,17 @@
<version>5.11.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.11.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.14.2</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
4 changes: 2 additions & 2 deletions src/main/java/com/cosimo/utilities/item/ItemBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,9 @@ public ItemBuilder loreAt(@Nullable String line, final int @NonNull ... indices)
*/
@NonNull
public ItemBuilder with(@NonNull Consumer<ItemStack> itemConsumer) {
this.itemStack.setItemMeta(this.itemMeta);
itemConsumer.accept(this.itemStack);
itemConsumer.accept(this.build());
this.itemMeta = this.itemStack.getItemMeta();

return this;
}

Expand Down
Loading
Loading