Removed Arrow() and Sign() from global namespace

This commit is contained in:
walterhiggins 2013-01-15 00:18:05 +00:00
parent af5436cf82
commit 77de4a1134
2 changed files with 6 additions and 8 deletions

View file

@ -61,7 +61,9 @@ var arrows = arrows || {};
var projectile = event.entity;
var world = projectile.world;
var shooter = projectile.shooter;
if (projectile instanceof Arrow && shooter instanceof Player){
if (projectile instanceof org.bukkit.entity.Arrow &&
shooter instanceof org.bukkit.entity.Player)
{
var arrowType = _players[shooter.name];
switch (arrowType){
case 1:

View file

@ -18,10 +18,6 @@
return;
}
importPackage(org.bukkit.command);
importPackage(org.bukkit.block);
importPackage(org.bukkit.entity);
var _getPlayerPos = function(){
if (typeof __self == "undefined")
return;
@ -58,7 +54,7 @@
putBlock(x,y,z,blockId,meta);
var block = _getBlockObject(x,y,z);
state = block.state;
if (state instanceof Sign){
if (state instanceof org.bukkit.block.Sign){
for (var i = 0;i < texts.length; i++)
state.setLine(i%4,texts[i]);
state.update(true);
@ -80,9 +76,9 @@
var _getWorld = function(){
if (typeof __self == "undefined")
return;
if (__self instanceof BlockCommandSender)
if (__self instanceof org.bukkit.command.BlockCommandSender)
return __self.block.location.world;
if (__self instanceof Player)
if (__self instanceof org.bukkit.entity.Player)
return __self.location.world;
};