Development Milestone:

Added max machine length setting to config.
This commit is contained in:
BigPappa committed 2026-06-11 12:51:16 -05:00
1 parent 698aceafc0
commit 18114e3064
3 files changed
+25 -4

No files matched your search

@@ -18,6 +18,24 @@ public class ConfigManager {
} }
/*
|--------------------------------------------------------------------------
| max-machine-length
|--------------------------------------------------------------------------
*/
public static int getMaxMachineLength() {
int configured = RSAuger.getInstance()
.getConfig()
.getInt("max-machine-length", 16);
if (configured < 1) {
return 1;
}
return Math.min(configured, 16);
}
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| RELOAD | RELOAD
@@ -1,5 +1,6 @@
package com.rsscripting.rsauger.machine; package com.rsscripting.rsauger.machine;
import com.rsscripting.rsauger.config.ConfigManager;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.block.BlockFace; import org.bukkit.block.BlockFace;
@@ -132,7 +133,7 @@ public class AugerValidator {
int length = 0; int length = 0;
while (length < 10) { while (length < ConfigManager.getMaxMachineLength()) {
Material type = Material type =
current.getType(); current.getType();
+5 -3
View File
@@ -2,8 +2,10 @@
# ---------------------------------------- # ----------------------------------------
# RS Plugin Template Configuration # RS Plugin Template Configuration
# ---------------------------------------- # ----------------------------------------
#
debug-mode: false # Maximum lightning rod segments allowed for an Auger.
# Values above 16 are ignored.
# Allowed Range: 1-16
# Default: 16
max-machine-length: 16
admin-bypass: true