mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-26 04:25:15 +01:00
More obvious way to show that you can add more than 45 items into shop
This commit is contained in:
parent
faa72b80ac
commit
137ec98ab0
@ -38,6 +38,7 @@ import net.Zrips.CMILib.GUI.CMIGuiButton;
|
||||
import net.Zrips.CMILib.GUI.GUIManager.GUIClickType;
|
||||
import net.Zrips.CMILib.GUI.GUIManager.GUIRows;
|
||||
import net.Zrips.CMILib.Items.CMIMaterial;
|
||||
import net.Zrips.CMILib.Logs.CMIDebug;
|
||||
import net.Zrips.CMILib.Version.Version;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@ -58,28 +59,28 @@ public class ShopManager {
|
||||
return ls;
|
||||
}
|
||||
|
||||
private static GUIRows getGuiSize(List<ShopItem> ls, int page) {
|
||||
private static GUIRows getGuiSize(List<ShopItem> ls, @Deprecated int page) {
|
||||
GUIRows guiSize = GUIRows.r1;
|
||||
int size = ls.size();
|
||||
|
||||
if (size > 9)
|
||||
if (size <= 9)
|
||||
guiSize = GUIRows.r1;
|
||||
|
||||
if (size <= 18)
|
||||
guiSize = GUIRows.r2;
|
||||
|
||||
if (size > 18)
|
||||
if (size <= 27)
|
||||
guiSize = GUIRows.r3;
|
||||
|
||||
if (size > 27)
|
||||
if (size <= 36)
|
||||
guiSize = GUIRows.r4;
|
||||
|
||||
if (size > 36)
|
||||
if (size <= 45)
|
||||
guiSize = GUIRows.r5;
|
||||
|
||||
if (size == 45)
|
||||
if (Jobs.getShopManager().getShopItemList().size() > 45)
|
||||
guiSize = GUIRows.r6;
|
||||
|
||||
if (page > 1 && guiSize != GUIRows.r6)
|
||||
guiSize = GUIRows.getByRows(guiSize.getRows() + 1);
|
||||
|
||||
return guiSize;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user