We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ae190f2 commit 37c54aaCopy full SHA for 37c54aa
1 file changed
scripts/commandHandler.js
@@ -0,0 +1,9 @@
1
+import { world } from "mojang-minecraft";
2
+
3
+function runCommand(command) {
4
+ try {
5
+ return world.getDimension('overworld').runCommand(command);
6
+ } catch (e) {
7
+ return JSON.parse(e)
8
+ };
9
+}
0 commit comments