diff --git a/VirtualComputer/dependency-reduced-pom.xml b/VirtualComputer/dependency-reduced-pom.xml
index 1052899..a7e3ca5 100644
--- a/VirtualComputer/dependency-reduced-pom.xml
+++ b/VirtualComputer/dependency-reduced-pom.xml
@@ -102,7 +102,7 @@
org.bukkit
craftbukkit
- 1.12-R0.1-SNAPSHOT
+ 1.12.2-R0.1-SNAPSHOT
provided
diff --git a/VirtualComputer/pom.xml b/VirtualComputer/pom.xml
index 77c36ee..5e3d3d9 100644
--- a/VirtualComputer/pom.xml
+++ b/VirtualComputer/pom.xml
@@ -77,12 +77,12 @@
org.virtualbox
VirtualBox
- 5.1
+ 5.2
org.bukkit
craftbukkit
- 1.12-R0.1-SNAPSHOT
+ 1.12.2-R0.1-SNAPSHOT
provided
diff --git a/VirtualComputer/repo/org/virtualbox/VirtualBox/5.2/VirtualBox-5.2.jar b/VirtualComputer/repo/org/virtualbox/VirtualBox/5.2/VirtualBox-5.2.jar
new file mode 100755
index 0000000..57f1109
Binary files /dev/null and b/VirtualComputer/repo/org/virtualbox/VirtualBox/5.2/VirtualBox-5.2.jar differ
diff --git a/VirtualComputer/repo/org/virtualbox/VirtualBox/5.2/VirtualBox-5.2.pom b/VirtualComputer/repo/org/virtualbox/VirtualBox/5.2/VirtualBox-5.2.pom
new file mode 100755
index 0000000..fb51ba3
--- /dev/null
+++ b/VirtualComputer/repo/org/virtualbox/VirtualBox/5.2/VirtualBox-5.2.pom
@@ -0,0 +1,9 @@
+
+
+ 4.0.0
+ org.virtualbox
+ VirtualBox
+ 5.2
+ POM was created from install:install-file
+
diff --git a/VirtualComputer/repo/org/virtualbox/VirtualBox/maven-metadata-local.xml b/VirtualComputer/repo/org/virtualbox/VirtualBox/maven-metadata-local.xml
index 988e4c4..43695dd 100644
--- a/VirtualComputer/repo/org/virtualbox/VirtualBox/maven-metadata-local.xml
+++ b/VirtualComputer/repo/org/virtualbox/VirtualBox/maven-metadata-local.xml
@@ -3,10 +3,11 @@
org.virtualbox
VirtualBox
- 5.1
+ 5.2
5.1
+ 5.2
- 20170706160733
+ 20171219203228
diff --git a/VirtualComputer/src/sznp/virtualcomputer/MCFrameBuffer.java b/VirtualComputer/src/sznp/virtualcomputer/MCFrameBuffer.java
index 1101d44..4fb8b85 100644
--- a/VirtualComputer/src/sznp/virtualcomputer/MCFrameBuffer.java
+++ b/VirtualComputer/src/sznp/virtualcomputer/MCFrameBuffer.java
@@ -5,7 +5,7 @@ import org.mozilla.interfaces.IFramebuffer;
import org.mozilla.interfaces.IFramebufferOverlay;
import org.mozilla.interfaces.nsISupports;
import org.mozilla.xpcom.Mozilla;
-import org.virtualbox_5_1.*;
+import org.virtualbox_5_2.*;
public class MCFrameBuffer implements IFramebuffer {
private IDisplay display;
diff --git a/VirtualComputer/src/sznp/virtualcomputer/PluginMain.java b/VirtualComputer/src/sznp/virtualcomputer/PluginMain.java
index e0d5b40..7887c9a 100644
--- a/VirtualComputer/src/sznp/virtualcomputer/PluginMain.java
+++ b/VirtualComputer/src/sznp/virtualcomputer/PluginMain.java
@@ -11,7 +11,7 @@ import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitTask;
-import org.virtualbox_5_1.*;
+import org.virtualbox_5_2.*;
import com.google.common.collect.Lists;
@@ -35,7 +35,8 @@ public class PluginMain extends JavaPlugin {
this.getCommand("computer").setExecutor(new Commands());
ccs.sendMessage("§bInitializing VirtualBox...");
String vbpath = System.getProperty("os.name").toLowerCase().contains("mac")
- ? "/Applications/VirtualBox.app/Contents/MacOS" : "/opt/virtualbox";
+ ? "/Applications/VirtualBox.app/Contents/MacOS"
+ : "/opt/virtualbox";
File f = new File(vbpath);
if (!f.isDirectory() || !Arrays.stream(f.list()).anyMatch(s -> s.contains("xpcom")))
vbpath = "/usr/lib/virtualbox";
@@ -103,7 +104,7 @@ public class PluginMain extends JavaPlugin {
sender.sendMessage("B: " + machine.getState().toString());
final IConsole console = session.getConsole();
sender.sendMessage("1: " + console.getState().toString());
- console.powerUp().waitForCompletion(10000);
+ console.powerUp();
sender.sendMessage("2: " + console.getState().toString());
console.getDisplay().attachFramebuffer(0L,
new IFramebuffer(new MCFrameBuffer(console.getDisplay())));
@@ -115,7 +116,8 @@ public class PluginMain extends JavaPlugin {
&& console.getState().equals(MachineState.Running))
console.getDisplay().invalidateAndUpdateScreen(0L);
if (session.getState().equals(SessionState.Unlocked) // Stop if the machine stopped fully
- || console.getState().equals(MachineState.PoweredOff)) {
+ || console.getState().equals(MachineState.PoweredOff)
+ || console.getState().equals(MachineState.Saved)) {
sender.sendMessage("5: " + console.getState().toString());
if (session.getState().equals(SessionState.Locked)) {
session.unlockMachine();