mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-30 03:53:50 +00:00
Add check for scripts before quests are enabled
This commit is contained in:
parent
2c55b5b3da
commit
2d12e0a4d9
@ -29,6 +29,7 @@ import java.util.stream.Collectors;
|
||||
|
||||
import static emu.grasscutter.GameConstants.DEBUG;
|
||||
import static emu.grasscutter.config.Configuration.GAME_OPTIONS;
|
||||
import static emu.grasscutter.config.Configuration.SERVER;
|
||||
|
||||
public class QuestManager extends BasePlayerManager {
|
||||
@Getter private final Player player;
|
||||
@ -115,8 +116,16 @@ public class QuestManager extends BasePlayerManager {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO store user value set on enable
|
||||
/**
|
||||
* Checks if questing can be enabled.
|
||||
*/
|
||||
public boolean isQuestingEnabled() {
|
||||
// Check if scripts are enabled.
|
||||
if (!SERVER.game.enableScriptInBigWorld) {
|
||||
Grasscutter.getLogger().warn("Questing is disabled without scripts enabled.");
|
||||
return false;
|
||||
}
|
||||
|
||||
return GAME_OPTIONS.questing.enabled;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user