1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-25 20:16:13 +01:00

Include projectile into entity death event check

This commit is contained in:
Zrips 2016-06-29 17:57:17 +03:00
parent 34c9c60145
commit c7c1b6113a
4 changed files with 12 additions and 5 deletions

View File

@ -5,7 +5,7 @@
<classpathentry kind="lib" path="C:/Users/Arte/Desktop/Jobs/lib/Vault1.5.3.jar"/>
<classpathentry kind="lib" path="C:/Users/Arte/Desktop/Jobs/lib/mcMMO#127.jar"/>
<classpathentry kind="lib" path="C:/Users/Arte/Desktop/Jobs/lib/CoreProtect_2.12.0.jar"/>
<classpathentry kind="lib" path="C:/Users/Arte/Desktop/Jobs/lib/spigot-1.10.jar"/>
<classpathentry kind="lib" path="C:/Users/Arte/Desktop/Jobs/lib/spigot-1.10.2.jar"/>
<classpathentry kind="lib" path="C:/Users/Arte/Desktop/Jobs/lib/MythicMobs-2.1.8.jar"/>
<classpathentry kind="output" path=""/>
</classpath>

View File

@ -57,6 +57,8 @@ public class LanguageManager {
LocaleReader c = new LocaleReader(config, writer);
c.getC().options().copyDefaults(true);
Jobs.getGCManager().commandArgs.clear();
c.get("economy.error.nomoney", "&cSorry, no money left in national bank!");

View File

@ -35,6 +35,7 @@ import org.bukkit.entity.HumanEntity;
import org.bukkit.entity.Item;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.entity.Projectile;
import org.bukkit.entity.Sheep;
import org.bukkit.entity.Tameable;
import org.bukkit.event.EventHandler;
@ -839,10 +840,10 @@ public class JobsPaymentListener implements Listener {
Double PetPayMultiplier = 0.0;
// Checking if killer is player
if (e.getDamager() instanceof Player)
if (e.getDamager() instanceof Player) {
pDamager = (Player) e.getDamager();
// Checking if killer is tamed animal
else if (e.getDamager() instanceof Tameable) {
// Checking if killer is tamed animal
} else if (e.getDamager() instanceof Tameable) {
Tameable t = (Tameable) (e).getDamager();
if (t.isTamed() && t.getOwner() instanceof Player) {
pDamager = (Player) t.getOwner();
@ -851,6 +852,10 @@ public class JobsPaymentListener implements Listener {
else
PetPayMultiplier = Jobs.getGCManager().PetPay * 100 - 100;
}
} else if (e.getDamager() instanceof Projectile) {
Projectile pr = (Projectile) e.getDamager();
if (pr.getShooter() instanceof Player)
pDamager = (Player) pr.getShooter();
} else
return;

View File

@ -1,7 +1,7 @@
name: Jobs
description: Jobs Plugin for the BukkitAPI
main: com.gamingmesh.jobs.JobsPlugin
version: 3.5.4
version: 3.5.5
author: phrstbrn
depend: [Vault]
softdepend: [CoreProtect, MythicMobs, McMMO]