Skip to content

Commit 1edab14

Browse files
Store historical console commands in .console_history (enables command history between restarts) (PaperMC#1835)
1 parent a758182 commit 1edab14

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

proxy/src/main/java/com/velocitypowered/proxy/console/VelocityConsole.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import com.velocitypowered.api.proxy.ConsoleCommandSource;
2626
import com.velocitypowered.proxy.VelocityServer;
2727
import com.velocitypowered.proxy.util.ClosestLocaleMatcher;
28+
import java.nio.file.Path;
2829
import java.util.List;
2930
import java.util.Locale;
3031
import net.kyori.adventure.audience.MessageType;
@@ -111,6 +112,7 @@ public void setupPermissions() {
111112
protected LineReader buildReader(LineReaderBuilder builder) {
112113
return super.buildReader(builder
113114
.appName("Velocity")
115+
.variable(LineReader.HISTORY_FILE, Path.of(".console_history"))
114116
.completer((reader, parsedLine, list) -> {
115117
try {
116118
List<String> offers = this.server.getCommandManager()

0 commit comments

Comments
 (0)