Files
WorldHandler/run/config/worldhandler/usercontent/example/example.js
Marcel Konrad 7951c13bc5 Update to 1.18
Rewrite command builders
Usercontent api v2
2021-12-02 12:45:25 +01:00

37 lines
555 B
JavaScript

var ActionHelper = Java.type('exopandora.worldhandler.util.ActionHelper');
var visible = true;
var enabled = true;
function toggleVisibility() {
visible = !visible;
}
function toggleEnabled() {
enabled = !enabled;
}
function isVisible() {
return visible;
}
function isEnabled() {
return enabled;
}
function selected(arg) {
api.addChatMessage(arg);
}
function updateText(arg) {
api.setArgument("example1", "textfield", arg);
}
function openContent(arg) {
ActionHelper.open(arg);
}
function addChatMessage(arg) {
api.addChatMessage(arg);
}