diff --git a/VirtualComputer/.classpath b/VirtualComputer/.classpath
index 5b4c3df..be86bf9 100644
--- a/VirtualComputer/.classpath
+++ b/VirtualComputer/.classpath
@@ -16,6 +16,5 @@
-
diff --git a/VirtualComputer/repo/org/virtualbox/VirtualBox/5.1/VirtualBox-5.1.jar b/VirtualComputer/repo/org/virtualbox/VirtualBox/5.1/VirtualBox-5.1.jar
index cc9bd32..b0bd4ee 100644
Binary files a/VirtualComputer/repo/org/virtualbox/VirtualBox/5.1/VirtualBox-5.1.jar and b/VirtualComputer/repo/org/virtualbox/VirtualBox/5.1/VirtualBox-5.1.jar differ
diff --git a/VirtualComputer/src/sznp/virtualcomputer/MCFrameBuffer.java b/VirtualComputer/src/sznp/virtualcomputer/MCFrameBuffer.java
index bc37d1b..40c1366 100644
--- a/VirtualComputer/src/sznp/virtualcomputer/MCFrameBuffer.java
+++ b/VirtualComputer/src/sznp/virtualcomputer/MCFrameBuffer.java
@@ -1,108 +1,115 @@
package sznp.virtualcomputer;
-import org.virtualbox_5_1.IFramebuffer;
-import org.virtualbox_5_1.ObjectRefManager;
-import org.virtualbox_5_1.jaxws.VboxPortType;
+import org.mozilla.interfaces.IFramebuffer;
+import org.mozilla.interfaces.IFramebufferOverlay;
+import org.mozilla.interfaces.nsISupports;
-public class MCFrameBuffer extends IFramebuffer {
+public class MCFrameBuffer implements IFramebuffer {
- public MCFrameBuffer(String wrapped, ObjectRefManager objMgr, VboxPortType port) {
- super(wrapped, objMgr, port);
- // TODO Auto-generated constructor stub
- }
-
- /*@Override
+ @Override
public nsISupports queryInterface(String arg0) {
+ // TODO Auto-generated method stub
return null;
}
@Override
public long getBitsPerPixel() {
- return 32;
+ // TODO Auto-generated method stub
+ return 0;
}
@Override
public long getBytesPerLine() {
- return 640 * 4;
+ // TODO Auto-generated method stub
+ return 0;
}
@Override
public long[] getCapabilities(long[] arg0) {
- return new long[] { FramebufferCapabilities.UpdateImage };
+ // TODO Auto-generated method stub
+ return null;
}
@Override
public long getHeight() {
- return 480;
+ // TODO Auto-generated method stub
+ return 0;
}
@Override
public long getHeightReduction() {
+ // TODO Auto-generated method stub
return 0;
}
@Override
public IFramebufferOverlay getOverlay() {
+ // TODO Auto-generated method stub
return null;
}
@Override
public long getPixelFormat() {
- return BitmapFormat.RGBA;
+ // TODO Auto-generated method stub
+ return 0;
}
- private byte visibleRegionB;
- private long visibleRegionL;
-
@Override
public long getVisibleRegion(byte arg0, long arg1) {
- System.out.println("Visible region get.");
- return visibleRegionL;
+ // TODO Auto-generated method stub
+ return 0;
}
@Override
public long getWidth() {
- return 640;
+ // TODO Auto-generated method stub
+ return 0;
}
@Override
public long getWinId() {
+ // TODO Auto-generated method stub
return 0;
}
@Override
public void notify3DEvent(long arg0, byte[] arg1) {
+ // TODO Auto-generated method stub
+
}
@Override
public void notifyChange(long arg0, long arg1, long arg2, long arg3, long arg4) {
+ // TODO Auto-generated method stub
+
}
@Override
public void notifyUpdate(long arg0, long arg1, long arg2, long arg3) {
// TODO Auto-generated method stub
- System.out.println("UPDATE");
+
}
@Override
public void notifyUpdateImage(long arg0, long arg1, long arg2, long arg3, byte[] arg4) {
- // TODO Auto-generated method stub
- System.out.println("UPDATE IMAGE");
+ System.out.println("Update!");
}
@Override
public void processVHWACommand(byte arg0) {
+ // TODO Auto-generated method stub
+
}
@Override
public void setVisibleRegion(byte arg0, long arg1) {
- visibleRegionB = arg0;
- visibleRegionL = arg1;
- System.out.println("Visible region set.");
+ // TODO Auto-generated method stub
+
}
@Override
public boolean videoModeSupported(long arg0, long arg1, long arg2) {
- return true; // We support EVERYTHING
- }*/
+ // TODO Auto-generated method stub
+ return false;
+ }
}
diff --git a/VirtualComputer/src/sznp/virtualcomputer/PluginMain.java b/VirtualComputer/src/sznp/virtualcomputer/PluginMain.java
index bb95b2b..4aa3fbf 100644
--- a/VirtualComputer/src/sznp/virtualcomputer/PluginMain.java
+++ b/VirtualComputer/src/sznp/virtualcomputer/PluginMain.java
@@ -2,7 +2,6 @@ package sznp.virtualcomputer;
import java.awt.image.BufferedImage;
import java.awt.image.DataBufferInt;
-import java.io.File;
import java.util.HashMap;
import net.countercraft.movecraft.craft.Craft;
@@ -14,8 +13,6 @@ import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitTask;
-import org.mozilla.interfaces.IFramebufferOverlay;
-import org.mozilla.interfaces.nsISupports;
import org.virtualbox_5_1.IFramebuffer;
import org.virtualbox_5_1.ISession;
import org.virtualbox_5_1.IVirtualBox;
@@ -39,13 +36,12 @@ public class PluginMain extends JavaPlugin {
ConsoleCommandSender ccs = getServer().getConsoleSender();
this.getCommand("computer").setExecutor(new Commands());
ccs.sendMessage("§bInitializing VirtualBox...");
- // Connect con = new Connect("vbox:///");
final VirtualBoxManager manager = VirtualBoxManager.createInstance(getDataFolder().getAbsolutePath());
vbox = manager.getVBox();
session = manager.getSessionObject();
- vbox.getMachines().get(0).launchVMProcess(session, "headless", "");
- session.getConsole().getDisplay().attachFramebuffer(0L, new MCFrameBuffer());
-
+ ccs.sendMessage("§bStarting VM for testing...");
+ vbox.getMachines().get(0).launchVMProcess(session, "headless", "").waitForCompletion(2000);
+ session.getConsole().getDisplay().attachFramebuffer(0L, new IFramebuffer(new MCFrameBuffer()));
ccs.sendMessage("§bLoading SketchMap...");
img = new BufferedImage(640, 480, BufferedImage.TYPE_INT_ARGB);
HashMap map = new HashMap<>();
diff --git a/VirtualComputer/vboxjws-doc.jar b/VirtualComputer/vboxjws-doc.jar
deleted file mode 100644
index 4ea760b..0000000
Binary files a/VirtualComputer/vboxjws-doc.jar and /dev/null differ
diff --git a/VirtualComputer/vboxjws-src.jar b/VirtualComputer/vboxjws-src.jar
deleted file mode 100644
index 95c0d9c..0000000
Binary files a/VirtualComputer/vboxjws-src.jar and /dev/null differ
diff --git a/VirtualComputer/vboxjws.jar b/VirtualComputer/vboxjws.jar
deleted file mode 100644
index cc9bd32..0000000
Binary files a/VirtualComputer/vboxjws.jar and /dev/null differ