timtower so if(((Projectile) event).getShooter()instanceof Player && event.getEntity() instanceof Arrow) I have used this in one of my plugins and it worked fine
timtower Correct? Code: if(((Projectile) event.getEntity()).getShooter() instanceof Player && event.getDamager()instanceof Arrow ) { final Player p = (Player)event.getDamager(); final Player a = (Player)event.getEntity();
timtower ok so i will just leave it as this Code: if(((Projectile) event.getEntity()).getShooter() instanceof Player) Im just confused because ive used this on my old plugin and it worked fine, no errors! Final Results Code: if(((Projectile) event.getEntity()).getShooter() instanceof Player) { final Player p = (Player)((Projectile) event).getShooter(); final Player a = (Player)event.getEntity(); Thanks
mactown21 Still same mistake Code:java @EventHandlerpublic void onHit(EntityDamageByEntityEvent event){ if(!(event.getEntity() instanceof Player))return; Player a = (Player)event.getEntity(); Entity damager = event.getDamager(); Player p = null; if(damager instanceof Player){ p = (Player)damager; }else if(damager instanceof Projectile){ p = (Player)((Projectile)damager).getShooter(); }else{ return; }
timtower That dosent work neither with the if((a.getEntity()).equalsIgnoreCase((p.damager()) a.hidePlayer(p) and also, the timer that ive added below will not work they way you have added it. Can you just remake the whole entire onHit void, with timer to unhide player because this is confusing me. and i have alot of studying to do at home, (not with java) so im kindof busy. Thanks
mactown21 Comparing an entity with a string? Not very logical. And I won't make that. I gave you the attacked player and the attacker. You can use a and p, both are players.
[quote uid=90955271 name="JordyPwner" post=2528850]mactown21 Cant test it now cause i have to sleep[/quote] Try this: <Edit by Moderator: Redacted mediafire url> (Untested)
Onlineids mactown21 Its working only what i want that if possible when you shoot you always get a arrow effect in particles.png what i want is more effect then just 1 trail i want like 3 trails in a triangle or something and the player who i shoot still gets damage. i dont want that he get damage
If you want things in the plugin.... you should put them in the PLUGIN request so we aren't waiting for you to add more crap that you could've just mentioned in the original post...
Here: PartyPopper.jar There are a lot of options in the config, if you're not sure on anything, feel free to ask