Comment out the setCancelled(true) line for ProjectileLaunchEvent. Was a

leftover from shooting arrow testing.
This commit is contained in:
sigonasr2 2016-07-20 23:53:15 -05:00
parent 7b6d647f93
commit 295a120e3b
2 changed files with 3 additions and 6 deletions

Binary file not shown.

View File

@ -4984,20 +4984,17 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
if (ev.getEntity() instanceof Arrow) { if (ev.getEntity() instanceof Arrow) {
Arrow arr = (Arrow)ev.getEntity(); Arrow arr = (Arrow)ev.getEntity();
//Arrow newarrow = arr.getLocation().getWorld().spawnArrow(arr.getLocation(), arr.getVelocity(), 1, 12); //Arrow newarrow = arr.getLocation().getWorld().spawnArrow(arr.getLocation(), arr.getVelocity(), 1, 12);
ev.setCancelled(true);
if (arr.getShooter() instanceof Player && if (arr.getShooter() instanceof Player &&
arr.getCustomName()==null) { arr.getCustomName()==null) {
Player p = (Player)arr.getShooter(); Player p = (Player)arr.getShooter();
if (GenericFunctions.isRanger(p)) { if (GenericFunctions.isRanger(p)) {
//arr.setVelocity(arr.getVelocity().multiply(4)); arr.setVelocity(arr.getVelocity().multiply(4));
if (GenericFunctions.getBowMode(p.getEquipment().getItemInMainHand())==BowMode.SNIPE) { if (GenericFunctions.getBowMode(p.getEquipment().getItemInMainHand())==BowMode.SNIPE) {
aPlugin.API.damageItem(p, p.getEquipment().getItemInMainHand(), 3); aPlugin.API.damageItem(p, p.getEquipment().getItemInMainHand(), 3);
//p.getEquipment().getItemInMainHand().setDurability((short)(p.getEquipment().getItemInMainHand().getDurability()+1)); //p.getEquipment().getItemInMainHand().setDurability((short)(p.getEquipment().getItemInMainHand().getDurability()+1));
} }
//p.getWorld().spawnArrow(arr.getLocation(), arr.getLocation().getDirection(), 20, 1); //p.getWorld().spawnArrow(arr.getLocation(), arr.getLocation().getDirection(), 20, 1);
} }
Arrow newarrow = arr.getLocation().getWorld().spawnArrow(arr.getLocation(), arr.getLocation().getDirection(), 1, 12);
newarrow.setCustomName("HIT");
PlayerStructure pd = (PlayerStructure)playerdata.get(p.getUniqueId()); PlayerStructure pd = (PlayerStructure)playerdata.get(p.getUniqueId());
pd.lastarrowpower=arr.getVelocity().lengthSquared(); pd.lastarrowpower=arr.getVelocity().lengthSquared();
log("Arrow velocity is "+arr.getVelocity().lengthSquared(),4); log("Arrow velocity is "+arr.getVelocity().lengthSquared(),4);
@ -5802,14 +5799,14 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
* 058E:Clockwise portal * 058E:Clockwise portal
*/ */
bar+=ChatColor.DARK_PURPLE+""+Character.toString((char)0x25CA); bar+=ChatColor.DARK_PURPLE+""+Character.toString((char)0x25CA);
//bar+=ChatColor.DARK_PURPLE+""+"¤"; //bar+=ChatColor.DARK_PURPLE+""+"<EFBFBD>";
} else } else
if (inEnd) { if (inEnd) {
/* 058D:Counter-clockwise portal /* 058D:Counter-clockwise portal
* 058E:Clockwise portal * 058E:Clockwise portal
*/ */
bar+=ChatColor.DARK_BLUE+""+Character.toString((char)0x25CA); bar+=ChatColor.DARK_BLUE+""+Character.toString((char)0x25CA);
//bar+=ChatColor.DARK_PURPLE+""+"¤"; //bar+=ChatColor.DARK_PURPLE+""+"<EFBFBD>";
} }
return bar; return bar;