Merge pull request #72 from edonaldson/patch-2
Update to include getLocation and setPosition
This commit is contained in:
commit
5f216cb171
1 changed files with 21 additions and 0 deletions
|
@ -214,6 +214,15 @@ Drone.prototype.fwd = function(numBlocks){};
|
||||||
Drone.prototype.back = function(numBlocks){};
|
Drone.prototype.back = function(numBlocks){};
|
||||||
Drone.prototype.turn = function(numTurns){};
|
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
|
Drone Markers
|
||||||
=============
|
=============
|
||||||
|
@ -769,6 +778,18 @@ Used when placing torches so that they face towards the drone.
|
||||||
return this;
|
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 (typeof x != "undefined") this.x = x;
|
||||||
|
if (typeof y != "undefined") this.y = y;
|
||||||
|
if (typeof z != "undefined") this.z = z;
|
||||||
|
if (typeof dir != "undefined") this.dir = dir;
|
||||||
|
};
|
||||||
|
//
|
||||||
// building
|
// building
|
||||||
//
|
//
|
||||||
Drone.prototype.sign = function(message,block){
|
Drone.prototype.sign = function(message,block){
|
||||||
|
|
Reference in a new issue