diff --git a/.gitignore b/.gitignore index cea9d96..cd4d06b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ libpxc.so +dependency-reduced-pom.xml ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. diff --git a/VirtualComputer-Core/dependency-reduced-pom.xml b/VirtualComputer-Core/dependency-reduced-pom.xml deleted file mode 100644 index aba4167..0000000 --- a/VirtualComputer-Core/dependency-reduced-pom.xml +++ /dev/null @@ -1,146 +0,0 @@ - - - - VirtualComputer - io.github.NorbiPeti - 2.1-SNAPSHOT - - 4.0.0 - VirtualComputer-Core - 2.1-SNAPSHOT - - - - maven-compiler-plugin - 3.5.1 - - 1.8 - 1.8 - - -g - - - - - maven-shade-plugin - 3.2.4 - - - package - - shade - - - - - - - - - - XPCOM - - - - maven-shade-plugin - - - package - - shade - - - - - org.virtualbox:VirtualBox-MSCOM - sznp.virtualcomputer:VirtualComputer-MSCOM - - - true - - - io.github.NorbiPeti:VirtualComputer-XPCOM - - ** - - - - - - - - - - - - MSCOM - - - - maven-shade-plugin - - - package - - shade - - - - - org.virtualbox:VirtualBox - sznp.virtualcomputer:VirtualComputer-XPCOM - - - - - - - - - - - - - org.virtualbox - VirtualBox-MSCOM - 6.1 - compile - - - sznp.virtualcomputer - VirtualComputer-MSCOM - 2.1-SNAPSHOT - compile - - - junit - junit - 4.11 - test - - - hamcrest-core - org.hamcrest - - - - - org.projectlombok - lombok - 1.18.12 - provided - - - org.spigotmc - spigot-api - 1.12-R0.1-SNAPSHOT - provided - - - org.spigotmc - spigot - 1.16.1-R0.1-SNAPSHOT - provided - - - diff --git a/VirtualComputer-Core/pom.xml b/VirtualComputer-Core/pom.xml index 83cfd9d..335e630 100644 --- a/VirtualComputer-Core/pom.xml +++ b/VirtualComputer-Core/pom.xml @@ -80,7 +80,7 @@ sznp.virtualcomputer:VirtualComputer-MSCOM - true + io.github.NorbiPeti:VirtualComputer-XPCOM @@ -89,6 +89,13 @@ + + com.github.jnr:jnr-ffi + + ** + + + diff --git a/VirtualComputer-Core/src/main/java/sznp/virtualcomputer/events/MachineEventHandler.java b/VirtualComputer-Core/src/main/java/sznp/virtualcomputer/events/MachineEventHandler.java index ecefe3f..fb4e893 100644 --- a/VirtualComputer-Core/src/main/java/sznp/virtualcomputer/events/MachineEventHandler.java +++ b/VirtualComputer-Core/src/main/java/sznp/virtualcomputer/events/MachineEventHandler.java @@ -47,8 +47,13 @@ public class MachineEventHandler extends EventHandlerBase { l.warning("Result code: " + Integer.toHexString(progress.getResultCode())); for (var info = progress.getErrorInfo(); info != null; info = info.getNext()) { l.warning("----------------"); - l.warning("VBox: " + info.getText()); - l.warning("Component: " + info.getComponent()); + if (info.getResultCode() == 0x80004005 && info.getResultDetail() == 0xFFFFF88B) + l.warning("The server cannot access the VirtualBox driver, run it with sudo. Make sure to only run plugins you trust."); + else { + l.warning("VBox: " + info.getText()); + l.warning("Component: " + info.getComponent()); + l.warning("Error codes: " + Integer.toHexString(info.getResultCode()) + " " + Integer.toHexString(info.getResultDetail())); + } } } }); diff --git a/VirtualComputer-Core/src/main/resources/plugin.yml b/VirtualComputer-Core/src/main/resources/plugin.yml index 6ea0ca7..cb6b8b2 100644 --- a/VirtualComputer-Core/src/main/resources/plugin.yml +++ b/VirtualComputer-Core/src/main/resources/plugin.yml @@ -1,7 +1,8 @@ name: VirtualComputer main: sznp.virtualcomputer.PluginMain -version: 2.0 +version: '2.1' commands: computer: usage: Use /computer start|stop|reset|key|mouse|input|fix aliases: c +api-version: '1.13' diff --git a/VirtualComputerXPCOM/src/main/java/sznp/virtualcomputer/COMFrameBuffer.java b/VirtualComputerXPCOM/src/main/java/sznp/virtualcomputer/COMFrameBuffer.java index 07bc53b..b38e3a6 100644 --- a/VirtualComputerXPCOM/src/main/java/sznp/virtualcomputer/COMFrameBuffer.java +++ b/VirtualComputerXPCOM/src/main/java/sznp/virtualcomputer/COMFrameBuffer.java @@ -78,7 +78,8 @@ public class COMFrameBuffer implements IFramebuffer { } @Override - public void notify3DEvent(long arg0, byte[] arg1) { + public void notify3DEvent(long type, byte[] data) { + System.out.println("3D event! " + type + " - " + Arrays.toString(data)); } @Override diff --git a/pom.xml b/pom.xml index bd7eea9..d80f73b 100644 --- a/pom.xml +++ b/pom.xml @@ -58,7 +58,7 @@ com.github.jnr jnr-ffi - 2.1.7 + 2.1.16 com.google.code.findbugs diff --git a/repo/org/virtualbox/VirtualBox-MSCOM/6.1/VirtualBox-MSCOM-6.1.jar b/repo/org/virtualbox/VirtualBox-MSCOM/6.1/VirtualBox-MSCOM-6.1.jar new file mode 100644 index 0000000..c2a44b5 Binary files /dev/null and b/repo/org/virtualbox/VirtualBox-MSCOM/6.1/VirtualBox-MSCOM-6.1.jar differ diff --git a/repo/org/virtualbox/VirtualBox-MSCOM/6.1/VirtualBox-MSCOM-6.1.pom b/repo/org/virtualbox/VirtualBox-MSCOM/6.1/VirtualBox-MSCOM-6.1.pom new file mode 100644 index 0000000..94abf82 --- /dev/null +++ b/repo/org/virtualbox/VirtualBox-MSCOM/6.1/VirtualBox-MSCOM-6.1.pom @@ -0,0 +1,9 @@ + + + 4.0.0 + org.virtualbox + VirtualBox-MSCOM + 6.1 + POM was created from install:install-file + diff --git a/repo/org/virtualbox/VirtualBox/6.1/VirtualBox-6.1.jar b/repo/org/virtualbox/VirtualBox/6.1/VirtualBox-6.1.jar new file mode 100644 index 0000000..7ce5ec7 Binary files /dev/null and b/repo/org/virtualbox/VirtualBox/6.1/VirtualBox-6.1.jar differ diff --git a/repo/org/virtualbox/VirtualBox/6.1/VirtualBox-6.1.pom b/repo/org/virtualbox/VirtualBox/6.1/VirtualBox-6.1.pom new file mode 100644 index 0000000..d15061b --- /dev/null +++ b/repo/org/virtualbox/VirtualBox/6.1/VirtualBox-6.1.pom @@ -0,0 +1,9 @@ + + + 4.0.0 + org.virtualbox + VirtualBox + 6.1 + POM was created from install:install-file +