Description (Required)
The command /sf categories will throw an error if there are more than 54 categories. This happens on servers with a lot of addons installed.
Steps to reproduce the Issue (Required)
Run /sf categories when there are more than 54 categories.
Expected behavior (Required)
Add pagination to avoid the error.
Server Log / Error Report
Forwarded from fork SlimefunGuguProject#10,
but i believe this will also happen due to the codes:
|
SCMenu menu = new SCMenu("&6Category Namespace Guide"); |
|
menu.setSize(54); |
|
int slot = 0; |
|
for (ItemGroup group : Slimefun.getRegistry().getAllItemGroups()) { |
|
ItemStack catItem = group.getItem(p).clone(); |
|
ItemMeta catMeta = catItem.getItemMeta(); |
|
List<String> catLore = catMeta.getLore(); |
|
|
|
catLore.set(catLore.size() - 1, Utils.color( |
|
"&6ID: " + group.getKey().getNamespace() + ":" + group.getKey().getKey()) |
|
); // Replaces the "Click to Open" line |
|
catMeta.setLore(catLore); |
|
catItem.setItemMeta(catMeta); |
|
menu.replaceExistingItem(slot, catItem); |
|
menu.addMenuClickHandler(slot, ChestMenuUtils.getEmptyClickHandler()); |
|
slot++; |
|
} |
|
|
|
menu.setPlayerInventoryClickable(false); |
|
menu.setBackgroundNonClickable(true); |
|
menu.open(p); |
Config Files
N/A
Environment (Required)
- Minecraft Version:
- CS-CoreLib Version:
- Slimefun Version:
- Plugin Version:
Description (Required)
The command
/sf categorieswill throw an error if there are more than 54 categories. This happens on servers with a lot of addons installed.Steps to reproduce the Issue (Required)
Run
/sf categorieswhen there are more than 54 categories.Expected behavior (Required)
Add pagination to avoid the error.
Server Log / Error Report
Forwarded from fork SlimefunGuguProject#10,
but i believe this will also happen due to the codes:
SlimeCustomizer/src/main/java/io/ncbpfluffybear/slimecustomizer/SlimeCustomizer.java
Lines 267 to 287 in 81552a1
Config Files
N/A
Environment (Required)