Skip to content

Commit 82e3627

Browse files
committed
Drop Button composition and excess complexities
1 parent c51ae0f commit 82e3627

11 files changed

Lines changed: 393 additions & 720 deletions

File tree

src/main/java/com/cosimo/utilities/item/ItemBuilder.java

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.cosimo.utilities.item;
22

3-
import com.cosimo.utilities.menu.Button;
43
import lombok.NonNull;
54
import org.bukkit.Material;
65
import org.bukkit.configuration.ConfigurationSection;
@@ -512,28 +511,6 @@ public ItemStack build() {
512511
return this.itemStack;
513512
}
514513

515-
/**
516-
* Builds a {@link Button} with only this instance's resulting {@link ItemStack} and null property.
517-
*
518-
* @param <E> Type of property for a {@link com.cosimo.utilities.menu.type.PropertyMenu}
519-
* @return A {@link Button} with only this instance's resulting {@link ItemStack} and null property
520-
*/
521-
@NonNull
522-
public <E> Button<E> asButton() {
523-
return Button.of(this.build());
524-
}
525-
526-
/**
527-
* Builds a {@link Button} with this instance's resulting {@link ItemStack} and a given property.
528-
*
529-
* @param <E> Type of property for a {@link com.cosimo.utilities.menu.type.PropertyMenu}
530-
* @return A {@link Button} with this instance's resulting {@link ItemStack} and a given property
531-
*/
532-
@NonNull
533-
public <E> Button<E> asButton(E property) {
534-
return Button.of(this.build(), property);
535-
}
536-
537514
@SuppressWarnings("MethodDoesntCallSuperMethod")
538515
@Override
539516
public ItemBuilder clone() {

src/main/java/com/cosimo/utilities/menu/Button.java

Lines changed: 0 additions & 87 deletions
This file was deleted.

src/main/java/com/cosimo/utilities/menu/IMenu.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
* A collection of minimal methods that a {@link MenuManager} needs to work with menus, along with utility methods, such
1919
* as for rows and columns.
2020
*/
21+
@SuppressWarnings("unused")
2122
public interface IMenu {
2223

2324
/**

0 commit comments

Comments
 (0)