Skip to content

Commit 9d18016

Browse files
committed
Rename sellProtectionMaxAmount to sellProtectionThreshold
1 parent a0b72db commit 9d18016

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

src/client/java/com/coflnet/CoflModClient.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ private void registerDefaultCommands(CommandDispatcher<FabricClientCommandSource
484484
"showslbin", "showmedPrice", "showseller", "showvolume", "showextraFields", "showprofitPercent",
485485
"showprofit", "showsellerOpenBtn", "showlore", "showhideSold", "showhideManipulated",
486486
"privacyExtendDescriptions", "privacyAutoStart", "loreHighlightFilterMatch",
487-
"loreMinProfitForHighlight", "loreDisableHighlighting", "sellProtectionEnabled", "sellProtectionMaxAmount"};
487+
"loreMinProfitForHighlight", "loreDisableHighlighting", "sellProtectionEnabled", "sellProtectionThreshold"};
488488

489489
for (String suggestion : suggestions) {
490490
if (suggestion.toLowerCase().contains(currentWord.toLowerCase()))
@@ -543,7 +543,7 @@ public String getString() {
543543
sendChatMessage("§cUsage: /cofl set sellProtectionEnabled <true/false>");
544544
return 1;
545545
}
546-
} else if (args[1].equals("sellProtectionMaxAmount")) {
546+
} else if (args[1].equals("sellProtectionThreshold")) {
547547
if (args.length >= 3) {
548548
try {
549549
long amount = Long.parseLong(args[2]);
@@ -555,7 +555,7 @@ public String getString() {
555555
return 1;
556556
}
557557
} else {
558-
sendChatMessage("§cUsage: /cofl set sellProtectionMaxAmount <amount>");
558+
sendChatMessage("§cUsage: /cofl set sellProtectionThreshold <amount>");
559559
return 1;
560560
}
561561
}
@@ -565,9 +565,9 @@ public String getString() {
565565
com.coflnet.config.CoflModConfig config = com.coflnet.config.SellProtectionManager.getConfig();
566566
sendChatMessage("§6=== Sell Protection Settings ===");
567567
sendChatMessage("§7Enabled: " + (config.sellProtectionEnabled ? "§aYes" : "§cNo"));
568-
sendChatMessage("§7Max Amount: §6" + formatCoins(config.sellProtectionMaxAmount) + " coins");
568+
sendChatMessage("§7Max Amount: §6" + formatCoins(config.sellProtectionThreshold) + " coins");
569569
sendChatMessage("§7Usage: §e/cofl set sellProtectionEnabled <true/false>");
570-
sendChatMessage("§7Usage: §e/cofl set sellProtectionMaxAmount <amount>");
570+
sendChatMessage("§7Usage: §e/cofl set sellProtectionThreshold <amount>");
571571
return 1;
572572
}
573573
}
@@ -1190,13 +1190,13 @@ private static void addSellProtectionTooltip(ItemStack stack, List<Text> lines)
11901190
lines.add(Text.literal("§c⚠ §lSell Protection §c⚠"));
11911191
lines.add(Text.literal("§7Left clicks blocked if > §6" + formattedThreshold + " coins"));
11921192
lines.add(Text.literal("§bHold Ctrl§7 to override."));
1193-
lines.add(Text.literal("§8/cofl set sellProtectionMaxAmount <amount>"));
1193+
lines.add(Text.literal("§8/cofl set sellProtectionThreshold <amount>"));
11941194
} else if (itemName.contains("Sell Sacks Now") || itemName.contains("Sell Inventory Now")) {
11951195
lines.add(Text.literal(""));
11961196
lines.add(Text.literal("§c⚠ §lSell Protection §c⚠"));
11971197
lines.add(Text.literal("§7All clicks blocked if > §6" + formattedThreshold + " coins"));
11981198
lines.add(Text.literal("§bHold Ctrl§7 to override."));
1199-
lines.add(Text.literal("§8/cofl set sellProtectionMaxAmount <amount>"));
1199+
lines.add(Text.literal("§8/cofl set sellProtectionThreshold <amount>"));
12001200
}
12011201
} catch (Exception e) {
12021202
System.out.println("[CoflModClient] addSellProtectionTooltip failed: " + e.getMessage());

src/client/java/com/coflnet/config/CoflModConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class CoflModConfig {
1818

1919
// Sell protection settings
2020
public boolean sellProtectionEnabled = true;
21-
public long sellProtectionMaxAmount = 1000000; // Default: 1 million coins
21+
public long sellProtectionThreshold = 1000000; // Default: 1 million coins
2222

2323
public static CoflModConfig load() {
2424
try {

src/client/java/com/coflnet/config/SellProtectionConfig.java

Whitespace-only changes.

src/client/java/com/coflnet/config/SellProtectionManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static boolean isEnabled() {
2222
}
2323

2424
public static long getMaxAmount() {
25-
return getConfig().sellProtectionMaxAmount;
25+
return getConfig().sellProtectionThreshold;
2626
}
2727

2828
public static void setEnabled(boolean enabled) {
@@ -34,7 +34,7 @@ public static void setEnabled(boolean enabled) {
3434

3535
public static void setMaxAmount(long amount) {
3636
CoflModConfig cfg = getConfig();
37-
cfg.sellProtectionMaxAmount = amount;
37+
cfg.sellProtectionThreshold = amount;
3838
cfg.save();
3939
reloadConfig();
4040
}

0 commit comments

Comments
 (0)