mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-15 14:54:43 +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 static class ServerOptions {
|
||||||
public boolean autoCreateAccount = true;
|
public boolean autoCreateAccount = true;
|
||||||
public int sceneMaxEntites = 500;
|
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 unlockAllChallenges = true;
|
||||||
public boolean spendStamina = true;
|
public boolean spendStamina = true;
|
||||||
public int staminaRecoveryRate = 5 * 60;
|
public int staminaRecoveryRate = 5 * 60;
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ public class CommandArgs {
|
|||||||
// Try to set level
|
// Try to set level
|
||||||
if (this.getLevel() > 0) {
|
if (this.getLevel() > 0) {
|
||||||
// Set relic level
|
// 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
|
// Apply sub stat upgrades to the relic
|
||||||
int upgrades = item.getMaxNormalSubAffixCount() - item.getCurrentSubAffixCount();
|
int upgrades = item.getMaxNormalSubAffixCount() - item.getCurrentSubAffixCount();
|
||||||
|
|||||||
Reference in New Issue
Block a user