Update path structure and add examples
This commit is contained in:
36
run/config/worldhandler/usercontent/example/example.js
Normal file
36
run/config/worldhandler/usercontent/example/example.js
Normal file
@@ -0,0 +1,36 @@
|
||||
var ActionHelper = Java.type('exopandora.worldhandler.helper.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.setCommandArgument(0, 4, arg);
|
||||
}
|
||||
|
||||
function openContent(arg) {
|
||||
ActionHelper.open(arg);
|
||||
}
|
||||
|
||||
function addChatMessage(arg) {
|
||||
api.addChatMessage(arg);
|
||||
}
|
||||
Reference in New Issue
Block a user