Add history file for terminal
This commit is contained in:
parent
c7e4c45f26
commit
b2afcf1194
|
@ -75,10 +75,10 @@ index 3554314526b3f33ad02df2adfd42d45118d75526..aeaceac771644ece5365d07be77f4481
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
diff --git a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..cd6e259239b068f1e1b33f45004cf5d37ac5a1a3
|
index 0000000000000000000000000000000000000000..74ed02fa9296583977bb721014b10ff8b708b43c
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
+++ b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
||||||
@@ -0,0 +1,40 @@
|
@@ -0,0 +1,41 @@
|
||||||
+package com.destroystokyo.paper.console;
|
+package com.destroystokyo.paper.console;
|
||||||
+
|
+
|
||||||
+import net.minecraft.server.DedicatedServer;
|
+import net.minecraft.server.DedicatedServer;
|
||||||
|
@ -99,6 +99,7 @@ index 0000000000000000000000000000000000000000..cd6e259239b068f1e1b33f45004cf5d3
|
||||||
+ protected LineReader buildReader(LineReaderBuilder builder) {
|
+ protected LineReader buildReader(LineReaderBuilder builder) {
|
||||||
+ return super.buildReader(builder
|
+ return super.buildReader(builder
|
||||||
+ .appName("Paper")
|
+ .appName("Paper")
|
||||||
|
+ .variable(LineReader.HISTORY_FILE, java.nio.file.Paths.get(".console_history"))
|
||||||
+ .completer(new ConsoleCommandCompleter(this.server))
|
+ .completer(new ConsoleCommandCompleter(this.server))
|
||||||
+ );
|
+ );
|
||||||
+ }
|
+ }
|
||||||
|
|
Loading…
Reference in New Issue