refactor: also clear core queue on sendc (VM)
This commit is contained in:
parent
4bdf719515
commit
f2aeeca81e
2 changed files with 8 additions and 0 deletions
|
@ -64,6 +64,10 @@ public class Core {
|
||||||
forceRun(command);
|
forceRun(command);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void clearQueue () {
|
||||||
|
queue.clear();
|
||||||
|
}
|
||||||
|
|
||||||
private void packetReceived (ClientboundPlayerPositionPacket packet) {
|
private void packetReceived (ClientboundPlayerPositionPacket packet) {
|
||||||
if (!loggedIn) loggedIn = true;
|
if (!loggedIn) loggedIn = true;
|
||||||
|
|
||||||
|
|
|
@ -150,6 +150,10 @@ public class Main {
|
||||||
final OutputStream output = process.getOutputStream();
|
final OutputStream output = process.getOutputStream();
|
||||||
|
|
||||||
if (content.trim().equalsIgnoreCase("sendc")) {
|
if (content.trim().equalsIgnoreCase("sendc")) {
|
||||||
|
// ALSO clear the core queue
|
||||||
|
|
||||||
|
core.clearQueue();
|
||||||
|
|
||||||
output.write("\u0003".getBytes());
|
output.write("\u0003".getBytes());
|
||||||
output.flush();
|
output.flush();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue