mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-12 21:34:35 +01:00
Add a config option for maxCustomRelicLevel
This commit is contained in:
@@ -111,6 +111,7 @@ public class Config {
|
||||
public static class ServerOptions {
|
||||
public boolean autoCreateAccount = true;
|
||||
public int sceneMaxEntites = 500;
|
||||
public int maxCustomRelicLevel = 15; // Maximum level of a relic that the player can create with the /give command
|
||||
public boolean unlockAllChallenges = true;
|
||||
public boolean spendStamina = true;
|
||||
public int staminaRecoveryRate = 5 * 60;
|
||||
|
||||
@@ -222,7 +222,7 @@ public class CommandArgs {
|
||||
// Try to set level
|
||||
if (this.getLevel() > 0) {
|
||||
// Set relic level
|
||||
item.setLevel(Math.min(this.getLevel(), 999));
|
||||
item.setLevel(Math.min(this.getLevel(), LunarCore.getConfig().getServerOptions().maxCustomRelicLevel));
|
||||
|
||||
// Apply sub stat upgrades to the relic
|
||||
int upgrades = item.getMaxNormalSubAffixCount() - item.getCurrentSubAffixCount();
|
||||
|
||||
Reference in New Issue
Block a user