File tree Expand file tree Collapse file tree
Menu Library/src/main/java/org/broken/arrow/library/menu Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -675,15 +675,14 @@ public CheckItemsInsideMenu getCheckItemsInsideMenu() {
675675 */
676676 @ Nonnull
677677 public CheckItemsInsideMenu getCheckItemsInsideMenuByStrings (@ Nullable List <String > blackListedMaterials ) {
678+ List <ItemStack > materials = new ArrayList <>();
678679 if (blackListedMaterials != null ) {
679- List <ItemStack > materials = new ArrayList <>();
680680 for (String item : blackListedMaterials ) {
681681 Material material = convertMaterialFromString (menuAPI , item );
682682 materials .add (new ItemStack (material ));
683683 }
684- this .checkItemsInsideMenu .setBlacklistedItems (materials );
685684 }
686- return this . checkItemsInsideMenu ;
685+ return getCheckItemsInsideMenuByItems ( materials ) ;
687686 }
688687
689688 /**
@@ -696,9 +695,10 @@ public CheckItemsInsideMenu getCheckItemsInsideMenuByStrings(@Nullable List<Stri
696695 */
697696 @ Nonnull
698697 public CheckItemsInsideMenu getCheckItemsInsideMenuByItems (@ Nullable List <ItemStack > blackListedMaterials ) {
699- if (blackListedMaterials != null ) {
698+ if (blackListedMaterials != null && ! blackListedMaterials . isEmpty () ) {
700699 this .checkItemsInsideMenu .setBlacklistedItems (blackListedMaterials );
701700 }
701+ this .checkItemsInsideMenu .setSlotsToCheck (this .getFillSpace ());
702702 return this .checkItemsInsideMenu ;
703703 }
704704
You can’t perform that action at this time.
0 commit comments