Added missing WatchIntent and cmdWatch script

This commit is contained in:
Mads Boddum
2016-09-09 04:00:07 +02:00
parent 9b5f7df5ad
commit 3ef10e69a4
2 changed files with 79 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
function executeCommand(galacticManager, player, target, args) {
var actor = player.getCreatureObject();
if(target === null) {
return;
}
if(actor.equals(target)) {
// You can't watch yourself, silly!
return;
}
var WatchIntent = Java.type("intents.WatchIntent");
new WatchIntent(actor, target, true).broadcast();
}