diff --git a/src/main/javascript/drone/drone.js b/src/main/javascript/drone/drone.js index 96a7951..e2f261b 100644 --- a/src/main/javascript/drone/drone.js +++ b/src/main/javascript/drone/drone.js @@ -214,6 +214,15 @@ Drone.prototype.fwd = function(numBlocks){}; Drone.prototype.back = function(numBlocks){}; Drone.prototype.turn = function(numTurns){}; +/************************************************************************ +Drone Positional Info +===================== +* getLocation - Returns a Bukkit Location object for the drone +* setPosition - Sets a drones location and direction +***/ +Drone.prototype.getLocation = function(){}; +Drone.prototype.setPosition = function(x,y,z,dir){}; + /************************************************************************ Drone Markers ============= @@ -769,6 +778,18 @@ Used when placing torches so that they face towards the drone. return this; }; // + // position + // + Drone.prototype.getLocation = function() { + return org.bukkit.Location(this.world, this.x, this.y, this.z); + }; + Drone.prototype.setPosition = function(x,y,z,dir) { + if (x) this.x = x; + if (y) this.y = y; + if (z) this.z = z; + if (dir) this.dir = dir; + }; + // // building // Drone.prototype.sign = function(message,block){