diff --git a/js-plugins/arrows.js b/js-plugins/arrows.js index 3f7f0b0..0cbc123 100644 --- a/js-plugins/arrows.js +++ b/js-plugins/arrows.js @@ -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: diff --git a/js-plugins/core/_primitives.js b/js-plugins/core/_primitives.js index ba25031..d35d804 100644 --- a/js-plugins/core/_primitives.js +++ b/js-plugins/core/_primitives.js @@ -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; };