1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 03:35:51 +00:00

Allow /sf cheat to have all categories unlocked

- If the player who who is using /sf cheat have not unlocked the category, they will still have access to it
- Removed empty code
This commit is contained in:
AlexLander123 2019-10-18 21:27:28 +08:00
parent 2ff2355bb2
commit 1dc669740c

View File

@ -432,10 +432,8 @@ public final class SlimefunGuide {
}
}
if (locked) {
// Dont display that Category...
}
else if (!(category instanceof LockedCategory)) {
if (!locked) {
if (!(category instanceof LockedCategory)) {
if (!(category instanceof SeasonalCategory)) {
menu.addItem(index, category.getItem());
menu.addMenuClickHandler(index, (pl, slot, item, action) -> {
@ -455,7 +453,7 @@ public final class SlimefunGuide {
}
}
}
else if (((LockedCategory) category).hasUnlocked(p, profile)) {
else if (!survival || ((LockedCategory) category).hasUnlocked(p, profile)) {
menu.addItem(index, category.getItem());
menu.addMenuClickHandler(index, (pl, slot, item, action) -> {
openCategory(pl, category, survival, 1, book);
@ -480,6 +478,7 @@ public final class SlimefunGuide {
}
}
}
}
final int finalPages = pages;