mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 03:35:51 +00:00
Added an option to allow normal creative researching
This commit is contained in:
parent
da8749ffca
commit
d819e1d6bc
@ -7,6 +7,7 @@ options:
|
||||
prefix: '&a&lSlimefun &7>'
|
||||
auto-save-delay-in-minutes: 10
|
||||
show-vanilla-recipes-in-guide: true
|
||||
allow-free-creative-research: true
|
||||
guide:
|
||||
default-view-book: false
|
||||
URID:
|
||||
|
@ -67,6 +67,7 @@ public class SlimefunGuide {
|
||||
public static Date last_update = new Date();
|
||||
|
||||
static boolean all_recipes = true;
|
||||
public static boolean creative_research = true;
|
||||
private static final int category_size = 36;
|
||||
|
||||
@Deprecated
|
||||
@ -866,7 +867,7 @@ public class SlimefunGuide {
|
||||
@Override
|
||||
public boolean onClick(final Player p, int slot, ItemStack item, ClickAction action) {
|
||||
boolean canBuy = false;
|
||||
if (p.getGameMode() == GameMode.CREATIVE) canBuy = true;
|
||||
if (p.getGameMode() == GameMode.CREATIVE && creative_research) canBuy = true;
|
||||
else if (p.getLevel() >= cost) {
|
||||
p.setLevel(p.getLevel() - cost);
|
||||
canBuy = true;
|
||||
@ -878,7 +879,7 @@ public class SlimefunGuide {
|
||||
if (researched) openCategory(p, category, true, selected_page, experimental);
|
||||
else if (!Research.isResearching(p)){
|
||||
if (p.getGameMode() == GameMode.CREATIVE) {
|
||||
research.unlock(p, true);
|
||||
research.unlock(p, creative_research);
|
||||
openCategory(p, category, survival, selected_page, experimental);
|
||||
}
|
||||
else {
|
||||
|
@ -384,6 +384,7 @@ public class SlimefunStartup extends JavaPlugin {
|
||||
|
||||
if (clearlag) new ClearLaggIntegration(this);
|
||||
|
||||
SlimefunGuide.creative_research = config.getBoolean("options.allow-free-creative-research");
|
||||
// Do not show /sf elevator command in our Log, it could get quite spammy
|
||||
CSCoreLib.getLib().filterLog("([A-Za-z0-9_]{3,16}) issued server command: /sf elevator (.{0,})");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user